summaryrefslogtreecommitdiffstats
path: root/logic/EnabledItemFilter.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-09-16 00:54:39 +0200
committerPetr Mrázek <peterix@gmail.com>2013-09-16 00:54:39 +0200
commitd38b90530b3ba3a49c4eb072eb344ae2b0836913 (patch)
tree5dd07e59ae1bc8392a773ec8fec6b6a3aa7e4840 /logic/EnabledItemFilter.h
parent7721c57e5e1093a3d8597b6b6f30c97d2aa3d8a5 (diff)
downloadMultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar
MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.gz
MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.lz
MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.tar.xz
MultiMC-d38b90530b3ba3a49c4eb072eb344ae2b0836913.zip
Forge version list implementation. Needs integration and testing.
Diffstat (limited to 'logic/EnabledItemFilter.h')
-rw-r--r--logic/EnabledItemFilter.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/logic/EnabledItemFilter.h b/logic/EnabledItemFilter.h
new file mode 100644
index 00000000..cb6d4041
--- /dev/null
+++ b/logic/EnabledItemFilter.h
@@ -0,0 +1,16 @@
+#pragma once
+#include <QSortFilterProxyModel>
+
+class EnabledItemFilter : public QSortFilterProxyModel
+{
+ Q_OBJECT
+public:
+ EnabledItemFilter(QObject *parent = 0);
+ void setActive(bool active);
+
+protected:
+ bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const;
+ bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
+private:
+ bool m_active = false;
+}; \ No newline at end of file