Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkDataStorageFilterProxyModel.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QMITKDATASTORAGEFILTERPROXYMODEL_H_
18 #define QMITKDATASTORAGEFILTERPROXYMODEL_H_
19 
20 #include <MitkQtWidgetsExports.h>
21 
22 #include <mitkDataStorage.h>
23 #include <mitkNodePredicateBase.h>
24 
25 #include <QSortFilterProxyModel>
26 
27 #include <set>
28 
30 class MITKQTWIDGETS_EXPORT QmitkDataStorageFilterProxyModel : public QSortFilterProxyModel
31 {
32  //# CTORS,DTOR
33 public:
34  QmitkDataStorageFilterProxyModel(QObject *parent = 0);
36 
37 public:
41  void AddFilterPredicate(mitk::NodePredicateBase::Pointer pred);
42 
46  bool RemoveFilterPredicate(mitk::NodePredicateBase::Pointer pred);
47 
51  bool HasFilterPredicate(mitk::NodePredicateBase::Pointer pred);
52 
53  //#
54 protected:
55  bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override;
56 
57 protected:
58  typedef std::set<mitk::NodePredicateBase::Pointer> FilterPredicatesCollection;
59  FilterPredicatesCollection m_Predicates;
60 };
61 
62 #endif /* QMITKDATASTORAGEFILTERPROXYMODEL_H_ */
#define MITKQTWIDGETS_EXPORT
std::set< mitk::NodePredicateBase::Pointer > FilterPredicatesCollection