mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
8695d8bdb1
When in dive site tab and some dive sites are selected, show only dives at those sites. Simply read the selection and pass it to the filter. Start and stop filtering when switching to and from the tab, respectively. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
30 lines
800 B
C++
30 lines
800 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef TAB_DIVE_SITE_H
|
|
#define TAB_DIVE_SITE_H
|
|
|
|
#include "TabBase.h"
|
|
#include "ui_TabDiveSite.h"
|
|
#include "qt-models/divelocationmodel.h"
|
|
|
|
class TabDiveSite : public TabBase {
|
|
Q_OBJECT
|
|
public:
|
|
TabDiveSite(QWidget *parent = 0);
|
|
void updateData() override;
|
|
void clear() override;
|
|
private slots:
|
|
void add();
|
|
void diveSiteAdded(struct dive_site *, int idx);
|
|
void diveSiteChanged(struct dive_site *ds, int field);
|
|
void on_purgeUnused_clicked();
|
|
void on_filterText_textChanged(const QString &text);
|
|
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
|
|
private:
|
|
Ui::TabDiveSite ui;
|
|
DiveSiteSortedModel model;
|
|
void updateFilter();
|
|
void hideEvent(QHideEvent *) override;
|
|
void showEvent(QShowEvent *) override;
|
|
};
|
|
|
|
#endif
|