aboutsummaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 09:32:19 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-05 13:45:50 -0800
commit533d724d1b4380741ce7db91c39262df6c0df062 (patch)
tree3678302c1967df3e269afb16eda562fd8b8abdfb /profile-widget
parentfcf47552c641facce196c4e96d4634daff6cfd11 (diff)
downloadsubsurface-533d724d1b4380741ce7db91c39262df6c0df062.tar.gz
Profile: begin untangling from MainWindow
Use a signal to turn the toolbar on or off. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/profilewidget2.cpp4
-rw-r--r--profile-widget/profilewidget2.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp
index 653818556..a7105b8ca 100644
--- a/profile-widget/profilewidget2.cpp
+++ b/profile-widget/profilewidget2.cpp
@@ -919,7 +919,7 @@ void ProfileWidget2::setEmptyState()
setBackgroundBrush(getColor(::BACKGROUND, isGrayscale));
dataModel->clear();
currentState = EMPTY;
- MainWindow::instance()->setEnabledToolbar(false);
+ emit enableToolbar(false);
fixBackgroundPos();
background->setVisible(true);
@@ -974,7 +974,7 @@ void ProfileWidget2::setProfileState()
MainWindow::instance()->enableShortcuts();
currentState = PROFILE;
- MainWindow::instance()->setEnabledToolbar(true);
+ emit enableToolbar(true);
toolTipItem->readPos();
setBackgroundBrush(getColor(::BACKGROUND, isGrayscale));
diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h
index ce3fda083..812787b2d 100644
--- a/profile-widget/profilewidget2.h
+++ b/profile-widget/profilewidget2.h
@@ -88,6 +88,7 @@ public:
signals:
void fontPrintScaleChanged(double scale);
+ void enableToolbar(bool enable);
public
slots: // Necessary to call from QAction's signals.