summaryrefslogtreecommitdiffstats
path: root/qt-ui/completionmodels.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-13 10:30:22 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-08-13 10:30:22 -0300
commit84f73a5fb199d79bcf79eaeab52ce1198668c3cb (patch)
tree12df4eefe30a9470be8e7abb1fcc5fb9bebd0d9b /qt-ui/completionmodels.h
parent663ab6e23eacd096bb5f64df507c1ee66404f302 (diff)
downloadsubsurface-84f73a5fb199d79bcf79eaeab52ce1198668c3cb.tar.gz
Added classes to handle the Completion of Dive Editions.
Added classes to handle the completion of dive editions, the classes are BuddyCompletionModel, DiveMasterCompletionModel, SuitCompletionModel and LocationCompletionModel, thanks to plain old C macros, code got really small. and I hope the logic is better than the Gtk version. :) Now next step is to integrate it to the Ui. shouldn't be hard. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/completionmodels.h')
-rw-r--r--qt-ui/completionmodels.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/qt-ui/completionmodels.h b/qt-ui/completionmodels.h
new file mode 100644
index 000000000..42b81946c
--- /dev/null
+++ b/qt-ui/completionmodels.h
@@ -0,0 +1,34 @@
+#ifndef COMPLETIONMODELS_H
+#define COMPLETIONMODELS_H
+
+#include <QStringListModel>
+
+class BuddyCompletionModel : public QStringListModel {
+ Q_OBJECT
+public:
+ static BuddyCompletionModel* instance();
+ void updateModel();
+};
+
+class DiveMasterCompletionModel : public QStringListModel {
+ Q_OBJECT
+public:
+ static DiveMasterCompletionModel* instance();
+ void updateModel();
+};
+
+class LocationCompletionModel : public QStringListModel {
+ Q_OBJECT
+public:
+ static LocationCompletionModel* instance();
+ void updateModel();
+};
+
+class SuitCompletionModel : public QStringListModel {
+ Q_OBJECT
+public:
+ static SuitCompletionModel* instance();
+ void updateModel();
+};
+
+#endif