mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Added skeleton of the Suits Filter.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
16e44b31d3
commit
88d19bca6c
2 changed files with 38 additions and 0 deletions
|
|
@ -68,6 +68,24 @@ private:
|
|||
explicit LocationFilterModel(QObject *parent = 0);
|
||||
};
|
||||
|
||||
class SuitsFilterModel : public QStringListModel, public MultiFilterInterface{
|
||||
Q_OBJECT
|
||||
public:
|
||||
static SuitsFilterModel *instance();
|
||||
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
||||
virtual bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
|
||||
virtual Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
virtual bool filterRow(int source_row, const QModelIndex &source_parent, QAbstractItemModel *sourceModel) const;
|
||||
bool doFilter(struct dive *d, QModelIndex &index0, QAbstractItemModel *sourceModel) const;
|
||||
void clearFilter();
|
||||
public
|
||||
slots:
|
||||
void repopulate();
|
||||
|
||||
private:
|
||||
explicit SuitsFilterModel(QObject *parent = 0);
|
||||
};
|
||||
|
||||
class MultiFilterSortModel : public QSortFilterProxyModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue