summaryrefslogtreecommitdiffstats
path: root/searchdialog.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-02-01 16:37:44 +0100
committerArno <arno@disconnect.de>2018-02-01 16:37:44 +0100
commit2a14c0ebca1d781b7279e1ed8d657364d70df46d (patch)
treedfcacee9e23be3e3c64b9ac516dedc7b79b80156 /searchdialog.h
parent4847284500c9b9792bd1ab8c2913d6f6c2307152 (diff)
downloadShemovCleaner-2a14c0ebca1d781b7279e1ed8d657364d70df46d.tar.gz
ShemovCleaner-2a14c0ebca1d781b7279e1ed8d657364d70df46d.tar.bz2
ShemovCleaner-2a14c0ebca1d781b7279e1ed8d657364d70df46d.zip
Implement a useful search
Display Title and Filename search as non-modal dialog, so one can compare Files and Database. For now only Title search is implemented. Filename search does nothing (yet).
Diffstat (limited to 'searchdialog.h')
-rw-r--r--searchdialog.h34
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