summaryrefslogtreecommitdiff
path: root/src/main-view/CardFilterModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main-view/CardFilterModel.cpp')
-rw-r--r--src/main-view/CardFilterModel.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main-view/CardFilterModel.cpp b/src/main-view/CardFilterModel.cpp
new file mode 100644
index 0000000..50ac75d
--- /dev/null
+++ b/src/main-view/CardFilterModel.cpp
@@ -0,0 +1,24 @@
+#include "CardFilterModel.h"
+
+CardFilterModel::CardFilterModel( QObject* parent ):
+ QSortFilterProxyModel( parent )
+ {
+ }
+
+void CardFilterModel::addFilterRow( int aRow )
+ {
+ if( m_filterRows.contains( aRow ) )
+ return;
+ m_filterRows << aRow;
+ }
+
+void CardFilterModel::removeFilterRow( int aRow )
+ {
+ m_filterRows.removeOne( aRow );
+ }
+
+bool CardFilterModel::filterAcceptsRow( int source_row, const QModelIndex& source_parent ) const
+ {
+ Q_UNUSED( source_parent );
+ return m_filterRows.contains( source_row );
+ }