Dive sites: show dives at selected dive sites

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>
This commit is contained in:
Berthold Stoeger 2019-04-12 16:12:15 +02:00 committed by Dirk Hohndel
parent afde4dce0d
commit 8695d8bdb1
3 changed files with 37 additions and 1 deletions

View file

@ -18,9 +18,13 @@ private slots:
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