Engauge Digitizer 2
|
Line version of GuidelineAbstract. More...
#include <GuidelineLine.h>
Public Member Functions | |
GuidelineLine (QGraphicsScene &scene, MainWindow &mainWindow, 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. | |
Public Member Functions inherited from GuidelineAbstract | |
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 | |
Public Slots inherited from GuidelineAbstract | |
void | slotHandleMoved (QPointF posScreen) |
Slot for signal from cloned deployed Guideline from handle Guideline. | |
Signals inherited from GuidelineAbstract | |
void | signalGuidelineDragged (QString, double, bool, GuidelineState) |
Signal indicating end of Guideline drag. | |
void | signalHandleMoved (QPointF) |
Signal for cloned deployed Guideline from handle Guideline. | |
Protected Member Functions inherited from GuidelineAbstract | |
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 22 of file GuidelineLine.h.
GuidelineLine::GuidelineLine | ( | QGraphicsScene & | scene, |
MainWindow & | mainWindow, | ||
Guidelines & | guidelines, | ||
GuidelineState | guidelineStateInitial, | ||
const QString & | identifier ) |
Single constructor.
Definition at line 25 of file GuidelineLine.cpp.
GuidelineLine::~GuidelineLine | ( | ) |
Definition at line 47 of file GuidelineLine.cpp.
|
virtual |
Return true if accepting hover events.
Implements GuidelineAbstract.
Definition at line 51 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsItem::isSelected.
Implements GuidelineAbstract.
Definition at line 56 of file GuidelineLine.cpp.
|
virtual |
Wraps QGraphicsItem::flags.
Implements GuidelineAbstract.
Definition at line 61 of file GuidelineLine.cpp.
void GuidelineLine::handleVisibilityChange | ( | bool | visible | ) |
User toggled guideline visibility.
|
virtual |
Highlight this Guideline upon hover enter.
Definition at line 66 of file GuidelineLine.cpp.
|
virtual |
Unset highlighting triggered by hover enter.
Definition at line 73 of file GuidelineLine.cpp.
|
virtual |
Unique identifier from QGraphicsItem.
Implements GuidelineAbstract.
Definition at line 80 of file GuidelineLine.cpp.
|
virtual |
Forward movements to visible Guideline.
Definition at line 85 of file GuidelineLine.cpp.
|
virtual |
Forward press event to state machine.
Definition at line 92 of file GuidelineLine.cpp.
|
virtual |
Cleanup after being dragged.
Definition at line 101 of file GuidelineLine.cpp.
|
virtual |
Override painting so this disappears when selected. Selected Guidelines are never visible.
Definition at line 110 of file GuidelineLine.cpp.
|
virtual |
Make graphics item remove itself from the scene.
Implements GuidelineAbstract.
Definition at line 122 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsItem::setAcceptHoverEvents.
Implements GuidelineAbstract.
Definition at line 130 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsItem::setFlags.
Implements GuidelineAbstract.
Definition at line 135 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsLineItem::setLine.
Implements GuidelineAbstract.
Definition at line 140 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsItem::setPen.
Implements GuidelineAbstract.
Definition at line 145 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsItem::setVisible.
Implements GuidelineAbstract.
Definition at line 154 of file GuidelineLine.cpp.
|
virtual |
Wrapper for QGraphicsItem::setZValue.
Implements GuidelineAbstract.
Definition at line 159 of file GuidelineLine.cpp.
|
virtual |
Force a color update.
Implements GuidelineAbstract.
Definition at line 164 of file GuidelineLine.cpp.
|
virtual |
Update the geometry so it passes through the specified point in screen coordinates.
Implements GuidelineAbstract.
Definition at line 188 of file GuidelineLine.cpp.
|
virtual |
Update the geometry so it passes through the specified coordinate value in graph coordinates.
Implements GuidelineAbstract.
Definition at line 181 of file GuidelineLine.cpp.