summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-09-18 14:31:15 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-18 11:59:53 -0500
commit7d9c1e9ee4e4e251f3a3b5e5901818fb5aaa340e (patch)
treeb85194d3ee74bc21f6e0c116904dc0f4303abe6d /qt-ui
parent93d6eb13977aaf1e17fbb1861a2df001b67b8303 (diff)
downloadsubsurface-7d9c1e9ee4e4e251f3a3b5e5901818fb5aaa340e.tar.gz
Show sample time in the mouseover.
This is really nice to have when looking at specific coutures of a dive or events. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp1
-rw-r--r--qt-ui/preferences.cpp3
-rw-r--r--qt-ui/preferences.ui11
3 files changed, 15 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 44cc9e60b..8d6315d86 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -559,6 +559,7 @@ void MainWindow::readSettings()
GET_INT("gflow", gflow);
GET_INT("gfhigh", gfhigh);
set_gf(prefs.gflow, prefs.gfhigh);
+ GET_BOOL("show_time", show_time);
s.endGroup();
s.beginGroup("Display");
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index 19fa169e4..f206224a8 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -74,6 +74,7 @@ void PreferencesDialog::setUiFromPrefs()
ui->fontsize->setValue(prefs.font_size);
ui->defaultfilename->setText(prefs.default_filename);
ui->displayinvalid->setChecked(prefs.show_invalid);
+ ui->show_time->setChecked(prefs.show_time);
}
void PreferencesDialog::restorePrefs()
@@ -114,6 +115,7 @@ void PreferencesDialog::setPrefsFromUi()
prefs.font_size = ui->fontsize->value();
prefs.default_filename = strdup(ui->defaultfilename->text().toUtf8().data());
prefs.display_invalid_dives = ui->displayinvalid->isChecked();
+ SP(show_time, ui->show_time);
}
#define SB(V, B) s.setValue(V, (int)(B->isChecked() ? 1 : 0))
@@ -139,6 +141,7 @@ void PreferencesDialog::syncSettings()
SB("calcalltissues", ui->all_tissues);
s.setValue("gflow", ui->gflow->value());
s.setValue("gfhigh", ui->gfhigh->value());
+ SB("show_time", ui->show_time);
s.endGroup();
// Units
diff --git a/qt-ui/preferences.ui b/qt-ui/preferences.ui
index 2ecd0963c..55076235d 100644
--- a/qt-ui/preferences.ui
+++ b/qt-ui/preferences.ui
@@ -686,6 +686,17 @@
</item>
</layout>
</item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_11">
+ <item>
+ <widget class="QCheckBox" name="show_time">
+ <property name="text">
+ <string>Show time</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
</layout>
</widget>
</item>