blob: 6cb9212e4b5cad2de055ae29d9d0679344d12c2c (
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
|
#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 };
explicit SearchDialog(QWidget *parent, Qt::WindowFlags f = 0);
public slots:
void doSearch();
void doResult(const QModelIndex &cur, const QModelIndex &prev);
void doSearchTitle();
void doSearchFilename();
void doResultName(const QModelIndex &sel, int resType);
private:
void doActors(QStandardItem *item);
QLineEdit *mSearch;
QComboBox *mTypeSel;
QTreeView *mResV;
QTreeView *mDataV;
QStandardItemModel *mResM;
QStandardItemModel *mDataM;
};
#endif // SEARCHDIALOG_H
|