summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 1eb741244..b60f668e2 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -26,6 +26,13 @@
#include "modeldelegates.h"
#include "models.h"
+static MainWindow* instance = 0;
+
+MainWindow* mainWindow()
+{
+ return instance;
+}
+
MainWindow::MainWindow() : ui(new Ui::MainWindow())
{
ui->setupUi(this);
@@ -39,6 +46,7 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow())
ui->ListWidget->reload();
ui->ListWidget->setFocus();
ui->globe->reload();
+ instance = this;
}
void MainWindow::current_dive_changed(int divenr)
@@ -465,3 +473,23 @@ void MainWindow::closeEvent(QCloseEvent *event)
event->accept();
writeSettings();
}
+
+DiveListView* MainWindow::dive_list()
+{
+ return ui->ListWidget;
+}
+
+GlobeGPS* MainWindow::globe()
+{
+ return ui->globe;
+}
+
+ProfileGraphicsView* MainWindow::graphics()
+{
+ return ui->ProfileWidget;
+}
+
+MainTab* MainWindow::information()
+{
+ return ui->InfoWidget;
+}