1 // Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
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, or (at your option) any later version.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef GRAPHICSVIEW_SCENE_H
21 #define GRAPHICSVIEW_SCENE_H
23 #include "GraphicsView.h"
25 #include <QGraphicsScene>
27 class QGraphicsRectItem;
30 Class : GraphicsView_Scene
31 Description : Scene of the graphics view
33 class GRAPHICSVIEW_API GraphicsView_Scene : public QGraphicsScene
38 GraphicsView_Scene( QObject* theParent = 0 );
39 ~GraphicsView_Scene();
42 void processRectChanged();
45 void onSceneRectChanged( const QRectF& theRect ); // for debug
48 virtual void keyPressEvent( QKeyEvent* );
49 virtual void keyReleaseEvent( QKeyEvent* );
50 virtual void mousePressEvent( QGraphicsSceneMouseEvent* );
51 virtual void mouseMoveEvent( QGraphicsSceneMouseEvent* );
52 virtual void mouseReleaseEvent( QGraphicsSceneMouseEvent* );
53 virtual void mouseDoubleClickEvent( QGraphicsSceneMouseEvent* );
54 virtual void wheelEvent( QGraphicsSceneWheelEvent* );
55 virtual void contextMenuEvent( QGraphicsSceneContextMenuEvent* );
57 virtual void dragEnterEvent( QGraphicsSceneDragDropEvent* );
58 virtual void dragLeaveEvent( QGraphicsSceneDragDropEvent* );
59 virtual void dragMoveEvent( QGraphicsSceneDragDropEvent* );
60 virtual void dropEvent( QGraphicsSceneDragDropEvent* );
63 void gsKeyEvent( QKeyEvent* );
64 void gsMouseEvent( QGraphicsSceneMouseEvent* );
65 void gsWheelEvent( QGraphicsSceneWheelEvent* );
66 void gsContextMenuEvent( QGraphicsSceneContextMenuEvent* );
68 void gsBoundingRectChanged();
71 QGraphicsRectItem* mySceneRectItem; // for debug