summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp14
-rw-r--r--qt-ui/configuredivecomputerdialog.h22
-rw-r--r--qt-ui/configuredivecomputerdialog.ui125
-rw-r--r--qt-ui/mainwindow.cpp7
-rw-r--r--qt-ui/mainwindow.h2
-rw-r--r--qt-ui/mainwindow.ui7
-rw-r--r--subsurface.pro9
7 files changed, 183 insertions, 3 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
new file mode 100644
index 000000000..9aa2cfb94
--- /dev/null
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -0,0 +1,14 @@
+#include "configuredivecomputerdialog.h"
+#include "ui_configuredivecomputerdialog.h"
+
+ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::ConfigureDiveComputerDialog)
+{
+ ui->setupUi(this);
+}
+
+ConfigureDiveComputerDialog::~ConfigureDiveComputerDialog()
+{
+ delete ui;
+}
diff --git a/qt-ui/configuredivecomputerdialog.h b/qt-ui/configuredivecomputerdialog.h
new file mode 100644
index 000000000..b1f3924cf
--- /dev/null
+++ b/qt-ui/configuredivecomputerdialog.h
@@ -0,0 +1,22 @@
+#ifndef CONFIGUREDIVECOMPUTERDIALOG_H
+#define CONFIGUREDIVECOMPUTERDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+class ConfigureDiveComputerDialog;
+}
+
+class ConfigureDiveComputerDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit ConfigureDiveComputerDialog(QWidget *parent = 0);
+ ~ConfigureDiveComputerDialog();
+
+private:
+ Ui::ConfigureDiveComputerDialog *ui;
+};
+
+#endif // CONFIGUREDIVECOMPUTERDIALOG_H
diff --git a/qt-ui/configuredivecomputerdialog.ui b/qt-ui/configuredivecomputerdialog.ui
new file mode 100644
index 000000000..25d63007f
--- /dev/null
+++ b/qt-ui/configuredivecomputerdialog.ui
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ConfigureDiveComputerDialog</class>
+ <widget class="QDialog" name="ConfigureDiveComputerDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>362</width>
+ <height>375</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Configure Dive Computer</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Vendor</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Dive Computer</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QComboBox" name="vendor"/>
+ </item>
+ <item row="1" column="1">
+ <widget class="QComboBox" name="product"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Device or Mount Point</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QComboBox" name="device">
+ <property name="editable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="search">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QPushButton" name="retrieveDetails">
+ <property name="text">
+ <string>Retrieve available details:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTextBrowser" name="availableDetails"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3">
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancel">
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 1a4594bab..85b31608c 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -41,6 +41,7 @@
#include "worldmap-save.h"
#include "updatemanager.h"
#include "planner.h"
+#include "configuredivecomputerdialog.h"
#ifndef NO_PRINTING
#include <QPrintDialog>
#include "printdialog.h"
@@ -1287,6 +1288,12 @@ void MainWindow::on_actionExport_triggered()
diveLogExport.exec();
}
+void MainWindow::on_actionConfigure_Dive_Computer_triggered()
+{
+ ConfigureDiveComputerDialog *dcConfig = new ConfigureDiveComputerDialog(this);
+ dcConfig->show();
+}
+
void MainWindow::setEnabledToolbar(bool arg1)
{
QList<QToolButton*> toolBar; toolBar << ui.profCalcAllTissues << ui.profCalcCeiling
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 5c0ec8efa..b9c8e4682 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -143,6 +143,8 @@ slots:
void on_profTogglePicture_clicked(bool triggered);
void on_actionExport_triggered();
+ void on_actionConfigure_Dive_Computer_triggered();
+
protected:
void closeEvent(QCloseEvent *);
diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui
index ac72673c8..bd5581f64 100644
--- a/qt-ui/mainwindow.ui
+++ b/qt-ui/mainwindow.ui
@@ -681,6 +681,8 @@ p, li { white-space: pre-wrap; }
<addaction name="actionPrint"/>
<addaction name="actionPreferences"/>
<addaction name="separator"/>
+ <addaction name="actionConfigure_Dive_Computer"/>
+ <addaction name="separator"/>
<addaction name="actionRecent1"/>
<addaction name="actionRecent2"/>
<addaction name="actionRecent3"/>
@@ -1023,6 +1025,11 @@ p, li { white-space: pre-wrap; }
<string>Ctrl+E</string>
</property>
</action>
+ <action name="actionConfigure_Dive_Computer">
+ <property name="text">
+ <string>Configure Dive Computer</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>
diff --git a/subsurface.pro b/subsurface.pro
index 1857f8405..ca3c8abdf 100644
--- a/subsurface.pro
+++ b/subsurface.pro
@@ -86,7 +86,8 @@ HEADERS = \
qt-ui/updatemanager.h \
qt-ui/divelogexportdialog.h \
qt-ui/usersurvey.h \
- subsurfacesysinfo.h
+ subsurfacesysinfo.h \
+ qt-ui/configuredivecomputerdialog.h
android: HEADERS -= \
qt-ui/usermanual.h \
@@ -165,7 +166,8 @@ SOURCES = \
qt-ui/updatemanager.cpp \
qt-ui/divelogexportdialog.cpp \
qt-ui/usersurvey.cpp \
- subsurfacesysinfo.cpp
+ subsurfacesysinfo.cpp \
+ qt-ui/configuredivecomputerdialog.cpp
android: SOURCES += android.cpp
else: linux*: SOURCES += linux.c
@@ -196,7 +198,8 @@ FORMS = \
qt-ui/searchbar.ui \
qt-ui/divelogexportdialog.ui \
qt-ui/plannerSettings.ui \
- qt-ui/usersurvey.ui
+ qt-ui/usersurvey.ui \
+ qt-ui/configuredivecomputerdialog.ui
# Nether usermanual or printing is supported on android right now
android: FORMS -= qt-ui/printoptions.ui