]> git.sven.stormbind.net Git - sven/vym.git/blob - src/treeeditor.h
New upstream version 2.9.22
[sven/vym.git] / src / treeeditor.h
1 #ifndef TREEEDITOR_H
2 #define TREEEDITOR_H
3
4 #include <QTreeView>
5
6 class VymModel;
7
8 /*! \brief TreeView widget in vym to display and edit a map, based on
9  * QTreeView */
10
11 class TreeEditor : public QTreeView {
12     Q_OBJECT
13
14   public:
15     TreeEditor(VymModel *m = NULL);
16     ~TreeEditor();
17     void init();
18     QModelIndex getSelectedIndex();
19
20   protected:
21     virtual void contextMenuEvent(QContextMenuEvent *e);
22
23   private slots:
24     void cursorUp();
25     void cursorDown();
26     void startEdit();
27
28   private:
29     VymModel *model;
30 };
31
32 #endif