ui: statusbar

statusbar added, listen to status- , error-  and parsingfinishedmessages
This commit is contained in:
Andreas Stallinger
2014-11-24 16:35:46 +01:00
parent 048fcb28b4
commit af4e3f7676
30 changed files with 392 additions and 6 deletions
+45
View File
@@ -0,0 +1,45 @@
#include "qt/view/QtStatusBarView.h"
#include <QStatusBar>
#include "qt/view/QtMainView.h"
#include "qt/view/QtViewWidgetWrapper.h"
QtStatusBarView::QtStatusBarView( ViewLayout* viewLayout )
: StatusBarView(viewLayout)
, m_showMessageFunctor(std::bind(&QtStatusBarView::doShowMessage, this, std::placeholders::_1, std::placeholders::_2))
{
QtMainView* mw = static_cast<QtMainView*>(viewLayout);
m_widget = std::make_shared<QtStatusBar>();
QStatusBar* sb = static_cast<QStatusBar*>(m_widget.get());
mw->setStatusBar(sb);
m_widget->show();
}
QtStatusBarView::~QtStatusBarView()
{
}
void QtStatusBarView::createWidgetWrapper()
{
//setWidgetWrapper(std::make_shared<QtViewWidgetWrapper>(m_widget));
}
void QtStatusBarView::initView()
{
}
void QtStatusBarView::refreshView()
{
}
void QtStatusBarView::doShowMessage( const std::string& message, bool isError )
{
m_widget->setText(message, isError);
}
void QtStatusBarView::showMessage( const std::string& message, bool isError )
{
m_showMessageFunctor(message, isError);
}