summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/preferences/CMakeLists.txt3
-rw-r--r--desktop-widgets/preferences/preferences_dc.cpp2
-rw-r--r--desktop-widgets/preferences/preferences_defaults.cpp66
-rw-r--r--desktop-widgets/preferences/preferences_defaults.h4
-rw-r--r--desktop-widgets/preferences/preferences_defaults.ui114
-rw-r--r--desktop-widgets/preferences/preferences_equipment.cpp2
-rw-r--r--desktop-widgets/preferences/preferences_georeference.cpp2
-rw-r--r--desktop-widgets/preferences/preferences_graph.cpp4
-rw-r--r--desktop-widgets/preferences/preferences_graph.ui18
-rw-r--r--desktop-widgets/preferences/preferences_language.cpp2
-rw-r--r--desktop-widgets/preferences/preferences_log.cpp90
-rw-r--r--desktop-widgets/preferences/preferences_log.h29
-rw-r--r--desktop-widgets/preferences/preferences_log.ui199
-rw-r--r--desktop-widgets/preferences/preferences_media.cpp2
-rw-r--r--desktop-widgets/preferences/preferences_network.cpp2
-rw-r--r--desktop-widgets/preferences/preferences_units.cpp2
-rw-r--r--desktop-widgets/preferences/preferencesdialog.cpp2
17 files changed, 335 insertions, 208 deletions
diff --git a/desktop-widgets/preferences/CMakeLists.txt b/desktop-widgets/preferences/CMakeLists.txt
index cec31e6f3..2298db6b9 100644
--- a/desktop-widgets/preferences/CMakeLists.txt
+++ b/desktop-widgets/preferences/CMakeLists.txt
@@ -15,6 +15,7 @@ set(SUBSURFACE_PREFERENCES_UI
preferences_media.ui
preferences_equipment.ui
preferences_dc.ui
+ preferences_log.ui
)
qt5_wrap_ui(SUBSURFACE_PREFERENCES_UI_HDRS ${SUBSURFACE_PREFERENCES_UI})
@@ -38,6 +39,8 @@ set(SUBSURFACE_PREFERENCES_LIB_SRCS
preferences_graph.h
preferences_language.cpp
preferences_language.h
+ preferences_log.cpp
+ preferences_log.h
preferences_media.cpp
preferences_media.h
preferences_network.cpp
diff --git a/desktop-widgets/preferences/preferences_dc.cpp b/desktop-widgets/preferences/preferences_dc.cpp
index b88881bd8..c39754497 100644
--- a/desktop-widgets/preferences/preferences_dc.cpp
+++ b/desktop-widgets/preferences/preferences_dc.cpp
@@ -10,7 +10,7 @@
#include <QProcess>
#include <QMessageBox>
-PreferencesDc::PreferencesDc(): AbstractPreferencesWidget(tr("Dive download"), QIcon(":preferences-dc-icon"), 0 ), ui(new Ui::PreferencesDc())
+PreferencesDc::PreferencesDc(): AbstractPreferencesWidget(tr("Dive download"), QIcon(":preferences-dc-icon"), 3 ), ui(new Ui::PreferencesDc())
{
ui->setupUi(this);
const QSize BUTTON_SIZE = QSize(200, 22);
diff --git a/desktop-widgets/preferences/preferences_defaults.cpp b/desktop-widgets/preferences/preferences_defaults.cpp
index 2a76fe662..dbf1091e4 100644
--- a/desktop-widgets/preferences/preferences_defaults.cpp
+++ b/desktop-widgets/preferences/preferences_defaults.cpp
@@ -11,7 +11,7 @@
#include <QProcess>
#include <QMessageBox>
-PreferencesDefaults::PreferencesDefaults(): AbstractPreferencesWidget(tr("General"), QIcon(":preferences-other-icon"), 0 ), ui(new Ui::PreferencesDefaults())
+PreferencesDefaults::PreferencesDefaults(): AbstractPreferencesWidget(tr("Display"), QIcon(":preferences-display-icon"), 0 ), ui(new Ui::PreferencesDefaults())
{
ui->setupUi(this);
}
@@ -21,80 +21,16 @@ PreferencesDefaults::~PreferencesDefaults()
delete ui;
}
-void PreferencesDefaults::on_chooseFile_clicked()
-{
- QFileInfo fi(system_default_filename());
- QString choosenFileName = QFileDialog::getOpenFileName(this, tr("Open default log file"), fi.absolutePath(), tr("Subsurface files") + " (*.ssrf *.xml)");
-
- if (!choosenFileName.isEmpty())
- ui->defaultfilename->setText(choosenFileName);
-}
-
-void PreferencesDefaults::on_btnUseDefaultFile_toggled(bool toggle)
-{
- if (toggle) {
- ui->defaultfilename->setText(system_default_filename());
- ui->defaultfilename->setEnabled(false);
- } else {
- ui->defaultfilename->setEnabled(true);
- }
-}
-
-void PreferencesDefaults::on_localDefaultFile_toggled(bool toggle)
-{
- ui->defaultfilename->setEnabled(toggle);
- ui->btnUseDefaultFile->setEnabled(toggle);
- ui->chooseFile->setEnabled(toggle);
-}
-
-void PreferencesDefaults::on_resetSettings_clicked()
-{
- // apparently this button was never hooked up?
-}
-
void PreferencesDefaults::refreshSettings()
{
ui->font->setCurrentFont(qPrefDisplay::divelist_font());
ui->fontsize->setValue(qPrefDisplay::font_size());
- ui->defaultfilename->setText(qPrefGeneral::default_filename());
- ui->noDefaultFile->setChecked(qPrefGeneral::default_file_behavior() == NO_DEFAULT_FILE);
- ui->cloudDefaultFile->setChecked(qPrefGeneral::default_file_behavior() == CLOUD_DEFAULT_FILE);
- ui->localDefaultFile->setChecked(qPrefGeneral::default_file_behavior() == LOCAL_DEFAULT_FILE);
-
- ui->displayinvalid->setChecked(qPrefDisplay::display_invalid_dives());
ui->velocitySlider->setValue(qPrefDisplay::animation_speed());
- ui->btnUseDefaultFile->setChecked(qPrefGeneral::use_default_file());
-
- if (qPrefCloudStorage::cloud_verification_status() == qPrefCloudStorage::CS_VERIFIED) {
- ui->cloudDefaultFile->setEnabled(true);
- } else {
- if (ui->cloudDefaultFile->isChecked())
- ui->noDefaultFile->setChecked(true);
- ui->cloudDefaultFile->setEnabled(false);
- }
-
- ui->defaultfilename->setEnabled(qPrefGeneral::default_file_behavior() == LOCAL_DEFAULT_FILE);
- ui->btnUseDefaultFile->setEnabled(qPrefGeneral::default_file_behavior() == LOCAL_DEFAULT_FILE);
- ui->chooseFile->setEnabled(qPrefGeneral::default_file_behavior() == LOCAL_DEFAULT_FILE);
-
- ui->extraEnvironmentalDefault->setChecked(prefs.extraEnvironmentalDefault);
}
void PreferencesDefaults::syncSettings()
{
- auto general = qPrefGeneral::instance();
- general->set_default_filename(ui->defaultfilename->text());
- general->set_use_default_file(ui->btnUseDefaultFile->isChecked());
- if (ui->noDefaultFile->isChecked())
- general->set_default_file_behavior(NO_DEFAULT_FILE);
- else if (ui->localDefaultFile->isChecked())
- general->set_default_file_behavior(LOCAL_DEFAULT_FILE);
- else if (ui->cloudDefaultFile->isChecked())
- general->set_default_file_behavior(CLOUD_DEFAULT_FILE);
-
qPrefDisplay::set_divelist_font(ui->font->currentFont().toString());
qPrefDisplay::set_font_size(ui->fontsize->value());
- qPrefDisplay::set_display_invalid_dives(ui->displayinvalid->isChecked());
qPrefDisplay::set_animation_speed(ui->velocitySlider->value());
- qPrefGeneral::set_extraEnvironmentalDefault(ui->extraEnvironmentalDefault->isChecked());
}
diff --git a/desktop-widgets/preferences/preferences_defaults.h b/desktop-widgets/preferences/preferences_defaults.h
index ce0a8e2e1..cc92ade40 100644
--- a/desktop-widgets/preferences/preferences_defaults.h
+++ b/desktop-widgets/preferences/preferences_defaults.h
@@ -17,10 +17,6 @@ public:
void refreshSettings() override;
void syncSettings() override;
public slots:
- void on_chooseFile_clicked();
- void on_btnUseDefaultFile_toggled(bool toggled);
- void on_localDefaultFile_toggled(bool toggled);
- void on_resetSettings_clicked();
private:
Ui::PreferencesDefaults *ui;
diff --git a/desktop-widgets/preferences/preferences_defaults.ui b/desktop-widgets/preferences/preferences_defaults.ui
index f33cd099f..3d9e45c98 100644
--- a/desktop-widgets/preferences/preferences_defaults.ui
+++ b/desktop-widgets/preferences/preferences_defaults.ui
@@ -46,101 +46,7 @@
</layout>
</widget>
</item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>Default file</string>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <property name="horizontalSpacing">
- <number>5</number>
- </property>
- <property name="verticalSpacing">
- <number>5</number>
- </property>
- <property name="margin">
- <number>5</number>
- </property>
- <item row="0" column="0">
- <widget class="QLabel" name="defaultDiveLogFileLabel">
- <property name="text">
- <string>Default dive log file</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <layout class="QHBoxLayout" name="defaultFileBehaviorLayout">
- <item>
- <widget class="QRadioButton" name="noDefaultFile">
- <property name="text">
- <string>&amp;No default file</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="localDefaultFile">
- <property name="text">
- <string>&amp;Local default file</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QRadioButton" name="cloudDefaultFile">
- <property name="text">
- <string>Clo&amp;ud storage default file</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>Local dive log file</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLineEdit" name="defaultfilename"/>
- </item>
- <item>
- <widget class="QToolButton" name="btnUseDefaultFile">
- <property name="text">
- <string>Use default</string>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="chooseFile">
- <property name="text">
- <string>...</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_10">
- <property name="text">
- <string>Display invalid</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="displayinvalid">
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
+
<item>
<widget class="QGroupBox" name="groupBox_7">
<property name="title">
@@ -177,6 +83,7 @@
</layout>
</widget>
</item>
+
<item>
<widget class="QPushButton" name="resetSettings">
<property name="text">
@@ -184,22 +91,7 @@
</property>
</widget>
</item>
- <item>
- <widget class="QGroupBox" name="groupBox_extra_star_widgets">
- <property name="title">
- <string>Environmental parameters in Information tab</string>
- </property>
- <layout class="QHBoxLayout" name="extraWidgetLayout">
- <item>
- <widget class="QCheckBox" name="extraEnvironmentalDefault">
- <property name="text">
- <string>Show extended range of environmental paramaters</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
+
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
diff --git a/desktop-widgets/preferences/preferences_equipment.cpp b/desktop-widgets/preferences/preferences_equipment.cpp
index a446a279b..bd5ac4158 100644
--- a/desktop-widgets/preferences/preferences_equipment.cpp
+++ b/desktop-widgets/preferences/preferences_equipment.cpp
@@ -11,7 +11,7 @@
#include "qt-models/models.h"
-PreferencesEquipment::PreferencesEquipment() : AbstractPreferencesWidget(tr("Equipment"), QIcon(":preferences-equipment-icon"), 4)
+PreferencesEquipment::PreferencesEquipment() : AbstractPreferencesWidget(tr("Equipment"), QIcon(":preferences-equipment-icon"), 5)
{
ui = new Ui::PreferencesEquipment();
ui->setupUi(this);
diff --git a/desktop-widgets/preferences/preferences_georeference.cpp b/desktop-widgets/preferences/preferences_georeference.cpp
index 40196e44f..25433964f 100644
--- a/desktop-widgets/preferences/preferences_georeference.cpp
+++ b/desktop-widgets/preferences/preferences_georeference.cpp
@@ -7,7 +7,7 @@
#include <ctime>
-PreferencesGeoreference::PreferencesGeoreference() : AbstractPreferencesWidget(tr("Georeference"), QIcon(":geotag-icon"), 9)
+PreferencesGeoreference::PreferencesGeoreference() : AbstractPreferencesWidget(tr("Georeference"), QIcon(":geotag-icon"), 8)
{
ui = new Ui::PreferencesGeoreference();
ui->setupUi(this);
diff --git a/desktop-widgets/preferences/preferences_graph.cpp b/desktop-widgets/preferences/preferences_graph.cpp
index cdead91e0..b7fd5b4b9 100644
--- a/desktop-widgets/preferences/preferences_graph.cpp
+++ b/desktop-widgets/preferences/preferences_graph.cpp
@@ -9,7 +9,7 @@
#include "qt-models/models.h"
#include "core/deco.h"
-PreferencesGraph::PreferencesGraph() : AbstractPreferencesWidget(tr("Profile"), QIcon(":graph-icon"), 5)
+PreferencesGraph::PreferencesGraph() : AbstractPreferencesWidget(tr("Tech setup"), QIcon(":graph-icon"), 7)
{
ui = new Ui::PreferencesGraph();
ui->setupUi(this);
@@ -49,7 +49,6 @@ void PreferencesGraph::refreshSettings()
ui->psro2rate->setValue(prefs.o2consumption / 1000.0);
ui->pscrfactor->setValue(lrint(1000.0 / prefs.pscr_ratio));
- ui->show_average_depth->setChecked(prefs.show_average_depth);
ui->show_icd->setChecked(prefs.show_icd);
}
@@ -75,7 +74,6 @@ void PreferencesGraph::syncSettings()
qPrefTechnicalDetails::set_show_ccr_setpoint(ui->show_ccr_setpoint->isChecked());
qPrefTechnicalDetails::set_show_ccr_sensors(ui->show_ccr_sensors->isChecked());
qPrefTechnicalDetails::set_show_scr_ocpo2(ui->show_scr_ocpo2->isChecked());
- qPrefTechnicalDetails::set_show_average_depth(ui->show_average_depth->isChecked());
qPrefTechnicalDetails::set_show_icd(ui->show_icd->isChecked());
qPrefTechnicalDetails::set_display_deco_mode(ui->vpmb->isChecked() ? VPMB : BUEHLMANN);
}
diff --git a/desktop-widgets/preferences/preferences_graph.ui b/desktop-widgets/preferences/preferences_graph.ui
index 9fd3a11c7..d2633ff6b 100644
--- a/desktop-widgets/preferences/preferences_graph.ui
+++ b/desktop-widgets/preferences/preferences_graph.ui
@@ -349,22 +349,6 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_6">
- <property name="title">
- <string>Misc</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0" colspan="2">
- <widget class="QCheckBox" name="show_average_depth">
- <property name="text">
- <string>Show mean depth in Profile</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -398,8 +382,6 @@
<tabstop>buehlmann</tabstop>
<tabstop>gflow</tabstop>
<tabstop>gfhigh</tabstop>
- <tabstop>display_unused_tanks</tabstop>
- <tabstop>show_average_depth</tabstop>
</tabstops>
<resources/>
<connections/>
diff --git a/desktop-widgets/preferences/preferences_language.cpp b/desktop-widgets/preferences/preferences_language.cpp
index 76763be14..9de6efb8f 100644
--- a/desktop-widgets/preferences/preferences_language.cpp
+++ b/desktop-widgets/preferences/preferences_language.cpp
@@ -10,7 +10,7 @@
#include "qt-models/models.h"
-PreferencesLanguage::PreferencesLanguage() : AbstractPreferencesWidget(tr("Language"), QIcon(":preferences-desktop-locale-icon"), 4)
+PreferencesLanguage::PreferencesLanguage() : AbstractPreferencesWidget(tr("Language"), QIcon(":preferences-desktop-locale-icon"), 1)
{
ui = new Ui::PreferencesLanguage();
ui->setupUi(this);
diff --git a/desktop-widgets/preferences/preferences_log.cpp b/desktop-widgets/preferences/preferences_log.cpp
new file mode 100644
index 000000000..9025945e3
--- /dev/null
+++ b/desktop-widgets/preferences/preferences_log.cpp
@@ -0,0 +1,90 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "preferences_log.h"
+#include "ui_preferences_log.h"
+#include "core/dive.h"
+#include "core/settings/qPrefLog.h"
+#include "core/settings/qPrefDisplay.h"
+#include "core/settings/qPrefCloudStorage.h"
+#include "core/settings/qPrefDiveComputer.h"
+
+#include <QFileDialog>
+#include <QProcess>
+#include <QMessageBox>
+
+PreferencesLog::PreferencesLog(): AbstractPreferencesWidget(tr(" Dive log"), QIcon(":preferences-log-icon"), 4 ), ui(new Ui::PreferencesLog())
+{
+ ui->setupUi(this);
+}
+
+PreferencesLog::~PreferencesLog()
+{
+ delete ui;
+}
+
+void PreferencesLog::on_chooseFile_clicked()
+{
+ QFileInfo fi(system_default_filename());
+ QString choosenFileName = QFileDialog::getOpenFileName(this, tr("Open default log file"), fi.absolutePath(), tr("Subsurface files") + " (*.ssrf *.xml)");
+
+ if (!choosenFileName.isEmpty())
+ ui->defaultfilename->setText(choosenFileName);
+}
+
+void PreferencesLog::on_btnUseDefaultFile_toggled(bool toggle)
+{
+ if (toggle) {
+ ui->defaultfilename->setText(system_default_filename());
+ ui->defaultfilename->setEnabled(false);
+ } else {
+ ui->defaultfilename->setEnabled(true);
+ }
+}
+
+void PreferencesLog::on_localDefaultFile_toggled(bool toggle)
+{
+ ui->defaultfilename->setEnabled(toggle);
+ ui->btnUseDefaultFile->setEnabled(toggle);
+ ui->chooseFile->setEnabled(toggle);
+}
+
+void PreferencesLog::refreshSettings()
+{
+ ui->defaultfilename->setText(qPrefLog::default_filename());
+ ui->noDefaultFile->setChecked(qPrefLog::default_file_behavior() == NO_DEFAULT_FILE);
+ ui->cloudDefaultFile->setChecked(qPrefLog::default_file_behavior() == CLOUD_DEFAULT_FILE);
+ ui->localDefaultFile->setChecked(qPrefLog::default_file_behavior() == LOCAL_DEFAULT_FILE);
+
+ ui->btnUseDefaultFile->setChecked(qPrefLog::use_default_file());
+
+ if (qPrefCloudStorage::cloud_verification_status() == qPrefCloudStorage::CS_VERIFIED) {
+ ui->cloudDefaultFile->setEnabled(true);
+ } else {
+ if (ui->cloudDefaultFile->isChecked())
+ ui->noDefaultFile->setChecked(true);
+ ui->cloudDefaultFile->setEnabled(false);
+ }
+
+ ui->defaultfilename->setEnabled(qPrefLog::default_file_behavior() == LOCAL_DEFAULT_FILE);
+ ui->btnUseDefaultFile->setEnabled(qPrefLog::default_file_behavior() == LOCAL_DEFAULT_FILE);
+ ui->chooseFile->setEnabled(qPrefLog::default_file_behavior() == LOCAL_DEFAULT_FILE);
+ ui->show_average_depth->setChecked(prefs.show_average_depth);
+ ui->displayinvalid->setChecked(qPrefDisplay::display_invalid_dives());
+ ui->extraEnvironmentalDefault->setChecked(prefs.extraEnvironmentalDefault);
+}
+
+void PreferencesLog::syncSettings()
+{
+ auto log = qPrefLog::instance();
+ log->set_default_filename(ui->defaultfilename->text());
+ log->set_use_default_file(ui->btnUseDefaultFile->isChecked());
+ if (ui->noDefaultFile->isChecked())
+ log->set_default_file_behavior(NO_DEFAULT_FILE);
+ else if (ui->localDefaultFile->isChecked())
+ log->set_default_file_behavior(LOCAL_DEFAULT_FILE);
+ else if (ui->cloudDefaultFile->isChecked())
+ log->set_default_file_behavior(CLOUD_DEFAULT_FILE);
+
+ qPrefLog::set_show_average_depth(ui->show_average_depth->isChecked());
+ qPrefDisplay::set_display_invalid_dives(ui->displayinvalid->isChecked());
+ qPrefLog::set_extraEnvironmentalDefault(ui->extraEnvironmentalDefault->isChecked());
+}
diff --git a/desktop-widgets/preferences/preferences_log.h b/desktop-widgets/preferences/preferences_log.h
new file mode 100644
index 000000000..7382aae2b
--- /dev/null
+++ b/desktop-widgets/preferences/preferences_log.h
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+#ifndef PREFERENCES_LOG_H
+#define PREFERENCES_LOG_H
+
+#include "abstractpreferenceswidget.h"
+#include "core/pref.h"
+
+namespace Ui {
+ class PreferencesLog;
+}
+
+class PreferencesLog : public AbstractPreferencesWidget {
+ Q_OBJECT
+public:
+ PreferencesLog();
+ ~PreferencesLog();
+ void refreshSettings() override;
+ void syncSettings() override;
+public slots:
+ void on_chooseFile_clicked();
+ void on_btnUseDefaultFile_toggled(bool toggled);
+ void on_localDefaultFile_toggled(bool toggled);
+
+private:
+ Ui::PreferencesLog *ui;
+};
+
+
+#endif
diff --git a/desktop-widgets/preferences/preferences_log.ui b/desktop-widgets/preferences/preferences_log.ui
new file mode 100644
index 000000000..8dd76ad4c
--- /dev/null
+++ b/desktop-widgets/preferences/preferences_log.ui
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>PreferencesLog</class>
+ <widget class="QWidget" name="PreferencesLog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>561</width>
+ <height>558</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+
+ <item>
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>DIVE LOG</string>
+ </property>
+ </widget>
+ </item>
+
+ <item>
+ <widget class="QGroupBox" name="groupBox_3">
+ <property name="title">
+ <string></string>
+ </property>
+ <layout class="QFormLayout" name="formLayout_2">
+ <property name="horizontalSpacing">
+ <number>5</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>5</number>
+ </property>
+ <property name="margin">
+ <number>5</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QLabel" name="defaultDiveLogFileLabel">
+ <property name="text">
+ <string>Default dive log file</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <layout class="QHBoxLayout" name="defaultFileBehaviorLayout">
+ <item>
+ <widget class="QRadioButton" name="noDefaultFile">
+ <property name="text">
+ <string>&amp;No default file</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="localDefaultFile">
+ <property name="text">
+ <string>&amp;Local default file</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QRadioButton" name="cloudDefaultFile">
+ <property name="text">
+ <string>Clo&amp;ud storage default file</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Local dive log file</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLineEdit" name="defaultfilename"/>
+ </item>
+ <item>
+ <widget class="QToolButton" name="btnUseDefaultFile">
+ <property name="text">
+ <string>Use default</string>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="chooseFile">
+ <property name="text">
+ <string>...</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+
+ <item>
+ <widget class="QCheckBox" name="displayinvalid">
+ <property name="text">
+ <string>In the Dive List, show dives that you have marked as invalid, e.g. pool dives</string>
+ </property>
+ </widget>
+ </item>
+
+ <item>
+ <widget class="QCheckBox" name="extraEnvironmentalDefault">
+ <property name="text">
+ <string>In the Information tab, show tools for recording wave height, surge and chill during a dive</string>
+ </property>
+ </widget>
+ </item>
+
+ <item>
+ <widget class="QCheckBox" name="show_average_depth">
+ <property name="text">
+ <string>In the Dive Profile, show mean depth</string>
+ </property>
+ </widget>
+ </item>
+
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>0</width>
+ <height>195</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+
+ <resources/>
+ <connections>
+ <connection>
+ <sender>btnUseDefaultFile</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>chooseFile</receiver>
+ <slot>setHidden(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>462</x>
+ <y>136</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>528</x>
+ <y>145</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>velocitySlider</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>velocitySpinBox</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>437</x>
+ <y>299</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>531</x>
+ <y>301</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>velocitySpinBox</sender>
+ <signal>valueChanged(int)</signal>
+ <receiver>velocitySlider</receiver>
+ <slot>setValue(int)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>547</x>
+ <y>274</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>482</x>
+ <y>276</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/desktop-widgets/preferences/preferences_media.cpp b/desktop-widgets/preferences/preferences_media.cpp
index 47a6285dd..14cdfe49c 100644
--- a/desktop-widgets/preferences/preferences_media.cpp
+++ b/desktop-widgets/preferences/preferences_media.cpp
@@ -12,7 +12,7 @@
#include "qt-models/models.h"
-PreferencesMedia::PreferencesMedia() : AbstractPreferencesWidget(tr("Media"), QIcon(":preferences-media-icon"), 8)
+PreferencesMedia::PreferencesMedia() : AbstractPreferencesWidget(tr("Media"), QIcon(":preferences-media-icon"), 6)
{
ui = new Ui::PreferencesMedia();
ui->setupUi(this);
diff --git a/desktop-widgets/preferences/preferences_network.cpp b/desktop-widgets/preferences/preferences_network.cpp
index 8a48b5a25..2b2f13ed1 100644
--- a/desktop-widgets/preferences/preferences_network.cpp
+++ b/desktop-widgets/preferences/preferences_network.cpp
@@ -6,7 +6,7 @@
#include "core/settings/qPrefProxy.h"
#include <QNetworkProxy>
-PreferencesNetwork::PreferencesNetwork() : AbstractPreferencesWidget(tr("Network"),QIcon(":preferences-system-network-icon"), 9), ui(new Ui::PreferencesNetwork())
+PreferencesNetwork::PreferencesNetwork() : AbstractPreferencesWidget(tr("Network"),QIcon(":preferences-system-network-icon"), 10), ui(new Ui::PreferencesNetwork())
{
ui->setupUi(this);
diff --git a/desktop-widgets/preferences/preferences_units.cpp b/desktop-widgets/preferences/preferences_units.cpp
index eaef36b39..db23efd37 100644
--- a/desktop-widgets/preferences/preferences_units.cpp
+++ b/desktop-widgets/preferences/preferences_units.cpp
@@ -4,7 +4,7 @@
#include "core/qthelper.h"
#include "core/settings/qPrefUnit.h"
-PreferencesUnits::PreferencesUnits(): AbstractPreferencesWidget(tr("Units"),QIcon(":units-icon"),1), ui(new Ui::PreferencesUnits())
+PreferencesUnits::PreferencesUnits(): AbstractPreferencesWidget(tr("Units"), QIcon(":units-icon"), 2), ui(new Ui::PreferencesUnits())
{
ui->setupUi(this);
}
diff --git a/desktop-widgets/preferences/preferencesdialog.cpp b/desktop-widgets/preferences/preferencesdialog.cpp
index f58829cc6..7602a3817 100644
--- a/desktop-widgets/preferences/preferencesdialog.cpp
+++ b/desktop-widgets/preferences/preferencesdialog.cpp
@@ -12,6 +12,7 @@
#include "preferences_equipment.h"
#include "preferences_media.h"
#include "preferences_dc.h"
+#include "preferences_log.h"
#include "core/qthelper.h"
@@ -73,6 +74,7 @@ PreferencesDialog::PreferencesDialog()
addPreferencePage(new PreferencesEquipment());
addPreferencePage(new PreferencesMedia());
addPreferencePage(new PreferencesDc());
+ addPreferencePage(new PreferencesLog());
refreshPages();