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;
|
||||
}
|
||||
|
||||
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;
|
||||
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:
|
||||
void myInvalidate();
|
||||
void clearFilter();
|
||||
void startFilterDiveSite(int32_t uuid);
|
||||
void stopFilterDiveSite();
|
||||
|
||||
signals:
|
||||
void filterFinished();
|
||||
private:
|
||||
MultiFilterSortModel(QObject *parent = 0);
|
||||
QList<MultiFilterInterface *> models;
|
||||
bool justCleared;
|
||||
struct dive_site *curr_dive_site;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,7 @@ public:
|
|||
LocationInformationWidget(QWidget *parent = 0);
|
||||
protected:
|
||||
void showEvent(QShowEvent *);
|
||||
\
|
||||
|
||||
public slots:
|
||||
void acceptChanges();
|
||||
void rejectChanges();
|
||||
|
@ -40,7 +40,8 @@ public slots:
|
|||
signals:
|
||||
void informationManagementEnded();
|
||||
void coordinatesChanged();
|
||||
|
||||
void startFilterDiveSite(uint32_t uuid);
|
||||
void stopFilterFiveSite();
|
||||
private:
|
||||
struct dive_site *currentDs;
|
||||
Ui::LocationInformation ui;
|
||||
|
|
Loading…
Add table
Reference in a new issue