1
#ifndef APPLICATIONSFILTERMODEL_H
2
#define APPLICATIONSFILTERMODEL_H
4
#include <QSortFilterProxyModel>
8
namespace application {
9
class ApplicationManagerInterface;
13
using namespace unity::shell::application;
15
class ApplicationsFilterModel: public QSortFilterProxyModel
19
Q_PROPERTY(ApplicationManagerInterface* applicationsModel READ applicationsModel WRITE setApplicationsModel NOTIFY applicationsModelChanged)
20
Q_PROPERTY(bool filterTouchApps READ filterTouchApps WRITE setFilterTouchApps NOTIFY filterTouchAppsChanged)
21
Q_PROPERTY(bool filterLegacyApps READ filterLegacyApps WRITE setFilterLegacyApps NOTIFY filterLegacyAppsChanged)
24
ApplicationsFilterModel(QObject *parent = 0);
26
ApplicationManagerInterface* applicationsModel() const;
27
void setApplicationsModel(ApplicationManagerInterface* applicationsModel);
29
bool filterTouchApps() const;
30
void setFilterTouchApps(bool filterTouchApps);
32
bool filterLegacyApps() const;
33
void setFilterLegacyApps(bool filterLegacyApps);
35
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
38
void applicationsModelChanged();
39
void filterTouchAppsChanged();
40
void filterLegacyAppsChanged();
43
ApplicationManagerInterface* m_appModel;
44
bool m_filterTouchApps;
45
bool m_filterLegacyApps;