mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
afde4dce0d
commit
8695d8bdb1
3 changed files with 37 additions and 1 deletions
|
@ -41,7 +41,6 @@ public slots:
|
|||
class DiveSiteSortedModel : public QSortFilterProxyModel {
|
||||
Q_OBJECT
|
||||
private:
|
||||
struct dive_site *getDiveSite(const QModelIndex &idx);
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &source_parent) const override;
|
||||
bool lessThan(const QModelIndex &i1, const QModelIndex &i2) const override;
|
||||
QString fullText;
|
||||
|
@ -54,6 +53,7 @@ public:
|
|||
DiveSiteSortedModel();
|
||||
QStringList allSiteNames() const;
|
||||
void setFilter(const QString &text);
|
||||
struct dive_site *getDiveSite(const QModelIndex &idx);
|
||||
};
|
||||
|
||||
// To access only divesites at the given GPS coordinates with the exception of a given dive site
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue