ui: statusbar
statusbar added, listen to status- , error- and parsingfinishedmessages
This commit is contained in:
@@ -20,6 +20,7 @@ QtMainWindow::QtMainWindow()
|
||||
{
|
||||
setObjectName("QtMainWindow");
|
||||
setCentralWidget(nullptr);
|
||||
setDockNestingEnabled(true);
|
||||
|
||||
setupProjectMenu();
|
||||
setupViewMenu();
|
||||
@@ -73,8 +74,8 @@ void QtMainWindow::openProject(const QString &path)
|
||||
}
|
||||
|
||||
void QtMainWindow::saveProject()
|
||||
{
|
||||
MessageSaveProject("").dispatch();
|
||||
{
|
||||
MessageSaveProject("").dispatch();
|
||||
}
|
||||
|
||||
void QtMainWindow::saveAsProject()
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#include "qt/element/QtStatusBar.h"
|
||||
|
||||
QtStatusBar::QtStatusBar()
|
||||
: m_text(this)
|
||||
{
|
||||
m_text.setText("hallo test test");
|
||||
addWidget(&m_text);
|
||||
}
|
||||
|
||||
QtStatusBar::~QtStatusBar()
|
||||
{
|
||||
}
|
||||
|
||||
void QtStatusBar::setText(const std::string& text, bool isError)
|
||||
{
|
||||
if (isError)
|
||||
{
|
||||
m_text.setStyleSheet("QLabel { color: red }");
|
||||
}
|
||||
m_text.setText(text.c_str());
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef QT_STATUS_BAR_H
|
||||
#define QT_STATUS_BAR_H
|
||||
|
||||
#include <string>
|
||||
#include <QStatusBar>
|
||||
#include <QProgressBar>
|
||||
#include <QLabel>
|
||||
|
||||
class QtStatusBar : public QStatusBar
|
||||
{
|
||||
public:
|
||||
QtStatusBar(void);
|
||||
~QtStatusBar(void);
|
||||
|
||||
void setText(const std::string& text, bool isError = false);
|
||||
private:
|
||||
QLabel m_text;
|
||||
};
|
||||
|
||||
#endif // !QT_STATUS_BAR_H
|
||||
Reference in New Issue
Block a user