Engauge Digitizer 2
|
Line version of GuidelineAbstract. More...
#include <GuidelineLine.h>
Public Member Functions | |
GuidelineLine (QGraphicsScene &scene, Guidelines &guidelines, GuidelineState guidelineStateInitial, const QString &identifier) | |
Single constructor. | |
~GuidelineLine () | |
virtual bool | getGraphicsItemAcceptHover () const |
Return true if accepting hover events. | |
virtual bool | getGraphicsItemSelected () const |
Wrapper for QGraphicsItem::isSelected. | |
virtual QGraphicsItem::GraphicsItemFlags | graphicsItemFlags () const |
Wraps QGraphicsItem::flags. | |
void | handleVisibilityChange (bool visible) |
User toggled guideline visibility. | |
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. | |
Line version of GuidelineAbstract.
Definition at line 21 of file GuidelineLine.h.
GuidelineLine::GuidelineLine | ( | QGraphicsScene & | scene, |
Guidelines & | guidelines, | ||
GuidelineState | guidelineStateInitial, | ||
const QString & | identifier ) |
Single constructor.
Definition at line 25 of file GuidelineLine.cpp.
GuidelineLine::~GuidelineLine | ( | ) |
Definition at line 44 of file GuidelineLine.cpp.
|
virtual |
Return true if accepting hover events.
Implements GuidelineAbstract.
Definition at line 48 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsItem::isSelected.
Implements GuidelineAbstract.
Definition at line 53 of file GuidelineLine.cpp.
|
virtual |
Wraps QGraphicsItem::flags.
Implements GuidelineAbstract.
Definition at line 58 of file GuidelineLine.cpp.
|
virtual |
Highlight this Guideline upon hover enter.
Definition at line 63 of file GuidelineLine.cpp.
|
virtual |
Unset highlighting triggered by hover enter.
Definition at line 70 of file GuidelineLine.cpp.
|
virtual |
Unique identifier from QGraphicsItem.
Implements GuidelineAbstract.
Definition at line 77 of file GuidelineLine.cpp.
|
virtual |
Forward movements to visible Guideline.
Definition at line 82 of file GuidelineLine.cpp.
|
virtual |
Forward press event to state machine.
Definition at line 89 of file GuidelineLine.cpp.
|
virtual |
Cleanup after being dragged.
Definition at line 98 of file GuidelineLine.cpp.
|
virtual |
Override painting so this disappears when selected. Selected Guidelines are never visible.
Definition at line 107 of file GuidelineLine.cpp.
|
virtual |
Make graphics item remove itself from the scene.
Implements GuidelineAbstract.
Definition at line 119 of file GuidelineLine.cpp.
Wrapper for QGraphicsItem::setAcceptHoverEvents.
Implements GuidelineAbstract.
Definition at line 127 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsItem::setFlags.
Implements GuidelineAbstract.
Definition at line 132 of file GuidelineLine.cpp.
Wrapper for QGraphicsLineItem::setLine.
Implements GuidelineAbstract.
Definition at line 137 of file GuidelineLine.cpp.
Wrapper for QGraphicsItem::setPen.
Implements GuidelineAbstract.
Definition at line 142 of file GuidelineLine.cpp.
Wrapper for QGraphicsItem::setVisible.
Implements GuidelineAbstract.
Definition at line 151 of file GuidelineLine.cpp.
Wrapper for QGraphicsItem::setZValue.
Implements GuidelineAbstract.
Definition at line 156 of file GuidelineLine.cpp.
|
virtual |
Force a color update.
Implements GuidelineAbstract.
Definition at line 161 of file GuidelineLine.cpp.
Update the geometry so it passes through the specified point in screen coordinates.
Implements GuidelineAbstract.
Definition at line 185 of file GuidelineLine.cpp.
Update the geometry so it passes through the specified coordinate value in graph coordinates.
Implements GuidelineAbstract.
Definition at line 178 of file GuidelineLine.cpp.