diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-03-10 16:03:39 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | 8dcc33d8ab4081310d2e18b2c3d6c95141999698 (patch) | |
tree | 019c74009720b7164f0a6c5edaaf98a780130897 /qt-models/divelocationmodel.h | |
parent | dd12bdaf94c1ebc5d32598151aa96da12e61c146 (diff) | |
download | subsurface-8dcc33d8ab4081310d2e18b2c3d6c95141999698.tar.gz |
Undo: keep frontend informed of changes to dive site count
Add a new signal to DiveListNotifier. Send signal if dives are
added or removed and therefore the dive count of a dive site
changes. The dive sites are collected and the signal is sent
at the end of the command.
Add code to update the table view.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divelocationmodel.h')
-rw-r--r-- | qt-models/divelocationmodel.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-models/divelocationmodel.h b/qt-models/divelocationmodel.h index 4840bff21..794056324 100644 --- a/qt-models/divelocationmodel.h +++ b/qt-models/divelocationmodel.h @@ -9,6 +9,9 @@ #define RECENTLY_ADDED_DIVESITE ((struct dive_site *)~0) +struct dive; +struct dive_trip; + class LocationInformationModel : public QAbstractTableModel { Q_OBJECT public: @@ -30,6 +33,7 @@ public: public slots: void update(); QStringList allSiteNames() const; + void diveSiteDiveCountChanged(struct dive_site *ds); private: QStringList locationNames; }; |