Engauge Digitizer
2
Main Page
Classes
Files
File List
File Members
DigitizeState
DigitizeStateAbstractBase.cpp
1
/******************************************************************************************************
2
* (C) 2014 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 "CmdMediator.h"
8
#include "DigitizeStateAbstractBase.h"
9
#include "DigitizeStateContext.h"
10
#include "Document.h"
11
#include "Logger.h"
12
#include "MainWindow.h"
13
#include "MainWindowModel.h"
14
#include <QCursor>
15
#include <QGraphicsScene>
16
#include <QImage>
17
#include <QTimer>
18
#include "QtToString.h"
19
#include "Transformation.h"
20
21
DigitizeStateAbstractBase::DigitizeStateAbstractBase
(
DigitizeStateContext
&context) :
22
m_context (context)
23
{
24
}
25
26
DigitizeStateAbstractBase::~DigitizeStateAbstractBase()
27
{
28
}
29
30
DigitizeStateContext
&
DigitizeStateAbstractBase::context
()
31
{
32
return
m_context;
33
}
34
35
const
DigitizeStateContext
&
DigitizeStateAbstractBase::context
()
const
36
{
37
return
m_context;
38
}
39
40
void
DigitizeStateAbstractBase::setCursor
(
CmdMediator
*cmdMediator)
41
{
42
LOG4CPP_DEBUG_S ((*mainCat)) <<
"DigitizeStateAbstractBase::setCursor"
;
43
44
// Note that we are setting the QGraphicsView cursor and NOT the QApplication override cursor
45
m_context.
view
().setCursor (
cursor
(cmdMediator));
46
}
DigitizeStateAbstractBase::cursor
virtual QCursor cursor(CmdMediator *cmdMediator) const =0
Returns the state-specific cursor shape.
DigitizeStateAbstractBase::context
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses...
Definition:
DigitizeStateAbstractBase.cpp:30
DigitizeStateAbstractBase::setCursor
void setCursor(CmdMediator *cmdMediator)
Update the cursor according to the current state.
Definition:
DigitizeStateAbstractBase.cpp:40
DigitizeStateContext
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
Definition:
DigitizeStateContext.h:25
CmdMediator
Command queue stack.
Definition:
CmdMediator.h:23
DigitizeStateContext::view
QGraphicsView & view()
QGraphicsView for use by DigitizeStateAbstractBase subclasses.
Definition:
DigitizeStateContext.cpp:251
DigitizeStateAbstractBase::DigitizeStateAbstractBase
DigitizeStateAbstractBase(DigitizeStateContext &context)
Single constructor.
Definition:
DigitizeStateAbstractBase.cpp:21
Generated on Tue Aug 2 2016 01:09:58 for Engauge Digitizer by
1.8.11