Engauge Digitizer 2
Loading...
Searching...
No Matches
GuidelineStateDiscarded.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2019 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef GUIDELINE_STATE_DISCARDED_H
8#define GUIDELINE_STATE_DISCARDED_H
9
11
14{
15public:
19
20 virtual void begin ();
21 virtual QPointF convertGraphCoordinateToScreenPoint (double valueGraph) const;
22 virtual double convertScreenPointToGraphCoordinate (const QPointF &posScreen) const;
23 virtual bool doPaint () const;
24 virtual void end ();
25 virtual void handleActiveChange (bool active);
26 virtual void handleGuidelineMode (bool visible,
27 bool locked);
28 virtual void handleHoverEnterEvent ();
29 virtual void handleHoverLeaveEvent ();
30 virtual void handleMousePress (const QPointF &posScene);
31 virtual void handleMouseRelease (const QPointF &posScene);
32 virtual void handleState ();
33 virtual void handleTimeout ();
34 virtual EllipseParameters pointToEllipse (const QPointF &posScreen) const;
35 virtual QLineF pointToLine (const QPointF &posScreen) const;
36 virtual QString stateName () const;
37 virtual void updateWithLatestTransformation ();
38
39private:
41
42};
43
44#endif // GUIDELINE_STATE_DISCARDED_H
Parameters that define an ellipse about the specified center, at the specified angle from alignment w...
GuidelineStateContext & context() const
Context in charge of the state classes.
GuidelineStateAbstractBase(GuidelineStateContext &context)
Single constructor.
Context class for state machine that belongs to the Guideline class.
virtual void handleTimeout()
Handle timeout from Appearing state.
virtual QString stateName() const
Name of state as a string for debugging only.
virtual void handleHoverEnterEvent()
If transparent then make visible when hover starts.
GuidelineStateDiscarded(GuidelineStateContext &context)
Single constructor.
virtual void handleHoverLeaveEvent()
If previously transparent before hover enter then make transparent again.
virtual bool doPaint() const
Allow/skip painting of the owner Guideline.
virtual void handleGuidelineMode(bool visible, bool locked)
User toggled Guideline visibility and/or locked mode.
virtual QLineF pointToLine(const QPointF &posScreen) const
Return line parallel to an axis line, that passes through the specified point.
virtual void updateWithLatestTransformation()
Update given Transformation in GuidelineStateContext.
virtual void handleMouseRelease(const QPointF &posScene)
At the end of dragging, clone the Guideline that owns the state machine where these states live.
virtual double convertScreenPointToGraphCoordinate(const QPointF &posScreen) const
Convert screen point pair into single graph coordinate.
virtual EllipseParameters pointToEllipse(const QPointF &posScreen) const
Return ellipse representing constant range, that passes through the specified point.
virtual QPointF convertGraphCoordinateToScreenPoint(double valueGraph) const
Convert single graph coordinate into screen point pair.
virtual void handleMousePress(const QPointF &posScene)
At the start of dragging, convert the Guideline into an invisible handle and visible slaved deployed ...
virtual void handleActiveChange(bool active)
DigitizeState change so active status may (or may not) be toggled.
virtual void end()
Transition out of state.
virtual void begin()
Transition into state.