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);
48 void changeBackground();
51 void contentsMouseMoveEvent(QMouseEvent* theEvent);
52 void contentsMouseReleaseEvent(QMouseEvent* theEvent);
53 void contentsMousePressEvent(QMouseEvent* theEvent);
54 void contentsMouseDoubleClickEvent(QMouseEvent* theEvent);
57 void onDestroyed(QObject* theObject);
64 void setHilighted(SUPERVGUI_CanvasLink* theLink);
65 void endSketch(SUPERVGUI_CanvasPort* thePort);
67 SUPERVGUI_Main* myMain;
71 QPopupMenu* mySketchPopup;
75 bool myIsPanBtnClicked;
76 bool myIsPanActivated;
77 bool myIsFitWRActivated;
78 bool myIsZoomActivated;
79 bool myIsLinkCreating;
81 QCanvasItem* myCurrentItem;
83 QCanvasRectangle* mySelectedRect;
91 SUPERVGUI_CanvasLink* myHilighted;
92 SUPERVGUI_CanvasLinkBuilder* myLinkBuilder;