1 // SUPERV SUPERVGUI : GUI for Supervisor component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SUPERVGUI_CanvasView.h
23 // Author : Natalia KOPNOVA
26 #ifndef SUPERVGUI_CanvasView_H
27 #define SUPERVGUI_CanvasView_H
29 #include "SUPERVGUI_Canvas.h"
30 #include <qpopupmenu.h>
32 //VRV: porting on Qt 3.0.5
33 #if QT_VERSION >= 0x030005
36 //VRV: porting on Qt 3.0.5
39 class SUPERVGUI_CanvasLink;
40 class SUPERVGUI_CanvasLinkBuilder;
42 class SUPERVGUI_CanvasView: public QCanvasView {
46 SUPERVGUI_CanvasView(SUPERVGUI_Canvas* theCanvas, SUPERVGUI_Main* theMain);
47 virtual ~SUPERVGUI_CanvasView();
49 SUPERVGUI_Main* getMain() const { return myMain; }
51 void ActivatePanning();
54 bool isAnyLinkCreating() const { return myIsLinkCreating; }
55 void startSketch(SUPERVGUI_CanvasPort* thePort);
58 void objectCreated(); // mkr : PAL8237
61 //VSR: 08/06/06 void addToStudy();
68 void changeBackground();
71 void contentsMouseMoveEvent(QMouseEvent* theEvent);
72 void contentsMouseReleaseEvent(QMouseEvent* theEvent);
73 void contentsMousePressEvent(QMouseEvent* theEvent);
74 void contentsMouseDoubleClickEvent(QMouseEvent* theEvent);
77 void onDestroyed(QObject* theObject);
84 void setHilighted(SUPERVGUI_CanvasLink* theLink);
85 void endSketch(SUPERVGUI_CanvasPort* thePort);
87 bool isHavingStreamPort() const;
89 SUPERVGUI_Main* myMain;
94 QPopupMenu* mySketchPopup;
97 int myShowToolBarItem;
99 bool myIsPanBtnClicked;
100 bool myIsPanActivated;
101 bool myIsFitWRActivated;
102 bool myIsZoomActivated;
103 bool myIsLinkCreating;
105 QCanvasItem* myCurrentItem;
107 QCanvasRectangle* mySelectedRect;
111 QPoint myGlobalPoint;
115 SUPERVGUI_CanvasLink* myHilighted;
116 SUPERVGUI_CanvasLinkBuilder* myLinkBuilder;