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 <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-08-22 22:26:07 -03:00 committed by Dirk Hohndel
parent fe9e67bfaf
commit 9acf1caca3
4 changed files with 235 additions and 484 deletions

View file

@ -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));