From 7d48c1fc267d44a5dede4bfdcf4e295e1fcf3227 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 9 Feb 2015 16:23:30 -0200 Subject: Add the first call to registerApplicationState This will be used to set the 'default' state. The other two possible states right now are plan and add; those will be created right next. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 59dad9b01..a6779150b 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -45,6 +45,17 @@ MainWindow::MainWindow() : QMainWindow(), Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!"); m_Instance = this; ui.setupUi(this); + // Define the States of the Application Here, Currently the states are situations where the different + // widgets will change on the mainwindow. + + // for the "default" mode + MainTab *mainTab = new MainTab(); + DiveListView *diveListView = new DiveListView(); + ProfileWidget2 *profileWidget = new ProfileWidget2(); + GlobeGPS *globe = new GlobeGPS(); + + registerApplicationState("Default", mainTab, diveListView, profileWidget, globe ); + ui.multiFilter->hide(); // what is a sane order for those icons? we should have the ones the user is // most likely to want towards the top so they are always visible @@ -1484,7 +1495,7 @@ void MainWindow::checkForUndoAndRedo() ui.action_Redo->setEnabled(undoBuffer->canRedo()); } -void registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *bottomLeft, QWidget *topRight, QWidget *bottomRight) +void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *bottomLeft, QWidget *topRight, QWidget *bottomRight) { applicationState[state] = WidgetForBorder(topLeft, bottomLeft, topRight, bottomRight); } -- cgit v1.2.3-70-g09d2