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

Class for period while building polar centipedes. More...

#include <CentipedeStateBuildPolar.h>

Inheritance diagram for CentipedeStateBuildPolar:
Inheritance graph
Collaboration diagram for CentipedeStateBuildPolar:
Collaboration graph

Public Member Functions

 CentipedeStateBuildPolar (CentipedeStateContext &context)
 Single constructor.
virtual ~CentipedeStateBuildPolar ()
virtual void begin ()
 Method that is called at the exact moment a state is entered. Typically called just after end for the previous stat.
virtual void end ()
 Method that is called at the exact moment a state is exited. Typically called just before start of the next stat.
virtual void handleKeyPress (Qt::Key key, bool atLeastOneSelectedItem)
 Handle key press event.
virtual void handleMouseMove (QPointF posScreen)
 Handle mouse move event.
virtual void handleMousePress (QPointF posScreen)
 Handle mouse press event.
virtual void handleMouseRelease (QPointF posScreen)
 Handle mouse release event.
Public Member Functions inherited from CentipedeStateAbstractBase
 CentipedeStateAbstractBase (CentipedeStateContext &context)
 Single constructor.
virtual ~CentipedeStateAbstractBase ()
CentipedeStateContextcontext ()
 Reference to the CentipedeStateContext that contains all the CentipedeStateAbstractBase subclasses.

Additional Inherited Members

Protected Member Functions inherited from CentipedeStateAbstractBase
void enableUndoStack (bool enable)
 Method called by subclasses to send signalUndoActve.

Detailed Description

Class for period while building polar centipedes.

Definition at line 15 of file CentipedeStateBuildPolar.h.

Constructor & Destructor Documentation

◆ CentipedeStateBuildPolar()

CentipedeStateBuildPolar::CentipedeStateBuildPolar ( CentipedeStateContext & context)

Single constructor.

Definition at line 16 of file CentipedeStateBuildPolar.cpp.

16 :
18 m_centipedePair (0)
19{
20}
CentipedeStateAbstractBase(CentipedeStateContext &context)
Single constructor.
CentipedeStateContext & context()
Reference to the CentipedeStateContext that contains all the CentipedeStateAbstractBase subclasses.

◆ ~CentipedeStateBuildPolar()

CentipedeStateBuildPolar::~CentipedeStateBuildPolar ( )
virtual

Definition at line 22 of file CentipedeStateBuildPolar.cpp.

23{
24 delete m_centipedePair;
25}

Member Function Documentation

◆ begin()

void CentipedeStateBuildPolar::begin ( )
virtual

Method that is called at the exact moment a state is entered. Typically called just after end for the previous stat.

Implements CentipedeStateAbstractBase.

Definition at line 27 of file CentipedeStateBuildPolar.cpp.

28{
29 LOG4CPP_DEBUG_S ((*mainCat)) << "CentipedeStateBuildPolar::begin";
30
31 m_centipedePair = new CentipedePairPolar (context().scene(),
32 context().transformation(),
33 context().modelGuideline (),
34 context().modelCoords (),
35 context().posClickScreen ());
36}
log4cpp::Category * mainCat
Definition Logger.cpp:14
#define LOG4CPP_DEBUG_S(logger)
Definition convenience.h:20

◆ end()

void CentipedeStateBuildPolar::end ( )
virtual

Method that is called at the exact moment a state is exited. Typically called just before start of the next stat.

Implements CentipedeStateAbstractBase.

Definition at line 38 of file CentipedeStateBuildPolar.cpp.

39{
40 LOG4CPP_DEBUG_S ((*mainCat)) << "CentipedeStateBuildPolar::end";
41
42 delete m_centipedePair;
43 m_centipedePair = nullptr;
44}

◆ handleKeyPress()

void CentipedeStateBuildPolar::handleKeyPress ( Qt::Key key,
bool atLeastOneSelectedItem )
virtual

Handle key press event.

Implements CentipedeStateAbstractBase.

Definition at line 46 of file CentipedeStateBuildPolar.cpp.

48{
49 // Stop
51}
@ CENTIPEDE_STATE_PREBUILD
void requestDelayedStateTransition(CentipedeState centipedeState)
Initiate state transition to be performed later, when CentipedeState is off the stack.

◆ handleMouseMove()

void CentipedeStateBuildPolar::handleMouseMove ( QPointF posScreen)
virtual

Handle mouse move event.

Implements CentipedeStateAbstractBase.

Definition at line 53 of file CentipedeStateBuildPolar.cpp.

54{
55 if (m_centipedePair-> done (posScreen)) {
56
57 // Done so make a command and exit this state
58 context().createGuidelineCommand (m_centipedePair->selectedXTFinal (),
59 m_centipedePair->valueFinal ());
61
62 } else {
63
64 m_centipedePair->move (posScreen);
65
66 }
67}
void createGuidelineCommand(bool selectedXTFinal, double valueFinal)
Create a command for creating a Guideline.

◆ handleMousePress()

void CentipedeStateBuildPolar::handleMousePress ( QPointF posScreen)
virtual

Handle mouse press event.

Implements CentipedeStateAbstractBase.

Definition at line 69 of file CentipedeStateBuildPolar.cpp.

70{
71 // Noop
72}

◆ handleMouseRelease()

void CentipedeStateBuildPolar::handleMouseRelease ( QPointF posScreen)
virtual

Handle mouse release event.

Implements CentipedeStateAbstractBase.

Definition at line 74 of file CentipedeStateBuildPolar.cpp.


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