diff options
Diffstat (limited to 'searchdialog.h')
-rw-r--r-- | searchdialog.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/searchdialog.h b/searchdialog.h new file mode 100644 index 0000000..bfa2443 --- /dev/null +++ b/searchdialog.h @@ -0,0 +1,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 |