summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.h
diff options
context:
space:
mode:
authorGravatar Maximilian Güntner <maximilian.guentner@gmail.com>2013-11-02 02:20:02 +0100
committerGravatar Maximilian Güntner <maximilian.guentner@gmail.com>2013-11-02 03:37:31 +0100
commit04cdfce782f2a104ab5d0ee92de67c7b6271835b (patch)
treef937c8c8a005ef00f880bbcd3d7c56fd043ddfeb /qt-ui/maintab.h
parent6fe8cb652191728586f3731dcf6688b5a5b3efbb (diff)
downloadsubsurface-04cdfce782f2a104ab5d0ee92de67c7b6271835b.tar.gz
Added a custom widget for tagging dives
A custom tag widget has been added to MainTab. Tags are seperated by a comma ",". The implementation supports escaping a comma by using "\,". While typing, the widget supports the user by suggesting tags using a QCompleter. Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
Diffstat (limited to 'qt-ui/maintab.h')
-rw-r--r--qt-ui/maintab.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index afc30a079..22a705530 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -31,6 +31,7 @@ struct NotesBackup{
int rating;
int visibility;
QString divemaster;
+ QString tags;
cylinder_t cylinders[MAX_CYLINDERS];
weightsystem_t weightsystem[MAX_WEIGHTSYSTEMS ];
};
@@ -40,6 +41,7 @@ struct Completers{
QCompleter *divemaster;
QCompleter *buddy;
QCompleter *suit;
+ QCompleter *tags;
};
class MainTab : public QTabWidget
@@ -73,6 +75,7 @@ public slots:
void on_dateTimeEdit_dateTimeChanged(const QDateTime& datetime);
void on_rating_valueChanged(int value);
void on_visibility_valueChanged(int value);
+ void on_tagWidget_textChanged();
void editCylinderWidget(const QModelIndex& index);
void editWeightWidget(const QModelIndex& index);
void addDiveStarted();
@@ -94,6 +97,7 @@ private:
Completers completers;
void resetPallete();
+ void saveTags();
QString printGPSCoords(int lat, int lon);
};