1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 OPEN CASCADE
5 // File : SUPERVGUI_CanvasView.h
6 // Author : Natalia KOPNOVA
9 #ifndef SUPERVGUI_CanvasView_H
10 #define SUPERVGUI_CanvasView_H
12 #include "SUPERVGUI_Canvas.h"
13 #include <qpopupmenu.h>
15 //VRV: porting on Qt 3.0.5
16 #if QT_VERSION >= 0x030005
19 //VRV: porting on Qt 3.0.5
22 class SUPERVGUI_CanvasLink;
23 class SUPERVGUI_CanvasLinkBuilder;
25 class SUPERVGUI_CanvasView: public QCanvasView {
29 SUPERVGUI_CanvasView(SUPERVGUI_Canvas* theCanvas, SUPERVGUI_Main* theMain);
30 virtual ~SUPERVGUI_CanvasView();
32 SUPERVGUI_Main* getMain() const { return myMain; }
34 void ActivatePanning();
37 bool isAnyLinkCreating() const { return myIsLinkCreating; }
38 void startSketch(SUPERVGUI_CanvasPort* thePort);
47 void changeBackground();
50 void contentsMouseMoveEvent(QMouseEvent* theEvent);
51 void contentsMouseReleaseEvent(QMouseEvent* theEvent);
52 void contentsMousePressEvent(QMouseEvent* theEvent);
53 void contentsMouseDoubleClickEvent(QMouseEvent* theEvent);
56 void onDestroyed(QObject* theObject);
63 void setHilighted(SUPERVGUI_CanvasLink* theLink);
64 void endSketch(SUPERVGUI_CanvasPort* thePort);
66 SUPERVGUI_Main* myMain;
69 QPopupMenu* mySketchPopup;
73 bool myIsPanBtnClicked;
74 bool myIsPanActivated;
75 bool myIsZoomActivated;
76 bool myIsLinkCreating;
78 QCanvasItem* myCurrentItem;
87 SUPERVGUI_CanvasLink* myHilighted;
88 SUPERVGUI_CanvasLinkBuilder* myLinkBuilder;