7#ifndef GUIDELINE_STATE_CONTEXT_H
8#define GUIDELINE_STATE_CONTEXT_H
196 QLineF
pointToLine (
const QPointF &posScreen)
const;
227 void transitionIfRequested ();
234 QVector<GuidelineStateAbstractBase*> m_states;
238 QPointF m_posCursorGraph;
GuidelineState
Set of possible Guideline states. See class Guideline for more information.
Model for managing the coordinate values corresponding Guidelines.
Parameters that define an ellipse about the specified center, at the specified angle from alignment w...
This class is a special case of the standard QGraphicsLineItem for guidelines, and serves as the base...
QPointF convertGraphCoordinateToScreenPoint(double valueGraph) const
Convert single graph coordinate into screen point pair.
bool doPaint() const
Allow/skip painting of the owner Guideline.
Transformation transformation() const
Return copy of transformation owned by MainWindow.
void draggedOffScreen()
Guideline has been dragged off screen so remove it.
QString stateDump() const
Dump state for debugging only.
void handleActiveChange(bool active)
DigitizeState change so active status may (or may not) be toggled.
QPointF posCursorGraph() const
Get method for current cursor coordinate when object was last created/dragged.
void handleHoverLeaveEvent()
If previously transparent before hover enter then make transparent again.
bool cartesian() const
True/false if coordinates are cartesian/polar.
GuidelineAbstract & guideline()
Guideline that owns this context class.
ColorPalette color() const
Color to be used for guidelines.
void setPosCursorGraph(const QPointF &posGraph)
Pass the current cursor coordinate to the state so it can save the relevant coordinate for later adju...
QLineF pointToLine(const QPointF &posScreen) const
Return line parallel to an axis line, that passes through the specified point.
GuidelineStateContext(GuidelineAbstract &guideline, MainWindow &mainWindow, Guidelines &guidelines, GuidelineState guidelineStateInitial)
Single constructor.
double convertScreenPointToGraphCoordinate(const QPointF &posScreen) const
Convert screen point pair into single graph coordinate.
QString stateName() const
State as a string for debugging only.
void requestStateTransition(GuidelineState guidelineState)
Request a state transition.
EllipseParameters pointToEllipse(const QPointF &posScreen) const
Return ellipse representing constant range, that passes through the specified point.
virtual ~GuidelineStateContext()
void handleMousePress(const QPointF &posScene)
At the start of dragging, convert the original Guideline into an invisible handle and visible slaved ...
void handleHoverEnterEvent()
If transparent then make visible when hover starts.
void handleGuidelineMode(bool visibile, bool locked)
User toggled Guideline visibility and/or locked mode.
DocumentModelGuideline modelGuideline() const
Up-to-date guideline settings.
void updateWithLatestTransformation()
Update given Transformation in GuidelineStateContext.
void handleMouseRelease(const QPointF &posScene)
At the end of dragging, clone the Guideline that owns the state machine where these states live.
GuidelineAbstract * createGuideline(const QString &identifier, GuidelineState stateInitial) const
Factory method for creating a new Guideline.
This class contains all Guideline objects.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...