mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Create signals/slots for filtering the dive_site,
The dive site management requires that we filter all the dives that are on the current dive_site, this is the preparatory work for that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
785051c9dd
commit
ee7e511372
3 changed files with 20 additions and 3 deletions
|
@ -292,7 +292,7 @@ void LocationFilterModel::repopulate()
|
||||||
anyChecked = false;
|
anyChecked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent), justCleared(false)
|
MultiFilterSortModel::MultiFilterSortModel(QObject *parent) : QSortFilterProxyModel(parent), justCleared(false), curr_dive_site(NULL)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,3 +388,15 @@ void MultiFilterSortModel::clearFilter()
|
||||||
justCleared = false;
|
justCleared = false;
|
||||||
myInvalidate();
|
myInvalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MultiFilterSortModel::startFilterDiveSite(int32_t uuid)
|
||||||
|
{
|
||||||
|
curr_dive_site = get_dive_site_by_uuid(uuid);
|
||||||
|
myInvalidate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MultiFilterSortModel::stopFilterDiveSite()
|
||||||
|
{
|
||||||
|
curr_dive_site = NULL;
|
||||||
|
myInvalidate();
|
||||||
|
}
|
||||||
|
|
|
@ -93,12 +93,16 @@ public
|
||||||
slots:
|
slots:
|
||||||
void myInvalidate();
|
void myInvalidate();
|
||||||
void clearFilter();
|
void clearFilter();
|
||||||
|
void startFilterDiveSite(int32_t uuid);
|
||||||
|
void stopFilterDiveSite();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void filterFinished();
|
void filterFinished();
|
||||||
private:
|
private:
|
||||||
MultiFilterSortModel(QObject *parent = 0);
|
MultiFilterSortModel(QObject *parent = 0);
|
||||||
QList<MultiFilterInterface *> models;
|
QList<MultiFilterInterface *> models;
|
||||||
bool justCleared;
|
bool justCleared;
|
||||||
|
struct dive_site *curr_dive_site;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,7 +22,7 @@ public:
|
||||||
LocationInformationWidget(QWidget *parent = 0);
|
LocationInformationWidget(QWidget *parent = 0);
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *);
|
void showEvent(QShowEvent *);
|
||||||
\
|
|
||||||
public slots:
|
public slots:
|
||||||
void acceptChanges();
|
void acceptChanges();
|
||||||
void rejectChanges();
|
void rejectChanges();
|
||||||
|
@ -40,7 +40,8 @@ public slots:
|
||||||
signals:
|
signals:
|
||||||
void informationManagementEnded();
|
void informationManagementEnded();
|
||||||
void coordinatesChanged();
|
void coordinatesChanged();
|
||||||
|
void startFilterDiveSite(uint32_t uuid);
|
||||||
|
void stopFilterFiveSite();
|
||||||
private:
|
private:
|
||||||
struct dive_site *currentDs;
|
struct dive_site *currentDs;
|
||||||
Ui::LocationInformation ui;
|
Ui::LocationInformation ui;
|
||||||
|
|
Loading…
Add table
Reference in a new issue