src: Switched all Qt..View implementations to use QtThreadedLambdaFunctor

This commit is contained in:
Eberhard Graether
2017-09-21 01:37:17 +02:00
parent 49caaa1b0b
commit 1e7d934cb8
14 changed files with 340 additions and 462 deletions
+5 -8
View File
@@ -8,7 +8,6 @@
QtCompositeView::QtCompositeView(ViewLayout* viewLayout, CompositeDirection direction, const std::string& name)
: CompositeView(viewLayout, direction, name)
, m_refreshFunctor(std::bind(&QtCompositeView::doRefreshView, this))
{
QBoxLayout* layout;
if (getDirection() == CompositeView::DIRECTION_HORIZONTAL)
@@ -27,7 +26,7 @@ QtCompositeView::QtCompositeView(ViewLayout* viewLayout, CompositeDirection dire
m_widget = new QWidget();
m_widget->setLayout(layout);
doRefreshView();
refreshView();
}
QtCompositeView::~QtCompositeView()
@@ -45,12 +44,10 @@ void QtCompositeView::initView()
void QtCompositeView::refreshView()
{
m_refreshFunctor();
}
void QtCompositeView::doRefreshView()
{
utility::setWidgetBackgroundColor(m_widget, ColorScheme::getInstance()->getColor("search/background"));
m_onQtThread([=]()
{
utility::setWidgetBackgroundColor(m_widget, ColorScheme::getInstance()->getColor("search/background"));
});
}
void QtCompositeView::addViewWidget(View* view)