summaryrefslogtreecommitdiffstats
path: root/searchview.h
diff options
context:
space:
mode:
Diffstat (limited to 'searchview.h')
-rw-r--r--searchview.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/searchview.h b/searchview.h
new file mode 100644
index 0000000..33cd02c
--- /dev/null
+++ b/searchview.h
@@ -0,0 +1,28 @@
+#ifndef SEARCHVIEW_H
+#define SEARCHVIEW_H
+
+#include <QTreeView>
+
+class QMenu;
+class QContextMenuEvent;
+
+class SearchView : public QTreeView {
+ Q_OBJECT
+ public:
+ enum NodeAction { Expand, Collapse };
+ explicit SearchView(QWidget *parent = 0);
+
+ public slots:
+ void expandNode();
+ void collapseNode();
+
+ protected:
+ virtual void contextMenuEvent(QContextMenuEvent *e);
+
+ private:
+ void doNodeR(const QModelIndex &parent, int nAction);
+ QMenu *mCtxMenu;
+
+};
+
+#endif // SEARCHVIEW_H