Core / Measure: Introduce QuickMeasure
This commit is contained in:
committed by
Yorik van Havre
parent
085ce0c54e
commit
818e122420
@@ -269,6 +269,7 @@ struct MainWindowP
|
||||
{
|
||||
DimensionWidget* sizeLabel;
|
||||
QLabel* actionLabel;
|
||||
QLabel* rightSideLabel;
|
||||
QTimer* actionTimer;
|
||||
QTimer* statusTimer;
|
||||
QTimer* activityTimer;
|
||||
@@ -445,6 +446,7 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
|
||||
// labels and progressbar
|
||||
d->status = new StatusBarObserver();
|
||||
d->actionLabel = new QLabel(statusBar());
|
||||
d->actionLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
// d->actionLabel->setMinimumWidth(120);
|
||||
|
||||
d->sizeLabel = new DimensionWidget(statusBar());
|
||||
@@ -454,6 +456,10 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
|
||||
statusBar()->addPermanentWidget(progressBar, 0);
|
||||
statusBar()->addPermanentWidget(d->sizeLabel, 0);
|
||||
|
||||
d->rightSideLabel = new QLabel(statusBar());
|
||||
d->rightSideLabel->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
statusBar()->addPermanentWidget(d->rightSideLabel);
|
||||
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/NotificationArea");
|
||||
|
||||
auto notificationAreaEnabled = hGrp->GetBool("NotificationAreaEnabled", true);
|
||||
@@ -464,6 +470,7 @@ MainWindow::MainWindow(QWidget * parent, Qt::WindowFlags f)
|
||||
notificationArea->setStyleSheet(QStringLiteral("text-align:left;"));
|
||||
statusBar()->addPermanentWidget(notificationArea);
|
||||
}
|
||||
|
||||
// clears the action label
|
||||
d->actionTimer = new QTimer( this );
|
||||
d->actionTimer->setObjectName(QString::fromLatin1("actionTimer"));
|
||||
@@ -2431,6 +2438,11 @@ void MainWindow::showMessage(const QString& message, int timeout) {
|
||||
d->actionTimer->stop();
|
||||
}
|
||||
|
||||
void MainWindow::setRightSideMessage(const QString& message)
|
||||
{
|
||||
d->rightSideLabel->setText(message.simplified());
|
||||
}
|
||||
|
||||
void MainWindow::showStatus(int type, const QString& message)
|
||||
{
|
||||
if(QApplication::instance()->thread() != QThread::currentThread()) {
|
||||
|
||||
Reference in New Issue
Block a user