MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
hlaBounceGraphicsScene.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <QGraphicsScene>
13 #include <QtCore/QRect>
14 
16 {
17  Q_OBJECT
18 
19 public:
20 
21  HlaBounceGraphicsScene(QObject * parent = 0 );
22  HlaBounceGraphicsScene(const QRectF & sceneRect, QObject * parent = 0);
23  HlaBounceGraphicsScene(qreal x, qreal y, qreal width, qreal height, QObject * parent = 0);
24  virtual ~HlaBounceGraphicsScene();
25 
26  // Enters/exits the graphics scene into a mode where it will draw a
27  // rectangle when the mouse is down
28  void setDrawRectangleMode(bool enable);
29 
30  // Returns the last rectangle to be drawn
31  QRect getLastRectangle() { return myLastRectangle; };
32 
33 protected:
34 
35  virtual void mousePressEvent(QGraphicsSceneMouseEvent* mouseEvent);
36  virtual void mouseMoveEvent(QGraphicsSceneMouseEvent* mouseEvent);
37  virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent* mouseEvent);
38 
39 signals:
40 
41  void mouseReleased(const QPointF&);
42 
43 protected:
44 
46  QGraphicsRectItem* myRectangle;
48 
49 };
virtual ~HlaBounceGraphicsScene()
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *mouseEvent)
bool myDrawRectangle
Definition: hlaBounceGraphicsScene.h:45
QGraphicsRectItem * myRectangle
Definition: hlaBounceGraphicsScene.h:46
virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *mouseEvent)
void setDrawRectangleMode(bool enable)
void mouseReleased(const QPointF &)
virtual void mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent)
HlaBounceGraphicsScene(QObject *parent=0)
QRect getLastRectangle()
Definition: hlaBounceGraphicsScene.h:31
QRect myLastRectangle
Definition: hlaBounceGraphicsScene.h:47
Definition: hlaBounceGraphicsScene.h:15

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)