diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 95b6c211c..5e79f0b89 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -799,3 +799,8 @@ void Button::mousePressEvent(QGraphicsSceneMouseEvent* event) event->ignore(); emit clicked(); } + +DivePlannerWidget::DivePlannerWidget(QWidget* parent, Qt::WindowFlags f): QWidget(parent, f), ui(new Ui::DivePlanner()) +{ + ui->setupUi(this); +} diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index 2239e013d..fa3f83766 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -5,6 +5,10 @@ #include #include +namespace Ui{ + class DivePlanner; +}; + class QListView; class QStringListModel; class QModelIndex; @@ -145,4 +149,12 @@ private: int dpMaxTime; // this is the time of the dive calculated by the deco. }; +class DivePlannerWidget : public QWidget { + Q_OBJECT +public: + explicit DivePlannerWidget(QWidget* parent = 0, Qt::WindowFlags f = 0); +private: + Ui::DivePlanner *ui; +}; + #endif diff --git a/qt-ui/diveplanner.ui b/qt-ui/diveplanner.ui index e4903f0f8..d2d52172b 100644 --- a/qt-ui/diveplanner.ui +++ b/qt-ui/diveplanner.ui @@ -1,27 +1,91 @@ DivePlanner - + 0 0 - 575 - 451 + 400 + 352 - Dialog + Form - - - - - - - - Qt::Horizontal + + + + + Start Time + + + + + + ATM Pressure + + + + + + + + + + + + + + + + Low GF + + + + + + + + + + Bottom SAC + + + + + + + High GF + + + + + + + SAC on DECO Stop + + + + + + + + + + + + + Last Stop at 6m + + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -29,46 +93,6 @@ - - - DivePlannerGraphics - QGraphicsView -
diveplanner.h
-
-
- - - buttonBox - accepted() - DivePlanner - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - DivePlanner - reject() - - - 316 - 260 - - - 286 - 274 - - - - +
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index a78b84565..252b1bdb6 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -238,12 +238,14 @@ void MainWindow::on_actionDivePlanner_triggered() { disableDcShortcuts(); ui->stackedWidget->setCurrentIndex(1); + ui->infoPane->setCurrentIndex(1); } void MainWindow::showProfile() { enableDcShortcuts(); ui->stackedWidget->setCurrentIndex(0); + ui->infoPane->setCurrentIndex(0); } diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 731013538..445d121df 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -24,17 +24,44 @@ Qt::Horizontal - + + + 1 + + + + + + + + + + + + + + + + - 0 + 1 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -47,7 +74,16 @@ 0 - + + 0 + + + 0 + + + 0 + + 0 @@ -123,10 +159,7 @@ - - mainSplitter - mainSplitter - + @@ -136,7 +169,7 @@ 0 0 763 - 20 + 19 @@ -443,6 +476,12 @@ QGraphicsView
diveplanner.h
+ + DivePlannerWidget + QWidget +
diveplanner.h
+ 1 +