diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-11-14 17:39:35 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-15 09:19:14 +0900 |
commit | 96d5687ab89edd7163493faf212ddcb119e93d8c (patch) | |
tree | 6d3d148d776a134172d612fa13fe00223aaecdbc /qt-ui/models.h | |
parent | b77d990ed6892081f7c1e0df62631b57aad3b59f (diff) | |
download | subsurface-96d5687ab89edd7163493faf212ddcb119e93d8c.tar.gz |
Correctly handle changes on the CylinderModel to update the AirModel.
What happened before was that the AirTypes model was only being updated
when the user requested to change the air by clicking directly
on the Air, in the planner ( but not on the Air Table. ).
This fixes it by calling 'repopulate' whenever the cylinder model
changes ( by adding, removing and changing something.)
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/models.h')
-rw-r--r-- | qt-ui/models.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-ui/models.h b/qt-ui/models.h index 8302acefa..88e76a46f 100644 --- a/qt-ui/models.h +++ b/qt-ui/models.h @@ -10,6 +10,7 @@ #include <QAbstractTableModel> #include <QCoreApplication> #include <QStringList> +#include <QStringListModel> #include "../dive.h" #include "../divelist.h" @@ -298,4 +299,13 @@ public: void setDive(struct dive *divePtr); }; +class GasSelectionModel : public QStringListModel{ + Q_OBJECT +public: + static GasSelectionModel* instance(); + Qt::ItemFlags flags(const QModelIndex& index) const; +public slots: + void repopulate(); +}; + #endif |