diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 799e87c42..e8cca8280 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -170,13 +170,13 @@ void DivePlannerGraphics::createDecoStops()
void DivePlannerGraphics::resizeEvent(QResizeEvent* event)
{
QGraphicsView::resizeEvent(event);
- fitInView(sceneRect(), Qt::KeepAspectRatio);
+ fitInView(sceneRect(), Qt::IgnoreAspectRatio);
}
void DivePlannerGraphics::showEvent(QShowEvent* event)
{
QGraphicsView::showEvent(event);
- fitInView(sceneRect(), Qt::KeepAspectRatio);
+ fitInView(sceneRect(), Qt::IgnoreAspectRatio);
}
void DivePlannerGraphics::mouseMoveEvent(QMouseEvent* event)
@@ -349,22 +349,6 @@ qreal Ruler::posAtValue(qreal value)
return retValue;
}
-DivePlanner::DivePlanner() : ui(new Ui::DivePlanner())
-{
- ui->setupUi(this);
-}
-
-struct dive* DivePlanner::getDive()
-{
- return 0;
-}
-
-DivePlanner* DivePlanner::instance()
-{
- static DivePlanner *self = new DivePlanner();
- return self;
-}
-
double Ruler::maximum() const
{
return max;
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 8669217a1..4029a6875 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -90,18 +90,4 @@ private:
QPointF lastValidPos;
};
-namespace Ui{
- class DivePlanner;
-}
-
-class DivePlanner : public QDialog{
- Q_OBJECT
-public:
- static DivePlanner *instance();
- struct dive* getDive();
-
-private:
- DivePlanner();
- Ui::DivePlanner *ui;
-};
#endif
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 3f16b50e5..66bebc6c7 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -223,11 +223,12 @@ void MainWindow::on_actionPrint_triggered()
void MainWindow::on_actionDivePlanner_triggered()
{
- DivePlanner *planner = DivePlanner::instance();
- if (planner->exec() == QDialog::Accepted){
- struct dive *d = planner->getDive();
- qDebug() << "Finish me.";
- }
+ ui->stackedWidget->setCurrentIndex(1);
+}
+
+void MainWindow::showProfile()
+{
+ ui->stackedWidget->setCurrentIndex(0);
}
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 4890cb2ef..013c0dca7 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -48,8 +48,6 @@ public:
void setTitle(enum MainWindowTitleFormat format);
private slots:
-
-
/* file menu action */
void on_actionNew_triggered();
void on_actionOpen_triggered();
@@ -100,6 +98,7 @@ protected:
public slots:
void readSettings();
void refreshDisplay();
+ void showProfile();
private:
Ui::MainWindow *ui;
diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui
index b1274b8ea..731013538 100644
--- a/qt-ui/mainwindow.ui
+++ b/qt-ui/mainwindow.ui
@@ -14,8 +14,8 @@
MainWindow
-
- -
+
+
-
Qt::Vertical
@@ -25,7 +25,37 @@
Qt::Horizontal
-
+
+
+ 0
+
+
+
+
+ 0
+
+
+ 0
+
+
-
+
+
+
+
+
+
+
+ 0
+
+
+ 0
+
+ -
+
+
+
+
+
@@ -92,8 +122,11 @@
- -
-
+
-
+
+ mainSplitter
+ mainSplitter
+
@@ -103,7 +136,7 @@
0
0
763
- 18
+ 20