Engauge Digitizer 2
Loading...
Searching...
No Matches
GuidelineStateDeployedConstantTUnselectLock Class Reference

Implements guideline behavior for GUIDELINE_STATE_DEPLOYED_CONSTANT_T_UNSELECT_LOCK. More...

#include <GuidelineStateDeployedConstantTUnselectLock.h>

Inheritance diagram for GuidelineStateDeployedConstantTUnselectLock:
Inheritance graph
Collaboration diagram for GuidelineStateDeployedConstantTUnselectLock:
Collaboration graph

Public Member Functions

 GuidelineStateDeployedConstantTUnselectLock (GuidelineStateContext &context)
 Single constructor.
virtual ~GuidelineStateDeployedConstantTUnselectLock ()
virtual void begin ()
 Transition into state.
virtual bool doPaint () const
 Allow/skip painting of the owner Guideline.
virtual void end ()
 Transition out of state.
virtual void handleActiveChange (bool active)
 DigitizeState change so active status may (or may not) be toggled.
virtual void handleGuidelineMode (bool visible, bool locked)
 User toggled Guideline visibility and/or locked mode.
virtual void handleHoverEnterEvent ()
 If transparent then make visible when hover starts.
virtual void handleHoverLeaveEvent ()
 If previously transparent before hover enter then make transparent again.
virtual void handleMousePress (const QPointF &posScene)
 At the start of dragging, convert the Guideline into an invisible handle and visible slaved deployed Guideline.
virtual QString stateName () const
 Name of state as a string for debugging only.
Public Member Functions inherited from GuidelineStateDeployedConstantTAbstract
 GuidelineStateDeployedConstantTAbstract (GuidelineStateContext &context)
 Single constructor.
virtual ~GuidelineStateDeployedConstantTAbstract ()
virtual QPointF convertGraphCoordinateToScreenPoint (double valueGraph) const
 Convert single graph coordinate into screen point pair.
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 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.
Public Member Functions inherited from GuidelineStateDeployedAbstract
 GuidelineStateDeployedAbstract (GuidelineStateContext &context)
 Single constructor.
virtual ~GuidelineStateDeployedAbstract ()
virtual void handleMouseRelease (const QPointF &posScene)
 At the end of dragging, clone the Guideline that owns the state machine where these states live.
virtual void handleTimeout ()
 Handle timeout from Appearing state.
Public Member Functions inherited from GuidelineStateAbstractBase
 GuidelineStateAbstractBase (GuidelineStateContext &context)
 Single constructor.
virtual ~GuidelineStateAbstractBase ()

Additional Inherited Members

Protected Member Functions inherited from GuidelineStateDeployedAbstract
void beginCommon (bool hovering, bool locked)
 Initialization common to all states.
Protected Member Functions inherited from GuidelineStateAbstractBase
GuidelineStateContextcontext () const
 Context in charge of the state classes.
void handleMousePressCommon (const QPointF &posAbsolute, GuidelineState stateHandle, GuidelineState stateDeployed)
 Common mouse press handling.
QRectF sceneRect () const
 Scene rectangle in screen coordinates (=pixels)

Detailed Description

Implements guideline behavior for GUIDELINE_STATE_DEPLOYED_CONSTANT_T_UNSELECT_LOCK.

Definition at line 13 of file GuidelineStateDeployedConstantTUnselectLock.h.

Constructor & Destructor Documentation

◆ GuidelineStateDeployedConstantTUnselectLock()

GuidelineStateDeployedConstantTUnselectLock::GuidelineStateDeployedConstantTUnselectLock ( GuidelineStateContext & context)

Single constructor.

Definition at line 15 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

15 :
17{
18}
GuidelineStateContext & context() const
Context in charge of the state classes.
GuidelineStateDeployedConstantTAbstract(GuidelineStateContext &context)
Single constructor.

◆ ~GuidelineStateDeployedConstantTUnselectLock()

GuidelineStateDeployedConstantTUnselectLock::~GuidelineStateDeployedConstantTUnselectLock ( )
virtual

Definition at line 20 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

21{
22}

Member Function Documentation

◆ begin()

void GuidelineStateDeployedConstantTUnselectLock::begin ( )
virtual

Transition into state.

Implements GuidelineStateAbstractBase.

Definition at line 24 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

25{
26 LOG4CPP_INFO_S ((*mainCat)) << "GuidelineStateDeployedConstantTUnselectLock::begin"
27 << " identifier=" << context().guideline().identifier().toLatin1().data();
28
29 beginCommon (false,
30 true);
31
32 context().guideline().setGraphicsItemVisible (true); // Stop hover and painting (doPoint only stops painting)
33}
log4cpp::Category * mainCat
Definition Logger.cpp:14
virtual QString identifier() const =0
Unique identifier from QGraphicsItem.
virtual void setGraphicsItemVisible(bool visible)=0
Wrapper for QGraphicsItem::setVisible.
GuidelineAbstract & guideline()
Guideline that owns this context class.
void beginCommon(bool hovering, bool locked)
Initialization common to all states.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

◆ doPaint()

bool GuidelineStateDeployedConstantTUnselectLock::doPaint ( ) const
virtual

Allow/skip painting of the owner Guideline.

This prevents display of selection markings on otherwise-invisible handle Guideline

Implements GuidelineStateAbstractBase.

Definition at line 35 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

36{
37 return true;
38}

◆ end()

void GuidelineStateDeployedConstantTUnselectLock::end ( )
virtual

Transition out of state.

Reimplemented from GuidelineStateDeployedAbstract.

Definition at line 40 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

41{
42 LOG4CPP_INFO_S ((*mainCat)) << "GuidelineStateDeployedConstantTUnselectLock::end";
43}

◆ handleActiveChange()

void GuidelineStateDeployedConstantTUnselectLock::handleActiveChange ( bool active)
virtual

DigitizeState change so active status may (or may not) be toggled.

Implements GuidelineStateAbstractBase.

Definition at line 45 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

46{
47 if (active) {
49 }
50}
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_T_SELECT_LOCK
void requestStateTransition(GuidelineState guidelineState)
Request a state transition.

◆ handleGuidelineMode()

void GuidelineStateDeployedConstantTUnselectLock::handleGuidelineMode ( bool visibility,
bool locked )
virtual

User toggled Guideline visibility and/or locked mode.

Implements GuidelineStateAbstractBase.

Definition at line 52 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

54{
55 if (!visible) {
57 } else if (locked) {
59 }
60}
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_T_UNSELECT_LOCK
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_T_UNSELECT_HIDE

◆ handleHoverEnterEvent()

void GuidelineStateDeployedConstantTUnselectLock::handleHoverEnterEvent ( )
virtual

If transparent then make visible when hover starts.

Implements GuidelineStateAbstractBase.

Definition at line 62 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

63{
64}

◆ handleHoverLeaveEvent()

void GuidelineStateDeployedConstantTUnselectLock::handleHoverLeaveEvent ( )
virtual

If previously transparent before hover enter then make transparent again.

Implements GuidelineStateAbstractBase.

Definition at line 66 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

67{
68}

◆ handleMousePress()

void GuidelineStateDeployedConstantTUnselectLock::handleMousePress ( const QPointF & posScene)
virtual

At the start of dragging, convert the Guideline into an invisible handle and visible slaved deployed Guideline.

Implements GuidelineStateAbstractBase.

Definition at line 70 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

71{
72}

◆ stateName()

QString GuidelineStateDeployedConstantTUnselectLock::stateName ( ) const
virtual

Name of state as a string for debugging only.

Implements GuidelineStateAbstractBase.

Definition at line 74 of file GuidelineStateDeployedConstantTUnselectLock.cpp.

75{
77}
QString guidelineStateAsString(GuidelineState state)

The documentation for this class was generated from the following files: