21 m_timer =
new QTimer ();
22 m_timer->setSingleShot (
true);
40 QObject::connect (m_timer, SIGNAL (timeout ()), &
context(), SLOT (slotTimeout ()));
54 QObject::disconnect (m_timer, SIGNAL (timeout ()), &
context(), SLOT (slotTimeout ()));
68 if (visible && locked) {
70 }
else if (!visible) {
const int APPEARING_TIMEOUT
Milliseconds before transition from Appearing state to Active state.
QString guidelineStateAsString(GuidelineState state)
@ GUIDELINE_STATE_HANDLE_Y
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_SELECT_LOCK
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_UNSELECT_EDIT
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_SELECT_HIDE
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_SELECT_EDIT_APPEARING
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_SELECT_EDIT
@ GUIDELINE_STATE_DEPLOYED_CONSTANT_Y_SELECT_EDIT_HOVER
log4cpp::Category * mainCat
virtual QString identifier() const =0
Unique identifier from QGraphicsItem.
virtual void setGraphicsItemVisible(bool visible)=0
Wrapper for QGraphicsItem::setVisible.
void handleMousePressCommon(const QPointF &posAbsolute, GuidelineState stateHandle, GuidelineState stateDeployed)
Common mouse press handling.
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(bool hovering, bool locked)
Initialization common to all states.
GuidelineStateDeployedConstantYAbstract(GuidelineStateContext &context)
Single constructor.
virtual ~GuidelineStateDeployedConstantYSelectEditAppearing()
virtual void handleGuidelineMode(bool visible, bool locked)
User toggled Guideline visibility and/or locked mode.
virtual void handleMousePress(const QPointF &posScene)
At the start of dragging, convert the Guideline into an invisible handle and visible slaved deployed ...
virtual bool doPaint() const
Allow/skip painting of the owner Guideline.
virtual void end()
Transition out of state.
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.
virtual void begin()
Transition into state.
virtual void handleActiveChange(bool active)
DigitizeState change so active status may (or may not) be toggled.
virtual void handleHoverLeaveEvent()
If previously transparent before hover enter then make transparent again.
GuidelineStateDeployedConstantYSelectEditAppearing(GuidelineStateContext &context)
Single constructor.
#define LOG4CPP_INFO_S(logger)