diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-02-04 13:59:20 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-04 12:16:49 -0800 |
commit | 74b542ee60887c3fda348212a0b35720b6e49548 (patch) | |
tree | 1512f5d9c0f4e6c37ee2bfb3761bc313d68135d4 /desktop-widgets | |
parent | ba570c9eea3645583b4b60806ce0c3f49c4dc65a (diff) | |
download | subsurface-74b542ee60887c3fda348212a0b35720b6e49548.tar.gz |
Initial response to entering duration or depth
This marks the UI as modified and updates the maxdepth of the dive; it
ignores changes to the duration, doesn't modify the profile, so it's
nowhere near ready.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/maintab.cpp | 16 | ||||
-rw-r--r-- | desktop-widgets/maintab.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp index 8b24710a0..0b69fcdea 100644 --- a/desktop-widgets/maintab.cpp +++ b/desktop-widgets/maintab.cpp @@ -1237,6 +1237,22 @@ void MainTab::on_divemaster_textChanged() markChangedWidget(ui.divemaster); } +void MainTab::on_duration_textChanged(const QString &text) +{ + if (editMode == IGNORE || acceptingEdit == true) + return; + qDebug() << "duration text changed"; +} + +void MainTab::on_depth_textChanged(const QString &text) +{ + if (editMode == IGNORE || acceptingEdit == true) + return; + displayed_dive.maxdepth.mm = parseLengthToMm(text); + markChangedWidget(ui.depth); + qDebug() << "depth text changed to" << displayed_dive.maxdepth.mm << "mm"; +} + void MainTab::on_airtemp_textChanged(const QString &text) { if (editMode == IGNORE || acceptingEdit == true) diff --git a/desktop-widgets/maintab.h b/desktop-widgets/maintab.h index 50a7d6d21..690c8680c 100644 --- a/desktop-widgets/maintab.h +++ b/desktop-widgets/maintab.h @@ -76,6 +76,8 @@ slots: void on_diveTripLocation_textEdited(const QString& text); void on_notes_textChanged(); void on_airtemp_textChanged(const QString &text); + void on_duration_textChanged(const QString &text); + void on_depth_textChanged(const QString &text); void divetype_Changed(int); void on_watertemp_textChanged(const QString &text); void validate_temp_field(QLineEdit *tempField, const QString &text); |