mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:33:24 +00:00
Implement the registerApplicationState function
This function registers the different widget layouts that we will have in subsurface. Currently we have three layouts (default, plan, add) and a few more are comming (for instance location) and the code is scattered around. It was making me unconfortable. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
aa56797b0b
commit
38aab70555
2 changed files with 8 additions and 0 deletions
|
@ -1485,3 +1485,8 @@ void MainWindow::checkForUndoAndRedo()
|
|||
ui.action_Undo->setEnabled(undoBuffer->canUndo());
|
||||
ui.action_Redo->setEnabled(undoBuffer->canRedo());
|
||||
}
|
||||
|
||||
void registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *bottomLeft, QWidget *topRight, QWidget *bottomRight)
|
||||
{
|
||||
applicationState[state] = WidgetForBorder(topLeft, bottomLeft, topRight, bottomRight);
|
||||
}
|
||||
|
|
|
@ -190,6 +190,7 @@ private:
|
|||
void saveSplitterSizes();
|
||||
QString lastUsedDir();
|
||||
void updateLastUsedDir(const QString &s);
|
||||
void registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *bottomLeft, QWidget *topRight, QWidget *bottomRight);
|
||||
bool filesAsArguments;
|
||||
UpdateManager *updateManager;
|
||||
|
||||
|
@ -201,6 +202,8 @@ private:
|
|||
QList<QAction *> profileToolbarActions;
|
||||
|
||||
struct WidgetForBorder {
|
||||
WidgetForBorder(QWidget *tl, QWidget *bl, QWidget *tr, QWidget *br) :
|
||||
topLeft(tl), bottomLeft(bl), topRight(tr), bottomRight(br) {}
|
||||
QWidget *topLeft;
|
||||
QWidget *bottomLeft;
|
||||
QWidget *topRight;
|
||||
|
|
Loading…
Add table
Reference in a new issue