Engauge Digitizer 2
|
Ellipse version of GuidelineAbstract. More...
#include <GuidelineEllipse.h>
Public Member Functions | |
GuidelineEllipse (QGraphicsScene &scene, Guidelines &guidelines, GuidelineState guidelineStateInitial, const QString &identifier) | |
Single constructor. | |
~GuidelineEllipse () | |
virtual bool | collidesWithPath (const QPainterPath &path, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const |
Override normal QGraphicsEllipseItem collision detection that covers ellipse boundary and entire interior region, to exclude the interior region. | |
virtual bool | getGraphicsItemSelected () const |
Wrapper for QGraphicsItem::isSelected. | |
virtual bool | getGraphicsItemAcceptHover () const |
Return true if accepting hover events. | |
virtual QGraphicsItem::GraphicsItemFlags | graphicsItemFlags () const |
Wraps QGraphicsItem::flags. | |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
Highlight this Guideline upon hover enter. | |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
Unset highlighting triggered by hover enter. | |
virtual QString | identifier () const |
Unique identifier from QGraphicsItem. | |
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) |
Forward movements to visible Guideline. | |
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event) |
Forward press event to state machine. | |
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) |
Cleanup after being dragged. | |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=Q_NULLPTR) |
Override painting so this disappears when selected. Selected Guidelines are never visible. | |
virtual void | removeFromScene (QGraphicsScene *scene) |
Make graphics item remove itself from the scene. | |
virtual void | setGraphicsItemAcceptHoverEvents (bool accept) |
Wrapper for QGraphicsItem::setAcceptHoverEvents. | |
virtual void | setGraphicsItemFlags (QGraphicsItem::GraphicsItemFlags flags) |
Wrapper for QGraphicsItem::setFlags. | |
virtual void | setGraphicsItemLine (const QLineF &line) |
Wrapper for QGraphicsLineItem::setLine. | |
virtual void | setGraphicsItemPen (const QColor &color, double lineWidth) |
Wrapper for QGraphicsItem::setPen. | |
virtual void | setGraphicsItemVisible (bool visible) |
Wrapper for QGraphicsItem::setVisible. | |
virtual void | setGraphicsItemZValue (double z) |
Wrapper for QGraphicsItem::setZValue. | |
virtual void | updateColor () |
Force a color update. | |
virtual void | updateGeometry (double valueGraph) |
Update the geometry so it passes through the specified coordinate value in graph coordinates. | |
virtual void | updateGeometry (const QPointF &posScreen) |
Update the geometry so it passes through the specified point in screen coordinates. | |
![]() | |
GuidelineAbstract (QGraphicsScene &scene) | |
Single constructor. | |
~GuidelineAbstract () | |
void | bindGuidelineVisibleToInvisible (GuidelineAbstract *guidelineVisible) |
Bind a newly-created visible Guideline to this Guideline, and make this one invisible. | |
void | handleActiveChange (bool active) |
DigitizeState change so active status may (or may not) be toggled. | |
void | handleGuidelineMode (bool visible, bool locked) |
User toggled Guideline visibility and/or locked mode. | |
void | handleHoverEnterEvent () |
Highlight this Guideline upon hover enter. | |
void | handleHoverLeaveEvent () |
Unset highlighting triggered by hover enter. | |
void | handleMouseMoveEvent (const QPointF &posScene) |
Forward movements to visible Guideline. | |
void | handleMousePressEvent (const QPointF &posScene) |
Forward press event to state machine. | |
void | handleMouseReleaseEvent (const QPointF &posScene) |
Cleanup after being dragged. | |
QPointF | posCursorGraph () const |
Get position in graph coordinates. | |
void | sacrificeHandleAndVisibleGuidelines (const QPointF &posScene, GuidelineState guidelineStateForReplacement) |
Replace visible and handle Guidelines after click and drag. | |
QGraphicsScene & | scene () |
GraphicsScene that owns this class. | |
QString | stateDump () const |
Dump of state as a string for debugging only. Context like the QGraphicsItem flags is included. | |
QString | stateName () const |
Current state name for debugging and unit test only. | |
void | updateActive (bool active) |
Update active versus inactive state. | |
void | updateWithLatestTransformation () |
Update given Transformation in GuidelineStateContext. This is called after a command has been executed. | |
Additional Inherited Members | |
![]() | |
void | slotHandleMoved (QPointF posScreen) |
Slot for signal from cloned deployed Guideline from handle Guideline. | |
![]() | |
void | signalGuidelineDragged (QString, double, bool, GuidelineState) |
Signal indicating end of Guideline drag. | |
void | signalHandleMoved (QPointF) |
Signal for cloned deployed Guideline from handle Guideline. | |
![]() | |
GuidelineStateContext * | context () |
State machine context owned by this class. | |
const GuidelineStateContext * | context () const |
State machine context owned by this class as a const. | |
void | setContext (GuidelineStateContext *context) |
Create state machine after virtual methods of child classes have been defined. | |
Ellipse version of GuidelineAbstract.
Definition at line 21 of file GuidelineEllipse.h.
GuidelineEllipse::GuidelineEllipse | ( | QGraphicsScene & | scene, |
Guidelines & | guidelines, | ||
GuidelineState | guidelineStateInitial, | ||
const QString & | identifier ) |
Single constructor.
Definition at line 26 of file GuidelineEllipse.cpp.
GuidelineEllipse::~GuidelineEllipse | ( | ) |
Definition at line 46 of file GuidelineEllipse.cpp.
|
virtual |
Override normal QGraphicsEllipseItem collision detection that covers ellipse boundary and entire interior region, to exclude the interior region.
Definition at line 50 of file GuidelineEllipse.cpp.
|
virtual |
Return true if accepting hover events.
Implements GuidelineAbstract.
Definition at line 105 of file GuidelineEllipse.cpp.
|
virtual |
Wrapper for QGraphicsItem::isSelected.
Implements GuidelineAbstract.
Definition at line 110 of file GuidelineEllipse.cpp.
|
virtual |
Wraps QGraphicsItem::flags.
Implements GuidelineAbstract.
Definition at line 115 of file GuidelineEllipse.cpp.
|
virtual |
Highlight this Guideline upon hover enter.
Definition at line 120 of file GuidelineEllipse.cpp.
|
virtual |
Unset highlighting triggered by hover enter.
Definition at line 127 of file GuidelineEllipse.cpp.
|
virtual |
Unique identifier from QGraphicsItem.
Implements GuidelineAbstract.
Definition at line 134 of file GuidelineEllipse.cpp.
|
virtual |
Forward movements to visible Guideline.
Definition at line 139 of file GuidelineEllipse.cpp.
|
virtual |
Forward press event to state machine.
Definition at line 146 of file GuidelineEllipse.cpp.
|
virtual |
Cleanup after being dragged.
Definition at line 157 of file GuidelineEllipse.cpp.
|
virtual |
Override painting so this disappears when selected. Selected Guidelines are never visible.
Definition at line 166 of file GuidelineEllipse.cpp.
|
virtual |
Make graphics item remove itself from the scene.
Implements GuidelineAbstract.
Definition at line 178 of file GuidelineEllipse.cpp.
Wrapper for QGraphicsItem::setAcceptHoverEvents.
Implements GuidelineAbstract.
Definition at line 186 of file GuidelineEllipse.cpp.
|
virtual |
Wrapper for QGraphicsItem::setFlags.
Implements GuidelineAbstract.
Definition at line 191 of file GuidelineEllipse.cpp.
Wrapper for QGraphicsLineItem::setLine.
Implements GuidelineAbstract.
Definition at line 196 of file GuidelineEllipse.cpp.
Wrapper for QGraphicsItem::setPen.
Implements GuidelineAbstract.
Definition at line 201 of file GuidelineEllipse.cpp.
Wrapper for QGraphicsItem::setVisible.
Implements GuidelineAbstract.
Definition at line 210 of file GuidelineEllipse.cpp.
Wrapper for QGraphicsItem::setZValue.
Implements GuidelineAbstract.
Definition at line 215 of file GuidelineEllipse.cpp.
|
virtual |
Force a color update.
Implements GuidelineAbstract.
Definition at line 220 of file GuidelineEllipse.cpp.
Update the geometry so it passes through the specified point in screen coordinates.
Implements GuidelineAbstract.
Definition at line 243 of file GuidelineEllipse.cpp.
Update the geometry so it passes through the specified coordinate value in graph coordinates.
Implements GuidelineAbstract.
Definition at line 236 of file GuidelineEllipse.cpp.