From 9acf1caca3370f3e7eaf53c88e5419a62c07e4cb Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 22 Aug 2014 22:26:07 -0300 Subject: A much better Toolbar for the profile. Using QToolBar I was able to remove much of the dead code from the mainwindow.ui xml file by transforming the QToolButtons into actions and loading them dynamically in the .cpp code. I couldn't use the designer for this ( as I wanted ) because Qt has no notion of ToolBars outside of the areas where the MainWindow should have one, and we use it in a very different area. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/profilewidget2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qt-ui/profile/profilewidget2.cpp') diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index bd51b3310..fcad3197f 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -740,7 +740,7 @@ void ProfileWidget2::setEmptyState() setBackgroundBrush(getColor(::BACKGROUND, isGrayscale)); dataModel->clear(); currentState = EMPTY; - MainWindow::instance()->setToolButtonsEnabled(false); + MainWindow::instance()->setEnabledToolbar(false); fixBackgroundPos(); background->setVisible(true); @@ -788,7 +788,7 @@ void ProfileWidget2::setProfileState() MainWindow::instance()->enableDcShortcuts(); currentState = PROFILE; - MainWindow::instance()->setToolButtonsEnabled(true); + MainWindow::instance()->setEnabledToolbar(true); toolTipItem->readPos(); setBackgroundBrush(getColor(::BACKGROUND, isGrayscale)); -- cgit v1.2.3-70-g09d2