diff options
-rw-r--r-- | qt-ui/mainwindow.cpp | 2 | ||||
-rw-r--r-- | qt-ui/mainwindow.ui | 70 |
2 files changed, 54 insertions, 18 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 9a325cef4..910580e06 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -131,6 +131,7 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList) ui.globe->reload(); if (doRecreateDiveList) recreateDiveList(); + ui.diveListPane->setCurrentIndex(0); // switch to the dive list ui.ListWidget->setEnabled(true); ui.ListWidget->setFocus(); WSInfoModel::instance()->updateInfo(); @@ -437,6 +438,7 @@ void MainWindow::on_actionDivePlanner_triggered() // reload and then disable the dive list ui.ListWidget->reload(DiveTripModel::CURRENT); ui.ListWidget->setEnabled(false); + ui.diveListPane->setCurrentIndex(1); // switch to the plan output } void MainWindow::on_actionAddDive_triggered() diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 1fd0fa775..d73f19077 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -495,25 +495,59 @@ <property name="orientation"> <enum>Qt::Horizontal</enum> </property> - <widget class="DiveListView" name="ListWidget"> - <property name="alternatingRowColors"> - <bool>true</bool> - </property> - <property name="selectionMode"> - <enum>QAbstractItemView::ExtendedSelection</enum> - </property> - <property name="rootIsDecorated"> - <bool>true</bool> - </property> - <property name="sortingEnabled"> - <bool>false</bool> - </property> - <property name="animated"> - <bool>true</bool> - </property> - <property name="allColumnsShowFocus"> - <bool>true</bool> + <widget class="QStackedWidget" name="diveListPane"> + <property name="currentIndex"> + <number>0</number> </property> + <widget class="DiveListView" name="ListWidget"> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="selectionMode"> + <enum>QAbstractItemView::ExtendedSelection</enum> + </property> + <property name="rootIsDecorated"> + <bool>true</bool> + </property> + <property name="sortingEnabled"> + <bool>false</bool> + </property> + <property name="animated"> + <bool>true</bool> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + </widget> + <widget class="QWidget" name="fullPlan"> + <layout class="QVBoxLayout" name="horizontalLayout_p4"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="divePlanOutputLabel"> + <property name="text"> + <string>Dive plan details</string> + </property> + </widget> + </item> + <item> + <widget class="QTextEdit" name="divePlanOutput" native="true"/> + </item> + </layout> + </widget> </widget> <widget class="QWidget" name="layoutWidget"> <layout class="QVBoxLayout" name="verticalLayout"> |