]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_ViewWindow.h
Salome HOME
Connect to OCCT Viewer
[modules/shaper.git] / src / XGUI / XGUI_ViewWindow.h
1 #ifndef XGUI_ViewWindow_H
2 #define XGUI_ViewWindow_H
3
4 #include <QFrame>
5 #include <QIcon>
6
7 #include <V3d_View.hxx>
8 #include <V3d_Viewer.hxx>
9
10 class QLabel;
11 class QToolBar;
12 class XGUI_ViewPort;
13 class XGUI_Viewer;
14
15 class XGUI_ViewWindow : public QFrame
16 {
17     Q_OBJECT
18 public:
19     XGUI_ViewWindow(XGUI_Viewer* theViewer, 
20                     V3d_TypeOfView theType);
21
22     virtual ~XGUI_ViewWindow();
23
24 protected:
25     virtual void resizeEvent(QResizeEvent* theEvent);
26
27     virtual void changeEvent(QEvent* theEvent);
28
29     virtual void enterEvent(QEvent* theEvent);
30     virtual void leaveEvent(QEvent* theEvent);
31
32     virtual bool eventFilter(QObject *theObj, QEvent *theEvent);
33
34 private slots:
35     void onClose();
36     void onMinimize();
37     void onMaximize();
38
39 private:
40     enum WindowState { MinimizedState, MaximizedState, NormalState };
41
42
43     XGUI_Viewer* myViewer;
44
45     QLabel* myPicture;
46     QLabel* myGripWgt;
47     XGUI_ViewPort* myViewPort;
48     QToolBar* myViewBar;
49     QToolBar* myWindowBar;
50     QAction* myMinimizeBtn;
51     QAction* myMaximizeBtn;
52
53     QIcon MinimizeIco;
54     QIcon MaximizeIco;
55     QIcon CloseIco;
56     QIcon RestoreIco;
57     
58     bool myMoving;
59     QPoint myMousePnt;
60
61     WindowState myLastState;
62 };
63
64 #endif