Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Graphics
GraphicsPointEllipse.h
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3
* under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4
* LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5
******************************************************************************************************/
6
7
#ifndef GRAPHICS_POINT_ELLIPSE_H
8
#define GRAPHICS_POINT_ELLIPSE_H
9
10
#include <QGraphicsEllipseItem>
11
#include <QObject>
12
#include <QPointF>
13
14
class
GraphicsPoint
;
15
17
class
GraphicsPointEllipse
:
public
QObject,
public
QGraphicsEllipseItem
18
{
19
Q_OBJECT;
20
21
public
:
23
GraphicsPointEllipse
(
GraphicsPoint
&graphicsPoint,
24
const
QRect &rect);
25
27
QVariant
itemChange
(GraphicsItemChange change,
const
QVariant &value);
28
30
virtual
void
hoverEnterEvent
(QGraphicsSceneHoverEvent *event);
31
33
virtual
void
hoverLeaveEvent
(QGraphicsSceneHoverEvent *event);
34
36
void
setRadius
(
int
radius);
37
39
void
setShadow
(
GraphicsPointEllipse
*shadow);
40
41
signals:
42
44
void
signalPointHoverEnter
(QString);
45
47
void
signalPointHoverLeave
(QString);
48
49
private
:
50
GraphicsPointEllipse
();
51
52
void
setOpacityForSubtree (
double
opacity);
53
54
// Reference to the GraphicsPoint that this class belongs to
55
GraphicsPoint
&m_graphicsPoint;
56
57
GraphicsPointEllipse
*m_shadow;
58
};
59
60
#endif
// GRAPHICS_POINT_ELLIPSE_H
GraphicsPointEllipse::hoverEnterEvent
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Accept hover so point can be highlighted when cursor is over it as a guide to user.
Definition
GraphicsPointEllipse.cpp:24
GraphicsPointEllipse::setShadow
void setShadow(GraphicsPointEllipse *shadow)
Bind this graphics item to its shadow.
Definition
GraphicsPointEllipse.cpp:81
GraphicsPointEllipse::signalPointHoverEnter
void signalPointHoverEnter(QString)
Signal for geometry window to highlight the current point upon hover enter.
GraphicsPointEllipse::signalPointHoverLeave
void signalPointHoverLeave(QString)
Signal for geometry window to unhighlight the current point upon hover leave.
GraphicsPointEllipse::itemChange
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Intercept moves by dragging so moved items can be identified. This replaces unreliable hit tests.
Definition
GraphicsPointEllipse.cpp:44
GraphicsPointEllipse::GraphicsPointEllipse
GraphicsPointEllipse(GraphicsPoint &graphicsPoint, const QRect &rect)
Single constructor.
Definition
GraphicsPointEllipse.cpp:15
GraphicsPointEllipse::setRadius
void setRadius(int radius)
Update the radius.
Definition
GraphicsPointEllipse.cpp:72
GraphicsPointEllipse::hoverLeaveEvent
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Unhighlight this point.
Definition
GraphicsPointEllipse.cpp:34
GraphicsPoint
Graphics item for drawing a circular or polygonal Point.
Definition
GraphicsPoint.h:44
Generated on
for Engauge Digitizer by
1.17.0