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:
Tomaz Canabrava 2015-02-09 15:42:32 -02:00 committed by Dirk Hohndel
parent aa56797b0b
commit 38aab70555
2 changed files with 8 additions and 0 deletions

View file

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