Engauge Digitizer 2
Loading...
Searching...
No Matches
GuidelineStateDeployedConstantXUnselectHide.cpp
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#include "EngaugeAssert.h"
8#include "GuidelineAbstract.h"
9#include "GuidelineFormat.h"
10#include "GuidelineState.h"
13#include "Logger.h"
14#include "Transformation.h"
15
20
24
26{
27 LOG4CPP_INFO_S ((*mainCat)) << "GuidelineStateDeployedConstantXUnselectHide::begin"
28 << " identifier=" << context().guideline().identifier().toLatin1().data();
29
31 false);
32
33 context().guideline().setGraphicsItemVisible (false); // Stop hover and painting (doPoint only stops painting)
34}
35
37{
38 return false;
39}
40
42{
43 LOG4CPP_INFO_S ((*mainCat)) << "GuidelineStateDeployedConstantXUnselectHide::end";
44}
45
49
57
61
65
67{
68}
69
QString guidelineStateAsString(GuidelineState state)
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_X_UNSELECT_HIDE
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_X_UNSELECT_LOCK
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.
GuidelineStateContext & context() const
Context in charge of the state classes.
Context class for state machine that belongs to the Guideline class.
GuidelineAbstract & guideline()
Guideline that owns this context class.
void requestStateTransition(GuidelineState guidelineState)
Request a state transition.
void beginCommon(GuidelineFormat::HoverOption hoverOption, bool locked)
Initialization common to all states.
GuidelineStateDeployedConstantXAbstract(GuidelineStateContext &context)
Single constructor.
virtual void handleActiveChange(bool active)
DigitizeState change so active status may (or may not) be toggled.
GuidelineStateDeployedConstantXUnselectHide(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 void handleHoverEnterEvent()
If transparent then make visible when hover starts.
virtual QString stateName() const
Name of state as a string for debugging only.
virtual void handleMousePress(const QPointF &posScene)
At the start of dragging, convert the Guideline into an invisible handle and visible slaved deployed ...
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18