summaryrefslogtreecommitdiffstats
path: root/qt-ui/models.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r--qt-ui/models.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index dcc16d8d6..bb623243e 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -1667,3 +1667,19 @@ QVariant ProfilePrintModel::data(const QModelIndex &index, int role) const
} // switch (role)
return QVariant();
}
+
+Qt::ItemFlags GasSelectionModel::flags(const QModelIndex& index) const
+{
+ return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+}
+
+GasSelectionModel* GasSelectionModel::instance()
+{
+ static GasSelectionModel* self = new GasSelectionModel();
+ return self;
+}
+
+void GasSelectionModel::repopulate()
+{
+ setStringList(DivePlannerPointsModel::instance()->getGasList());
+}