2019-03-09 22:32:16 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef TAB_DIVE_SITE_H
|
|
|
|
#define TAB_DIVE_SITE_H
|
|
|
|
|
|
|
|
#include "TabBase.h"
|
|
|
|
#include "ui_TabDiveSite.h"
|
2019-03-12 17:28:43 +01:00
|
|
|
#include "qt-models/divelocationmodel.h"
|
2019-03-09 22:32:16 +01:00
|
|
|
|
|
|
|
class TabDiveSite : public TabBase {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
TabDiveSite(QWidget *parent = 0);
|
|
|
|
void updateData() override;
|
|
|
|
void clear() override;
|
2019-03-13 20:58:25 +01:00
|
|
|
private slots:
|
|
|
|
void add();
|
2019-03-13 21:36:31 +01:00
|
|
|
void diveSiteAdded(struct dive_site *, int idx);
|
2019-03-13 21:56:41 +01:00
|
|
|
void diveSiteChanged(struct dive_site *ds, int field);
|
2019-11-02 22:52:27 +01:00
|
|
|
void diveSiteClicked(const QModelIndex &);
|
2019-03-19 19:52:54 +01:00
|
|
|
void on_purgeUnused_clicked();
|
2019-03-24 17:11:29 +01:00
|
|
|
void on_filterText_textChanged(const QString &text);
|
2019-04-12 16:12:15 +02:00
|
|
|
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
2019-03-09 22:32:16 +01:00
|
|
|
private:
|
|
|
|
Ui::TabDiveSite ui;
|
2019-03-12 17:28:43 +01:00
|
|
|
DiveSiteSortedModel model;
|
2019-05-05 12:18:04 +02:00
|
|
|
QVector<dive_site *> selectedDiveSites();
|
2019-04-12 16:12:15 +02:00
|
|
|
void hideEvent(QHideEvent *) override;
|
|
|
|
void showEvent(QShowEvent *) override;
|
2019-03-09 22:32:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|