summaryrefslogtreecommitdiffstats
path: root/randomtab.h
diff options
context:
space:
mode:
Diffstat (limited to 'randomtab.h')
-rw-r--r--randomtab.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/randomtab.h b/randomtab.h
new file mode 100644
index 0000000..f8d2218
--- /dev/null
+++ b/randomtab.h
@@ -0,0 +1,53 @@
+/*
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version
+ 2 of the License, or (at your option) any later version.
+*/
+
+#ifndef RANDOMTAB_H
+#define RANDOMTAB_H
+
+#include <QWidget>
+#include <QSqlDatabase>
+
+class QComboBox;
+class QPushButton;
+class QTreeView;
+class QSortFilterProxyModel;
+class QStandardItemModel;
+class QLineEdit;
+
+class RandomTab : public QWidget {
+ Q_OBJECT
+ public:
+ enum CustomRoles { IdRole = Qt::UserRole + 1 };
+ explicit RandomTab(QWidget *parent = 0);
+
+ public slots:
+ void setupModels();
+ void clearAll();
+ void refreshComboboxes();
+ void select();
+
+ private:
+ void setupGui();
+ QComboBox *mGenre1;
+ QComboBox *mGenre2;
+ QComboBox *mGenre3;
+ QComboBox *mActor1;
+ QComboBox *mActor2;
+ QComboBox *mActor3;
+ QLineEdit *mNumber;
+ QPushButton *mSelect;
+ QPushButton *mClear;
+ QPushButton *mRefresh;
+ QTreeView *mFileView;
+ QStandardItemModel *mFileModel;
+ QStandardItemModel *mGenreModel;
+ QStandardItemModel *mActorModel;
+ QSortFilterProxyModel *mFileProxy;
+ QSqlDatabase mDb;
+};
+
+#endif // RANDOMTAB_H