summaryrefslogtreecommitdiffstats
path: root/moviewidget.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-04-03 18:35:46 +0200
committerArno <arno@disconnect.de>2018-04-03 18:35:46 +0200
commita72d06854cfb2d41762bfde48ef1543aca47020a (patch)
tree69cd71b6f1a85a8b0e02bd1f04e5497740a907f4 /moviewidget.h
parent5b2f85010f18c8a9b86df47308e30fa549c9eeb0 (diff)
downloadSheMov-a72d06854cfb2d41762bfde48ef1543aca47020a.tar.gz
SheMov-a72d06854cfb2d41762bfde48ef1543aca47020a.tar.bz2
SheMov-a72d06854cfb2d41762bfde48ef1543aca47020a.zip
First implementation of MovieWidget
It's the replacement for the archive viewer thingy. Just keep it simple and stupid. For now it shows series data.
Diffstat (limited to 'moviewidget.h')
-rw-r--r--moviewidget.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/moviewidget.h b/moviewidget.h
new file mode 100644
index 0000000..1f063d0
--- /dev/null
+++ b/moviewidget.h
@@ -0,0 +1,35 @@
+#ifndef MOVIEWIDGET_H
+#define MOVIEWIDGET_H
+
+#include <QWidget>
+
+class QLineEdit;
+class QComboBox;
+class QTreeView;
+class QSortFilterProxyModel;
+class QStandardItemModel;
+
+class MovieWidget : public QWidget {
+ Q_OBJECT
+ public:
+ enum CustomRoles { SeriesPartIdRole = Qt::UserRole + 1, CountRole = Qt::UserRole + 2, MD5SumRole = Qt::UserRole + 3 };
+ explicit MovieWidget(QWidget *parent = nullptr);
+
+ private slots:
+ void selectBy(const QString &selection);
+ void populateBySeries();
+ void topSelectionChanged();
+
+ private:
+ void setupWidget();
+ QLineEdit *mFilterLE;
+ QComboBox *mSelectionCB;
+ QTreeView *mTopView;
+ QSortFilterProxyModel *mTopProxy;
+ QStandardItemModel *mTopModel;
+ QTreeView *mBottomView;
+ QSortFilterProxyModel *mBottomProxy;
+ QStandardItemModel *mBottomModel;
+};
+
+#endif // MOVIEWIDGET_H