0024479: Ray Tracing mode does not work in Qt IE sample
[occt.git] / samples / qt / Common / src / DocumentCommon.h
1 #ifndef DOCUMENTCOMMON_H
2 #define DOCUMENTCOMMON_H
3
4 #include "MDIWindow.h"
5 //#include "IESample.h"
6
7 #include <QObject>
8 #include <QList>
9
10 #include <AIS_InteractiveContext.hxx>
11 #include <V3d_Viewer.hxx>
12
13 class ApplicationCommonWindow;
14
15 class COMMONSAMPLE_EXPORT DocumentCommon : public QObject
16 {
17         Q_OBJECT
18
19 public:
20         DocumentCommon( const int, ApplicationCommonWindow* );
21         ~DocumentCommon();
22
23         ApplicationCommonWindow*       getApplication();
24         Handle(AIS_InteractiveContext) getContext();
25         void                           removeView( MDIWindow* );
26   void                           removeViews();
27         int                            countOfWindow();
28         void                           fitAll();
29         
30 protected:
31   virtual MDIWindow*                   createNewMDIWindow();
32
33 signals:
34   void                           selectionChanged();
35         void                           sendCloseDocument( DocumentCommon* );
36
37 public slots:
38         virtual void                   onCloseView( MDIWindow* );
39         virtual void                   onCreateNewView();
40         virtual void                   onMaterial();
41   virtual void                   onMaterial( int );
42         virtual void                   onDelete();
43
44         void                           onWireframe();
45         void                           onShading();
46         void                           onColor();
47         void                           onTransparency();
48         void                           onTransparency( int );
49
50 private:
51   Handle(V3d_Viewer)             Viewer( const Standard_CString aDisplay,
52                                                        const Standard_ExtString aName,
53                                                        const Standard_CString aDomain,
54                                                        const Standard_Real ViewSize,
55                                                        const V3d_TypeOfOrientation ViewProj,
56                                                        const Standard_Boolean ComputedMode,
57                                                        const Standard_Boolean aDefaultComputedMode );
58
59 protected:
60         ApplicationCommonWindow*       myApp;
61         QList<MDIWindow*>              myViews;
62         Handle(V3d_Viewer)             myViewer;
63         Handle(AIS_InteractiveContext) myContext;
64         int                            myIndex;
65   int                            myNbViews;
66 };
67
68 #endif
69
70