blob: 47c71064c4826bfda5abab422fad30aecce9bbab (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef SEARCHDIALOG_H
#define SEARCHDIALOG_H
#include <QDialog>
class QLineEdit;
class QComboBox;
class QTreeView;
class QStandardItemModel;
class QStandardItem;
class SearchDialog : public QDialog {
Q_OBJECT
public:
enum SearchTypes { Filename, Title };
enum CustomRoles { IdRole = Qt::UserRole + 1 };
enum ChildMode { Actor, Genre };
explicit SearchDialog(QWidget *parent, Qt::WindowFlags f = 0);
virtual ~SearchDialog();
public slots:
void doSearch();
void doResult(const QModelIndex &cur, const QModelIndex &prev);
void doSearchTitle();
void doSearchFilename();
void doResultName(const QModelIndex &sel, int resType);
void writeSettings();
void readSettings();
private:
void doChild(QStandardItem *item, int childMode);
QLineEdit *mSearch;
QComboBox *mTypeSel;
QTreeView *mResV;
QTreeView *mDataV;
QStandardItemModel *mResM;
QStandardItemModel *mDataM;
};
#endif // SEARCHDIALOG_H
|