aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/TabDiveSite.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-09 22:32:16 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commitdd12bdaf94c1ebc5d32598151aa96da12e61c146 (patch)
treece03750531ebcabdda7c656c28b6c9e9e73032f7 /desktop-widgets/tab-widgets/TabDiveSite.h
parent992ad2fa2784d38c5dfe3cce4e35e00d27a5f533 (diff)
downloadsubsurface-dd12bdaf94c1ebc5d32598151aa96da12e61c146.tar.gz
Dive site: add dive site list tab
Add a very simple tab-widget presenting the list of known dive sites. The table is rendered using our custom "TableView". The (mis)uses the "LocationInformationModel". It moves the items to be displayed (delete, name, description, number of dives) to the front and makes the others hidden. Moreover, it was necessary to limit the geo-tag decoration role to the name to avoid having the icon next to each column. Make the trash-can icon active and the name and description editable. This is modelled after the cylinders-table code. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveSite.h')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveSite.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveSite.h b/desktop-widgets/tab-widgets/TabDiveSite.h
new file mode 100644
index 000000000..60b3abd76
--- /dev/null
+++ b/desktop-widgets/tab-widgets/TabDiveSite.h
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0
+#ifndef TAB_DIVE_SITE_H
+#define TAB_DIVE_SITE_H
+
+#include "TabBase.h"
+#include "ui_TabDiveSite.h"
+
+class TabDiveSite : public TabBase {
+ Q_OBJECT
+public:
+ TabDiveSite(QWidget *parent = 0);
+ void updateData() override;
+ void clear() override;
+private:
+ Ui::TabDiveSite ui;
+};
+
+#endif