Engauge Digitizer
2
Loading...
Searching...
No Matches
Centipede
CentipedeStateAbstractBase.h
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
#ifndef CENTIPEDE_STATE_ABSTRACT_BASE_H
8
#define CENTIPEDE_STATE_ABSTRACT_BASE_H
9
10
#include "
CentipedeState.h
"
11
#include <QPointF>
12
13
class
CentipedeStateContext
;
14
16
class
CentipedeStateAbstractBase
17
{
18
public
:
20
CentipedeStateAbstractBase
(
CentipedeStateContext
&
context
);
21
virtual
~CentipedeStateAbstractBase
();
22
24
virtual
void
begin
() = 0;
25
27
CentipedeStateContext
&
context
();
28
30
virtual
void
end
() = 0;
31
33
virtual
void
handleKeyPress
(Qt::Key key,
34
bool
atLeastOneSelectedItem) = 0;
35
37
virtual
void
handleMouseMove
(QPointF posScreen) = 0;
38
40
virtual
void
handleMousePress
(QPointF posScreen) = 0;
41
43
virtual
void
handleMouseRelease
(QPointF posScreen) = 0;
44
45
protected
:
46
48
void
enableUndoStack
(
bool
enable);
49
50
private
:
51
CentipedeStateAbstractBase
();
52
53
CentipedeStateContext
&m_context;
54
};
55
56
#endif
// CENTIPEDE_STATE_ABSTRACT_BASE_H
CentipedeState.h
CentipedeStateAbstractBase::handleMousePress
virtual void handleMousePress(QPointF posScreen)=0
Handle mouse press event.
CentipedeStateAbstractBase::handleKeyPress
virtual void handleKeyPress(Qt::Key key, bool atLeastOneSelectedItem)=0
Handle key press event.
CentipedeStateAbstractBase::end
virtual void end()=0
Method that is called at the exact moment a state is exited. Typically called just before start of th...
CentipedeStateAbstractBase::handleMouseRelease
virtual void handleMouseRelease(QPointF posScreen)=0
Handle mouse release event.
CentipedeStateAbstractBase::~CentipedeStateAbstractBase
virtual ~CentipedeStateAbstractBase()
Definition
CentipedeStateAbstractBase.cpp:15
CentipedeStateAbstractBase::CentipedeStateAbstractBase
CentipedeStateAbstractBase(CentipedeStateContext &context)
Single constructor.
Definition
CentipedeStateAbstractBase.cpp:10
CentipedeStateAbstractBase::begin
virtual void begin()=0
Method that is called at the exact moment a state is entered. Typically called just after end for the...
CentipedeStateAbstractBase::handleMouseMove
virtual void handleMouseMove(QPointF posScreen)=0
Handle mouse move event.
CentipedeStateAbstractBase::enableUndoStack
void enableUndoStack(bool enable)
Method called by subclasses to send signalUndoActve.
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
Generated on
for Engauge Digitizer by
1.14.0