summaryrefslogtreecommitdiffstats
path: root/searchdialog.h
blob: bfa2443304a07ccae3494e63768ac3d650199147 (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
#ifndef SEARCHDIALOG_H
#define SEARCHDIALOG_H

#include <QDialog>

class QLineEdit;
class QComboBox;
class QTreeView;
class QStandardItemModel;

class SearchDialog : public QDialog {
    Q_OBJECT
    public:
        enum SearchTypes { Filename, Title };
        enum CustomRoles { SeriesIdRole = 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 doResultTitle(const QModelIndex &sel);


    private:
        QLineEdit *mSearch;
        QComboBox *mTypeSel;
        QTreeView *mResV;
        QTreeView *mDataV;
        QStandardItemModel *mResM;
        QStandardItemModel *mDataM;
};

#endif // SEARCHDIALOG_H