-
Notifications
You must be signed in to change notification settings - Fork 0
/
ApplicationCommon.h
88 lines (68 loc) · 2.91 KB
/
ApplicationCommon.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef APPLICATIONCOMMON_H
#define APPLICATIONCOMMON_H
#include "DocumentCommon.h"
#include <QMainWindow>
#include <QAction>
#include <QToolBar>
#include <QMenu>
#include <QMdiArea>
#include <QList>
//class COMMONSAMPLE_EXPORT ApplicationCommonWindow: public QMainWindow
class ApplicationCommonWindow: public QMainWindow
{
Q_OBJECT
public:
enum { FileNewId, FilePrefUseVBOId, FileCloseId, FilePreferencesId, FileQuitId, ViewToolId, ViewStatusId, HelpAboutId };
enum { ToolWireframeId, ToolShadingId, ToolColorId, ToolMaterialId, ToolTransparencyId, ToolDeleteId };
ApplicationCommonWindow();
~ApplicationCommonWindow();
static QMdiArea* getWorkspace();
static ApplicationCommonWindow* getApplication();
static QString getResourceDir();
virtual void updateFileActions();
QList<QAction*>* getToolActions();
QList<QAction*>* getMaterialActions();
protected:
virtual DocumentCommon* createNewDocument();
int& getNbDocument();
public slots:
DocumentCommon* onNewDoc();
void onCloseWindow();
void onUseVBO();
virtual void onCloseDocument( DocumentCommon* theDoc );
virtual void onSelectionChanged();
virtual void onAbout();
void onViewToolBar();
void onViewStatusBar();
void onToolAction();
void onCreateNewView();
void onWindowActivated ( QWidget * w );
void windowsMenuAboutToShow();
void windowsMenuActivated( bool checked/*int id*/ );
void onSetMaterial( int theMaterial );
protected:
virtual void resizeEvent( QResizeEvent* );
bool isDocument();
QMenu* getFilePopup();
QAction* getFileSeparator();
QToolBar* getCasCadeBar();
private:
void createStandardOperations();
void createCasCadeOperations();
void createWindowPopup();
private:
int myNbDocuments;
bool myIsDocuments;
QList<QAction*> myStdActions;
QList<QAction*> myToolActions;
QList<QAction*> myMaterialActions;
//QList<DocumentCommon*> myDocuments;
QToolBar* myStdToolBar;
QToolBar* myCasCadeBar;
QMenu* myFilePopup;
QMenu* myWindowPopup;
QAction* myFileSeparator;
protected:
QList<DocumentCommon*> myDocuments;
};
#endif