7#ifndef GUIDELINE_STATE_ABSTRACT_BASE_H
8#define GUIDELINE_STATE_ABSTRACT_BASE_H
45 virtual void end () = 0;
74 virtual QLineF
pointToLine (
const QPointF &posScreen)
const = 0;
const int APPEARING_TIMEOUT
Milliseconds before transition from Appearing state to Active state.
GuidelineState
Set of possible Guideline states. See class Guideline for more information.
Parameters that define an ellipse about the specified center, at the specified angle from alignment w...
virtual void handleHoverEnterEvent()=0
If transparent then make visible when hover starts.
virtual EllipseParameters pointToEllipse(const QPointF &posScreen) const =0
Return ellipse representing constant range, that passes through the specified point.
virtual void handleHoverLeaveEvent()=0
If previously transparent before hover enter then make transparent again.
QRectF sceneRect() const
Scene rectangle in screen coordinates (=pixels)
virtual QPointF convertGraphCoordinateToScreenPoint(double valueGraph) const =0
Convert single graph coordinate into screen point pair.
void handleMousePressCommon(const QPointF &posAbsolute, GuidelineState stateHandle, GuidelineState stateDeployed)
Common mouse press handling.
GuidelineStateContext & context() const
Context in charge of the state classes.
virtual void handleMouseRelease(const QPointF &posScene)=0
At the end of dragging, clone the Guideline that owns the state machine where these states live.
virtual void handleMousePress(const QPointF &posScene)=0
At the start of dragging, convert the Guideline into an invisible handle and visible slaved deployed ...
virtual ~GuidelineStateAbstractBase()
virtual QLineF pointToLine(const QPointF &posScreen) const =0
Return line parallel to an axis line, that passes through the specified point.
virtual double convertScreenPointToGraphCoordinate(const QPointF &posScreen) const =0
Convert screen point pair into single graph coordinate.
virtual void handleGuidelineMode(bool visibility, bool locked)=0
User toggled Guideline visibility and/or locked mode.
virtual void handleActiveChange(bool active)=0
DigitizeState change so active status may (or may not) be toggled.
virtual void begin()=0
Transition into state.
virtual void updateWithLatestTransformation()=0
Update given Transformation in GuidelineStateContext.
virtual void handleTimeout()=0
Handle timeout from Appearing state.
virtual QString stateName() const =0
Name of state as a string for debugging only.
virtual void end()=0
Transition out of state.
virtual bool doPaint() const =0
Allow/skip painting of the owner Guideline.
GuidelineStateAbstractBase(GuidelineStateContext &context)
Single constructor.
Context class for state machine that belongs to the Guideline class.