Isis 3 Programmer Reference
SortFilterProxyModel.h
Go to the documentation of this file.
1 
2 #ifndef SortFilterProxyModel_h
3 #define SortFilterProxyModel_h
4 
24 #include <QList>
25 #include <QIdentityProxyModel>
26 #include <QModelIndex>
27 #include <QPersistentModelIndex>
28 #include <QSortFilterProxyModel>
29 
30 class QAbstractProxyModel;
31 class QObject;
32 class QStandardItem;
33 
34 class QVariant;
35 
36 namespace Isis {
37 
38 class ProjectItem;
39 class ProjectItemModel;
40 
51  Q_OBJECT
52 
53  public:
54  explicit SortFilterProxyModel(QObject *parent = 0);
55 
56  //QModelIndex mapFromSource(const QModelIndex &sourceIndex) const Q_DECL_OVERRIDE;
57  //QModelIndex mapToSource(const QModelIndex &proxyIndex) const Q_DECL_OVERRIDE;
58 
59  //void setSourceModel(ProjectItemModel *newSourceModel) Q_DECL_OVERRIDE;
60  void setSourceModel(ProjectItemModel *newSourceModel);
61 
62  bool setRoot(const QStandardItem *item);
63 
64  void setSelectedItems(QList<ProjectItem*> selected);
65 
66 
67  protected:
68  bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
69 
70  private:
71  ProjectItemModel * baseModel;
72  QList<QModelIndex> selectedIndices;
73  QList<int> selectedIndexRows;
74  QPersistentModelIndex m_root;
75  QModelIndex root;
76 
77 
78  };
79 
80 };
81 
82 
83 #endif
Provides access to data stored in a Project through Qt&#39;s model-view framework.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31