From a72d06854cfb2d41762bfde48ef1543aca47020a Mon Sep 17 00:00:00 2001 From: Arno Date: Tue, 3 Apr 2018 18:35:46 +0200 Subject: 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. --- moviewidget.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 moviewidget.h (limited to 'moviewidget.h') 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 + +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 -- cgit v1.2.3-70-g09d2