gui.h

changeset 151
15fe6c51de54
parent 146
2ab24976acaa
child 154
cc53e5cbad54
equal deleted inserted replaced
150:bcbbdc5454e6 151:15fe6c51de54
21 21
22 #include <QMainWindow> 22 #include <QMainWindow>
23 #include <QMenu> 23 #include <QMenu>
24 #include <QToolBar> 24 #include <QToolBar>
25 #include <QAction> 25 #include <QAction>
26 #include <QTreeWidget>
27 #include <QToolBar> 26 #include <QToolBar>
28 #include <QTextEdit> 27 #include <QTextEdit>
29 #include <qpushbutton.h> 28 #include <qpushbutton.h>
29 #include <qlistwidget.h>
30 #include "gldraw.h" 30 #include "gldraw.h"
31 #include "config.h" 31 #include "config.h"
32 32
33 class ForgeWindow; 33 class ForgeWindow;
34 class color; 34 class color;
94 g_ActionMeta.push_back (meta); 94 g_ActionMeta.push_back (meta);
95 } 95 }
96 }; 96 };
97 97
98 // ============================================================================= 98 // =============================================================================
99 // ObjectList
100 //
101 // Object list class for ForgeWindow
102 // =============================================================================
103 class ObjectList : public QListWidget {
104 Q_OBJECT
105
106 protected:
107 void contextMenuEvent (QContextMenuEvent* ev);
108 };
109
110 // =============================================================================
99 // ForgeWindow 111 // ForgeWindow
100 // 112 //
101 // The one main GUI class. Hosts the renderer, object list, message log. Contains 113 // The one main GUI class. Hosts the renderer, object list, message log. Contains
102 // slot_action, which is what all actions connect to. Manages menus and toolbars. 114 // slot_action, which is what all actions connect to. Manages menus and toolbars.
103 // Large and in charge. 115 // Large and in charge.
107 119
108 public: 120 public:
109 GLRenderer* R; 121 GLRenderer* R;
110 122
111 // Object list view 123 // Object list view
112 QTreeWidget* qObjList; 124 ObjectList* objList;
113 QTextEdit* qMessageLog; 125 QTextEdit* qMessageLog;
114 QMenu* qFileMenu, *qEditMenu, *qViewMenu, *qInsertMenu, *qMoveMenu, 126 QMenu* qFileMenu, *qEditMenu, *qViewMenu, *qInsertMenu, *qMoveMenu,
115 *qHelpMenu, *qControlMenu; 127 *qHelpMenu, *qControlMenu;
116 QMenu* qRecentFilesMenu; 128 QMenu* qRecentFilesMenu;
117 std::vector<QAction*> qaRecentFiles; 129 std::vector<QAction*> qaRecentFiles;

mercurial