diff options
author | willemferguson <willemferguson@zoology.up.ac.za> | 2019-11-28 21:04:52 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-12-03 20:37:57 -0800 |
commit | 6d7f26f4bf794c0faa79370dd788d90391542d30 (patch) | |
tree | 3963059d648eeb8acf8a31a0eab0807e59308de9 /core | |
parent | 4e86dd3a5221ca37545cba9950a712f938367113 (diff) | |
download | subsurface-6d7f26f4bf794c0faa79370dd788d90391542d30.tar.gz |
Desktop: add additional star widgets to Information tab
Connect the UI to the underlying dive structure. Enable proper initialisation
and management of star widgets while Information tab is active. Enable undo for
the addtional star widgets.
Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/dive.h | 6 | ||||
-rw-r--r-- | core/subsurface-qt/DiveListNotifier.h | 22 |
2 files changed, 22 insertions, 6 deletions
diff --git a/core/dive.h b/core/dive.h index adcdd200d..7e45f1c09 100644 --- a/core/dive.h +++ b/core/dive.h @@ -149,7 +149,7 @@ struct dive { char *suit; int number; int rating; - int visibility; /* 0 - 5 star rating */ + int wavesize, current, visibility, surge, chill; /* 0 - 5 star ratings */ int sac, otu, cns, maxcns; /* Calculated based on dive computer data */ @@ -194,6 +194,10 @@ struct dive_components { unsigned int suit : 1; unsigned int rating : 1; unsigned int visibility : 1; + unsigned int wavesize : 1; + unsigned int current : 1; + unsigned int surge : 1; + unsigned int chill : 1; unsigned int tags : 1; unsigned int cylinders : 1; unsigned int weights : 1; diff --git a/core/subsurface-qt/DiveListNotifier.h b/core/subsurface-qt/DiveListNotifier.h index d4045abea..b82c0ac05 100644 --- a/core/subsurface-qt/DiveListNotifier.h +++ b/core/subsurface-qt/DiveListNotifier.h @@ -26,6 +26,10 @@ struct DiveField { unsigned int buddy : 1; unsigned int rating : 1; unsigned int visibility : 1; + unsigned int wavesize : 1; + unsigned int current : 1; + unsigned int surge : 1; + unsigned int chill : 1; unsigned int suit : 1; unsigned int tags : 1; unsigned int mode : 1; @@ -45,11 +49,15 @@ struct DiveField { BUDDY = 1 << 9, RATING = 1 << 10, VISIBILITY = 1 << 11, - SUIT = 1 << 12, - TAGS = 1 << 13, - MODE = 1 << 14, - NOTES = 1 << 15, - SALINITY = 1 << 16 + WAVESIZE = 1 << 12, + CURRENT = 1 << 13, + SURGE = 1 << 14, + CHILL = 1 << 15, + SUIT = 1 << 16, + TAGS = 1 << 17, + MODE = 1 << 18, + NOTES = 1 << 19, + SALINITY = 1 << 20 }; DiveField(int flags); }; @@ -177,6 +185,10 @@ inline DiveField::DiveField(int flags) : buddy((flags & BUDDY) != 0), rating((flags & RATING) != 0), visibility((flags & VISIBILITY) != 0), + wavesize((flags & WAVESIZE) != 0), + current((flags & CURRENT) != 0), + surge((flags & SURGE) != 0), + chill((flags & CHILL) != 0), suit((flags & SUIT) != 0), tags((flags & TAGS) != 0), mode((flags & MODE) != 0), |