7fd59977 |
1 | #ifndef DOCUMENTCOMMON_H |
2 | #define DOCUMENTCOMMON_H |
3 | |
4 | #include "MDIWindow.h" |
5 | //#include "IESample.h" |
6 | |
55a40de8 |
7 | #include <Standard_WarningsDisable.hxx> |
7fd59977 |
8 | #include <QObject> |
9 | #include <QList> |
55a40de8 |
10 | #include <Standard_WarningsRestore.hxx> |
7fd59977 |
11 | |
12 | #include <AIS_InteractiveContext.hxx> |
13 | #include <V3d_Viewer.hxx> |
14 | |
15 | class ApplicationCommonWindow; |
16 | |
17 | class COMMONSAMPLE_EXPORT DocumentCommon : public QObject |
18 | { |
19 | Q_OBJECT |
20 | |
21 | public: |
22 | DocumentCommon( const int, ApplicationCommonWindow* ); |
23 | ~DocumentCommon(); |
24 | |
25 | ApplicationCommonWindow* getApplication(); |
26 | Handle(AIS_InteractiveContext) getContext(); |
27 | void removeView( MDIWindow* ); |
28 | void removeViews(); |
29 | int countOfWindow(); |
30 | void fitAll(); |
31 | |
32 | protected: |
861a7b03 |
33 | virtual MDIWindow* createNewMDIWindow(); |
7fd59977 |
34 | |
35 | signals: |
36 | void selectionChanged(); |
37 | void sendCloseDocument( DocumentCommon* ); |
38 | |
39 | public slots: |
40 | virtual void onCloseView( MDIWindow* ); |
861a7b03 |
41 | virtual void onCreateNewView(); |
7fd59977 |
42 | virtual void onMaterial(); |
e276548b |
43 | virtual void onMaterial( int ); |
7fd59977 |
44 | virtual void onDelete(); |
e276548b |
45 | |
7fd59977 |
46 | void onWireframe(); |
47 | void onShading(); |
48 | void onColor(); |
49 | void onTransparency(); |
50 | void onTransparency( int ); |
51 | |
52 | private: |
9764ccbb |
53 | Handle(V3d_Viewer) Viewer (const Standard_ExtString theName, |
54 | const Standard_CString theDomain, |
55 | const Standard_Real theViewSize, |
56 | const V3d_TypeOfOrientation theViewProj, |
57 | const Standard_Boolean theComputedMode, |
58 | const Standard_Boolean theDefaultComputedMode ); |
7fd59977 |
59 | |
60 | protected: |
61 | ApplicationCommonWindow* myApp; |
62 | QList<MDIWindow*> myViews; |
63 | Handle(V3d_Viewer) myViewer; |
64 | Handle(AIS_InteractiveContext) myContext; |
65 | int myIndex; |
66 | int myNbViews; |
67 | }; |
68 | |
69 | #endif |
70 | |
71 | |