logic: initially parse source on message thread and add more StatusBar messages
This change puts the initial project loading into a MessageLoadProject so that the UI thread is still responding. Also the StatusBar is now responding to more Messages and it's MessageListeners get added to the MessageQueue in front of other listeners so that the StatusBar UI can announce actions.
This commit is contained in:
@@ -26,7 +26,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
QtViewFactory viewFactory;
|
||||
std::shared_ptr<Application> app = Application::create(&viewFactory);
|
||||
app->loadProject("data/ProjectSettings.xml");
|
||||
|
||||
return qtApp.exec();
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
QtStatusBar::QtStatusBar()
|
||||
: m_text(this)
|
||||
{
|
||||
m_text.setText("hallo test test");
|
||||
m_text.setText("");
|
||||
addWidget(&m_text);
|
||||
}
|
||||
|
||||
|
||||
@@ -17,4 +17,4 @@ private:
|
||||
QLabel m_text;
|
||||
};
|
||||
|
||||
#endif // !QT_STATUS_BAR_H
|
||||
#endif // QT_STATUS_BAR_H
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "qt/view/QtMainView.h"
|
||||
#include "qt/view/QtViewWidgetWrapper.h"
|
||||
|
||||
QtStatusBarView::QtStatusBarView( ViewLayout* viewLayout )
|
||||
QtStatusBarView::QtStatusBarView(ViewLayout* viewLayout)
|
||||
: StatusBarView(viewLayout)
|
||||
, m_showMessageFunctor(std::bind(&QtStatusBarView::doShowMessage, this, std::placeholders::_1, std::placeholders::_2))
|
||||
{
|
||||
@@ -26,20 +26,18 @@ void QtStatusBarView::createWidgetWrapper()
|
||||
|
||||
void QtStatusBarView::initView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QtStatusBarView::refreshView()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QtStatusBarView::doShowMessage( const std::string& message, bool isError )
|
||||
void QtStatusBarView::doShowMessage(const std::string& message, bool isError)
|
||||
{
|
||||
m_widget->setText(message, isError);
|
||||
}
|
||||
|
||||
void QtStatusBarView::showMessage( const std::string& message, bool isError )
|
||||
void QtStatusBarView::showMessage(const std::string& message, bool isError)
|
||||
{
|
||||
m_showMessageFunctor(message, isError);
|
||||
}
|
||||
|
||||
@@ -28,4 +28,4 @@ private:
|
||||
QtThreadedFunctor<const std::string&, bool> m_showMessageFunctor;
|
||||
};
|
||||
|
||||
#endif // !QT_STATUS_BAR_VIEW_H
|
||||
#endif // !QT_STATUS_BAR_VIEW_H
|
||||
|
||||
Reference in New Issue
Block a user