mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
fe9e67bfaf
commit
9acf1caca3
4 changed files with 235 additions and 484 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue