/* 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 #include 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