Salome HOME
bbaa2dfa39f04e00929afc473a1c8c81a94530b0
[modules/yacs.git] / src / genericgui / Scene.hxx
1 //  Copyright (C) 2006-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef _SCENE_HXX_
20 #define _SCENE_HXX_
21
22 #include <QGraphicsScene>
23 #include <QPointF>
24
25 namespace YACS
26 {
27   namespace HMI
28   {
29     class Scene: public QGraphicsScene
30     {
31     public:
32       Scene(QObject *parent = 0);
33       virtual ~Scene();
34       
35       static bool _autoComputeLinks;
36       static bool _simplifyLinks;
37       static bool _force2NodesLink;
38       
39       void setZoom(bool zooming);
40       bool isZooming();
41       
42     protected:
43       virtual void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent);
44       virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* mouseEvent);
45       virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent);
46       
47       bool _zooming;
48     };
49   }
50 }
51
52 #endif