]> SALOME platform Git repositories - modules/superv.git/blob - src/SUPERVGUI/SUPERVGUI_ArrayView.h
Salome HOME
The previous version had syntax error on line 1293, now it was fixed.
[modules/superv.git] / src / SUPERVGUI / SUPERVGUI_ArrayView.h
1 //  SUPERV SUPERVGUI : GUI for Supervisor component
2 //
3 //  Copyright (C) 2003  OPEN CASCADE
4 //
5 //  File   : SUPERVGUI_ArrayView.h
6 //  Author : 
7 //  Module : SUPERV
8
9 #ifndef SUPERVGUI_ArrayView_H
10 #define SUPERVGUI_ArrayView_H
11
12 #include "SUPERVGUI_CanvasArray.h"
13 #include <qpopupmenu.h>
14 #include <qtooltip.h>
15
16 //VRV: porting on Qt 3.0.5
17 #if QT_VERSION >= 0x030005
18 #include <qcursor.h> 
19 #endif
20 //VRV: porting on Qt 3.0.5
21
22 class SUPERVGUI_Main;
23
24 class SUPERVGUI_ArrayView: public QCanvasView {
25   Q_OBJECT
26
27   public:
28     SUPERVGUI_ArrayView(SUPERVGUI_CanvasArray* theArray, SUPERVGUI_Main* theMain);
29     virtual ~SUPERVGUI_ArrayView();
30
31     SUPERVGUI_Main* getMain() const { return myMain; }
32
33     void ActivatePanning();
34     void ResetView();
35
36   public slots:
37     void addToStudy();
38     void changeBackground();
39
40   private:
41     void contentsMousePressEvent(QMouseEvent* theEvent);
42     void contentsMouseMoveEvent(QMouseEvent* theEvent);
43     void contentsMouseReleaseEvent(QMouseEvent* theEvent);
44
45     SUPERVGUI_Main* myMain;
46     QPopupMenu*     myPopup;
47     int             myAddStudyItem;
48
49     QCursor         myCursor;
50
51     QPoint   myGlobalPoint;
52
53     bool myIsPanActivated;
54
55 };
56
57 class SUPERVGUI_ToolTip: public QToolTip {
58
59   public:
60     SUPERVGUI_ToolTip(QWidget* theWidget, QToolTipGroup* theGroup = 0):
61       QToolTip(theWidget, theGroup) {}
62     ~SUPERVGUI_ToolTip() { remove(parentWidget()); }
63     
64     virtual void maybeTip(const QPoint& theP);
65 };
66
67 #endif