Files
Sourcetrail/src/lib_gui/qt/view/QtUndoRedoView.cpp
T
Eberhard Graether 166d82b44f ui: made icon buttons self updating on color scheme change
* fixed hatching not replaced in single file view title bar on color scheme change
2018-03-19 22:44:45 +01:00

68 lines
1.1 KiB
C++

#include "qt/view/QtUndoRedoView.h"
#include "utility/ResourcePaths.h"
#include "qt/utility/utilityQt.h"
#include "qt/view/QtViewWidgetWrapper.h"
QtUndoRedoView::QtUndoRedoView(ViewLayout* viewLayout)
: UndoRedoView(viewLayout)
{
m_widget = new QtUndoRedo();
}
QtUndoRedoView::~QtUndoRedoView()
{
}
void QtUndoRedoView::createWidgetWrapper()
{
setWidgetWrapper(std::make_shared<QtViewWidgetWrapper>(m_widget));
}
void QtUndoRedoView::initView()
{
}
void QtUndoRedoView::refreshView()
{
m_onQtThread(
[=]()
{
m_widget->setStyleSheet(utility::getStyleSheet(
ResourcePaths::getGuiPath().concatenate(L"undoredo_view/undoredo_view.css")
).c_str());
}
);
}
void QtUndoRedoView::setRedoButtonEnabled(bool enabled)
{
m_onQtThread(
[=]()
{
m_widget->setRedoButtonEnabled(enabled);
}
);
}
void QtUndoRedoView::setUndoButtonEnabled(bool enabled)
{
m_onQtThread(
[=]()
{
m_widget->setUndoButtonEnabled(enabled);
}
);
}
void QtUndoRedoView::updateHistory(const std::vector<SearchMatch>& searchMatches, size_t currentIndex)
{
m_onQtThread(
[=]()
{
m_widget->updateHistory(searchMatches, currentIndex);
}
);
}