blob: 4a387d462d71725a841abd8e593caf967084b662 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
/*
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 SEARCHDIALOG_H
#define SEARCHDIALOG_H
#include <QDialog>
class QCheckBox;
class QLineEdit;
class QPushButton;
class QComboBox;
class SmTreeView;
class SmTreeModel;
class SmTreeItem;
class QTreeView;
class QSortFilterProxyModel;
class QStandardItemModel;
class FilenamesAndMetadata : public QWidget {
Q_OBJECT
public:
FilenamesAndMetadata(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::Widget);
signals:
void searchResultClicked(int);
private slots:
void search();
private:
void appendChild(QVariant id, QVariant subject, QVariant name, QVariant sub, SmTreeItem *parent);
void appendEmpty(SmTreeItem *parent);
QLineEdit *mSearch;
QTreeView *mResult;
SmTreeModel *mModel;
QSortFilterProxyModel *mProxy;
};
class ActorsAndMore : public QWidget {
Q_OBJECT
public:
enum SearchTypes { Actor, Title };
enum CustomRoles { IdRole = Qt::UserRole + 1 };
ActorsAndMore(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::Widget);
public slots:
void doSearch();
private:
void searchActor(const QString &actor);
QComboBox *mTypeSel;
QLineEdit *mSearch;
QStandardItemModel *mResultModel;
QStandardItemModel *mDataModel;
QTreeView *mResultView;
QTreeView *mDataView;
};
class SearchDialog : public QDialog {
Q_OBJECT
public:
SearchDialog(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::Widget);
void readSettings();
void writeSettings();
};
#endif // SEARCHDIALOG_H
|