Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Centipede
CentipedeStatePrebuild.cpp
Go to the documentation of this file.
1
/******************************************************************************************************
2
* (C) 2020 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 "
CentipedeStatePrebuild.h
"
8
#include "
CentipedeStateContext.h
"
9
#include "
DocumentModelCoords.h
"
10
#include "
DocumentModelGuideline.h
"
11
#include "
GraphicsScene.h
"
12
#include "
Logger.h
"
13
#include "
Transformation.h
"
14
15
CentipedeStatePrebuild::CentipedeStatePrebuild
(
CentipedeStateContext
&
context
) :
16
CentipedeStateAbstractBase
(
context
)
17
{
18
}
19
20
CentipedeStatePrebuild::~CentipedeStatePrebuild
()
21
{
22
}
23
24
void
CentipedeStatePrebuild::begin
()
25
{
26
qCDebug(ENGAUGE_LOG) <<
"CentipedeStatePrebuild::begin"
;
27
}
28
29
void
CentipedeStatePrebuild::end
()
30
{
31
qCDebug(ENGAUGE_LOG) <<
"CentipedeStatePrebuild::end"
;
32
}
33
34
void
CentipedeStatePrebuild::handleKeyPress
(Qt::Key
/* key */
,
35
bool
/* atLeastOneSelectedItem */
)
36
{
37
// Noop
38
}
39
40
void
CentipedeStatePrebuild::handleMouseMove
(QPointF
/* posScreen */
)
41
{
42
// Noop
43
}
44
45
void
CentipedeStatePrebuild::handleMousePress
(QPointF
/* posScreen */
)
46
{
47
if
(
context
().modelCoords().coordsType() ==
COORDS_TYPE_CARTESIAN
) {
48
context
().
requestDelayedStateTransition
(
CENTIPEDE_STATE_BUILD_CARTESIAN
);
49
}
else
{
50
context
().
requestDelayedStateTransition
(
CENTIPEDE_STATE_BUILD_POLAR
);
51
}
52
}
53
54
void
CentipedeStatePrebuild::handleMouseRelease
(QPointF
/* posScreen */
)
55
{
56
// Noop
57
}
CentipedeStateContext.h
CentipedeStatePrebuild.h
CENTIPEDE_STATE_BUILD_CARTESIAN
@ CENTIPEDE_STATE_BUILD_CARTESIAN
Definition
CentipedeState.h:14
CENTIPEDE_STATE_BUILD_POLAR
@ CENTIPEDE_STATE_BUILD_POLAR
Definition
CentipedeState.h:15
COORDS_TYPE_CARTESIAN
@ COORDS_TYPE_CARTESIAN
Definition
CoordsType.h:13
DocumentModelCoords.h
DocumentModelGuideline.h
GraphicsScene.h
Logger.h
Transformation.h
CentipedeStateAbstractBase::CentipedeStateAbstractBase
CentipedeStateAbstractBase(CentipedeStateContext &context)
Single constructor.
Definition
CentipedeStateAbstractBase.cpp:10
CentipedeStateAbstractBase::context
CentipedeStateContext & context()
Reference to the CentipedeStateContext that contains all the CentipedeStateAbstractBase subclasses.
Definition
CentipedeStateAbstractBase.cpp:19
CentipedeStateContext
State context class for tracking the steps involved in creating centipedes in preparation for creatin...
Definition
CentipedeStateContext.h:26
CentipedeStateContext::requestDelayedStateTransition
void requestDelayedStateTransition(CentipedeState centipedeState)
Initiate state transition to be performed later, when CentipedeState is off the stack.
Definition
CentipedeStateContext.cpp:141
CentipedeStatePrebuild::handleMousePress
virtual void handleMousePress(QPointF posScreen)
Handle mouse press event.
Definition
CentipedeStatePrebuild.cpp:45
CentipedeStatePrebuild::handleMouseRelease
virtual void handleMouseRelease(QPointF posScreen)
Handle mouse release event.
Definition
CentipedeStatePrebuild.cpp:54
CentipedeStatePrebuild::~CentipedeStatePrebuild
virtual ~CentipedeStatePrebuild()
Definition
CentipedeStatePrebuild.cpp:20
CentipedeStatePrebuild::handleMouseMove
virtual void handleMouseMove(QPointF posScreen)
Handle mouse move event.
Definition
CentipedeStatePrebuild.cpp:40
CentipedeStatePrebuild::CentipedeStatePrebuild
CentipedeStatePrebuild(CentipedeStateContext &context)
Single constructor.
Definition
CentipedeStatePrebuild.cpp:15
CentipedeStatePrebuild::handleKeyPress
virtual void handleKeyPress(Qt::Key key, bool atLeastOneSelectedItem)
Handle key press event.
Definition
CentipedeStatePrebuild.cpp:34
CentipedeStatePrebuild::end
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before start of th...
Definition
CentipedeStatePrebuild.cpp:29
CentipedeStatePrebuild::begin
virtual void begin()
Method that is called at the exact moment a state is entered. Typically called just after end for the...
Definition
CentipedeStatePrebuild.cpp:24
Generated on
for Engauge Digitizer by
1.17.0