summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveInformation.cpp36
-rw-r--r--desktop-widgets/tab-widgets/TabDiveInformation.h4
2 files changed, 40 insertions, 0 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp
index a00913086..5edb4811c 100644
--- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp
@@ -192,6 +192,10 @@ void TabDiveInformation::updateData()
updateMode(current_dive);
updateSalinity();
ui->visibility->setCurrentStars(current_dive->visibility);
+ ui->wavesize->setCurrentStars(current_dive->wavesize);
+ ui->current->setCurrentStars(current_dive->current);
+ ui->surge->setCurrentStars(current_dive->surge);
+ ui->chill->setCurrentStars(current_dive->chill);
if (prefs.extraEnvironmentalDefault)
showCurrentWidget(true, 2); // Show current star widget at 3rd position
else
@@ -208,6 +212,14 @@ void TabDiveInformation::divesChanged(const QVector<dive *> &dives, DiveField fi
if (field.visibility)
ui->visibility->setCurrentStars(current_dive->visibility);
+ if (field.wavesize)
+ ui->wavesize->setCurrentStars(current_dive->wavesize);
+ if (field.current)
+ ui->current->setCurrentStars(current_dive->current);
+ if (field.surge)
+ ui->surge->setCurrentStars(current_dive->surge);
+ if (field.chill)
+ ui->chill->setCurrentStars(current_dive->chill);
if (field.mode)
updateMode(current_dive);
if (field.duration || field.depth || field.mode)
@@ -229,6 +241,30 @@ void TabDiveInformation::on_visibility_valueChanged(int value)
divesEdited(Command::editVisibility(value, false));
}
+void TabDiveInformation::on_wavesize_valueChanged(int value)
+{
+ if (current_dive)
+ divesEdited(Command::editWaveSize(value, false));
+}
+
+void TabDiveInformation::on_current_valueChanged(int value)
+{
+ if (current_dive)
+ divesEdited(Command::editCurrent(value, false));
+}
+
+void TabDiveInformation::on_surge_valueChanged(int value)
+{
+ if (current_dive)
+ divesEdited(Command::editSurge(value, false));
+}
+
+void TabDiveInformation::on_chill_valueChanged(int value)
+{
+ if (current_dive)
+ divesEdited(Command::editChill(value, false));
+}
+
void TabDiveInformation::updateMode(struct dive *d)
{
ui->diveType->setCurrentIndex(get_dive_dc(d, dc_number)->divemode);
diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.h b/desktop-widgets/tab-widgets/TabDiveInformation.h
index 51ec2381a..e851fe2d3 100644
--- a/desktop-widgets/tab-widgets/TabDiveInformation.h
+++ b/desktop-widgets/tab-widgets/TabDiveInformation.h
@@ -22,6 +22,10 @@ private slots:
void on_atmPressVal_editingFinished();
void on_atmPressType_currentIndexChanged(int index);
void on_visibility_valueChanged(int value);
+ void on_wavesize_valueChanged(int value);
+ void on_current_valueChanged(int value);
+ void on_surge_valueChanged(int value);
+ void on_chill_valueChanged(int value);
void on_airtemp_editingFinished();
void on_watertemp_editingFinished();
private: