summaryrefslogtreecommitdiffstats
path: root/archivebrowser.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2014-02-07 06:39:49 +0100
committerArno <am@disconnect.de>2014-02-07 06:39:49 +0100
commit9c85c8e441b5bc6bd9e6441a828599c137ea36be (patch)
treed1e3eaab343aa2d85e9ea05ce49f73ceed8be97d /archivebrowser.h
parent3ac6968ebaf087aeb4bb3deeb1ded2bbbd54dfa5 (diff)
downloadSheMov-9c85c8e441b5bc6bd9e6441a828599c137ea36be.tar.gz
SheMov-9c85c8e441b5bc6bd9e6441a828599c137ea36be.tar.bz2
SheMov-9c85c8e441b5bc6bd9e6441a828599c137ea36be.zip
Implement ArchiveBrowser filtering
Filter ArchiveBrowser by Quality and/or size: * Quality: only show series with a quality less or equal * Size: only show series still fitting onto the DVD * Both: only show series with a quality less or equal _and_ still fitting on the DVD Use QItemSelection instead of going through the selected items in the tree. Seems to work somehow...
Diffstat (limited to 'archivebrowser.h')
-rw-r--r--archivebrowser.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/archivebrowser.h b/archivebrowser.h
index 78bec23..6986b84 100644
--- a/archivebrowser.h
+++ b/archivebrowser.h
@@ -9,12 +9,17 @@
#define ARCHIVEBROWSER_H
#include <QWidget>
+#include <QModelIndexList>
+#include <QItemSelection>
#include "smtreeview.h"
class ArchiveBrowserModel;
+class ArchiveBrowserModelProxy;
class SmTreeView;
class QSortFilterProxyModel;
+class QComboBox;
+class QCheckBox;
class ArchiveBrowser : public QWidget {
Q_OBJECT
@@ -24,14 +29,22 @@ class ArchiveBrowser : public QWidget {
public slots:
void browserSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
+ private slots:
+ void setupQualityFilter();
+
signals:
void sizeChanged(qint64 size);
void itemCountChanged(int items);
private:
+ QModelIndexList selectedRows(const QItemSelection &sel);
SmTreeView *mTree;
+ QComboBox *mQualityFilter;
+ QCheckBox *mSizeFilter;
ArchiveBrowserModel *mModel;
- QSortFilterProxyModel *mProxy;
+ ArchiveBrowserModelProxy *mProxy;
+ qint64 mSelectedSize;
+ int mSelectedItems;
};
#endif // ARCHIVEBROWSER_H