0024130: Implementing ray tracing visualization core
[occt.git] / samples / qt / Common / src / MDIWindow.h
1 #ifndef MDIWINDOW_H
2 #define MDIWINDOW_H
3
4 #include <QMainWindow>
5 #include "CommonSample.h"
6
7 class DocumentCommon;
8 class View;
9
10 class COMMONSAMPLE_EXPORT MDIWindow: public QMainWindow
11 {
12     Q_OBJECT
13
14 public:
15   MDIWindow( DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags, bool theRT = false );
16   MDIWindow( View* aView, DocumentCommon* aDocument, QWidget* parent, Qt::WindowFlags wflags );
17   ~MDIWindow();
18
19         DocumentCommon*            getDocument();
20         void                       fitAll();
21   virtual QSize              sizeHint() const;
22
23 #ifdef HAVE_OPENCL
24
25   void                       setRaytracedShadows( int state );
26   void                       setRaytracedReflections( int state );
27   void                       setRaytracedAntialiasing( int state );
28
29   bool                       ShadowsEnabled() { return myShadowsEnabled; }
30   bool                       ReflectionsEnabled() { return myReflectionsEnabled; }
31   bool                       AntialiasingEnabled() { return myAntialiasingEnabled; }
32
33 #endif
34
35 signals:
36   void                       selectionChanged();
37   void                       message(const QString&, int );
38         void                       sendCloseView(MDIWindow* theView);
39
40 public slots:
41   void                       closeEvent(QCloseEvent* e);        
42   void                       onWindowActivated ();
43   void                       dump();
44
45 protected:
46   void                       createViewActions();
47
48 protected:
49   DocumentCommon*            myDocument;
50   View*                      myView;
51
52 #ifdef HAVE_OPENCL
53
54   bool                       myShadowsEnabled;
55   bool                       myReflectionsEnabled;
56   bool                       myAntialiasingEnabled;
57
58 #endif
59 };
60
61 #endif
62