Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
CmdSelectCoordSystem Class Reference

Command for changing the currently selected CoordSystem. More...

#include <CmdSelectCoordSystem.h>

Inheritance diagram for CmdSelectCoordSystem:
Inheritance graph
Collaboration diagram for CmdSelectCoordSystem:
Collaboration graph

Public Member Functions

 CmdSelectCoordSystem (MainWindow &mainWindow, Document &document, CoordSystemIndex coordSystem)
 Constructor for normal creation.
 
 CmdSelectCoordSystem (MainWindow &mainWindow, Document &document, const QString &cmdDescription, QXmlStreamReader &reader)
 Constructor for parsing error report file xml.
 
virtual ~CmdSelectCoordSystem ()
 
virtual void cmdRedo ()
 Redo method that is called when QUndoStack is moved one command forward.
 
virtual void cmdUndo ()
 Undo method that is called when QUndoStack is moved one command backward.
 
virtual void saveXml (QXmlStreamWriter &writer) const
 Save commands as xml for later uploading.
 
- Public Member Functions inherited from CmdAbstract
 CmdAbstract (MainWindow &mainWindow, Document &document, const QString &cmdDescription)
 Single constructor.
 
virtual ~CmdAbstract ()
 

Additional Inherited Members

- Protected Member Functions inherited from CmdAbstract
Documentdocument ()
 Return the Document that this command will modify during redo and undo.
 
const Documentdocument () const
 Return a const copy of the Document for non redo/undo interaction.
 
MainWindowmainWindow ()
 Return the MainWindow so it can be updated by this command as a last step.
 
void resetSelection (const PointIdentifiers &pointIdentifiersToSelect)
 Since the set of selected points has probably changed, changed that set back to the specified set.
 
void saveOrCheckPostCommandDocumentStateHash (const Document &document)
 Save, when called the first time, a hash value representing the state of the Document.
 
void saveOrCheckPreCommandDocumentStateHash (const Document &document)
 Save, when called the first time, a hash value representing the state of the Document.
 

Detailed Description

Command for changing the currently selected CoordSystem.

Definition at line 16 of file CmdSelectCoordSystem.h.

Constructor & Destructor Documentation

◆ CmdSelectCoordSystem() [1/2]

CmdSelectCoordSystem::CmdSelectCoordSystem ( MainWindow & mainWindow,
Document & document,
CoordSystemIndex coordSystem )

Constructor for normal creation.

Definition at line 22 of file CmdSelectCoordSystem.cpp.

24 :
28 m_coordSystemIndexBefore (document.coordSystemIndex()),
29 m_coordSystemIndexAfter (coordSystemIndex)
30{
31 LOG4CPP_INFO_S ((*mainCat)) << "CmdSelectCoordSystem::CmdSelectCoordSystem";
32}
const QString CMD_DESCRIPTION("Add axis point")
log4cpp::Category * mainCat
Definition Logger.cpp:14
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Definition CmdAbstract.h:20
Document & document()
Return the Document that this command will modify during redo and undo.
MainWindow & mainWindow()
Return the MainWindow so it can be updated by this command as a last step.
CoordSystemIndex coordSystemIndex() const
Index of current active CoordSystem.
Definition Document.cpp:314
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

◆ CmdSelectCoordSystem() [2/2]

CmdSelectCoordSystem::CmdSelectCoordSystem ( MainWindow & mainWindow,
Document & document,
const QString & cmdDescription,
QXmlStreamReader & reader )

Constructor for parsing error report file xml.

Definition at line 34 of file CmdSelectCoordSystem.cpp.

37 :
40 cmdDescription)
41{
42 LOG4CPP_INFO_S ((*mainCat)) << "CmdSelectCoordSystem::CmdSelectCoordSystem";
43}

◆ ~CmdSelectCoordSystem()

CmdSelectCoordSystem::~CmdSelectCoordSystem ( )
virtual

Definition at line 45 of file CmdSelectCoordSystem.cpp.

46{
47}

Member Function Documentation

◆ cmdRedo()

void CmdSelectCoordSystem::cmdRedo ( )
virtual

Redo method that is called when QUndoStack is moved one command forward.

Implements CmdAbstract.

Definition at line 49 of file CmdSelectCoordSystem.cpp.

50{
51 LOG4CPP_INFO_S ((*mainCat)) << "CmdSelectCoordSystem::cmdRedo"
52 << " index=" << m_coordSystemIndexBefore << "->" << m_coordSystemIndexAfter;
53
55 mainWindow().updateCoordSystem (m_coordSystemIndexAfter);
57}
void saveOrCheckPostCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
void saveOrCheckPreCommandDocumentStateHash(const Document &document)
Save, when called the first time, a hash value representing the state of the Document.
void updateCoordSystem(CoordSystemIndex coordSystemIndex)
Select a different CoordSystem.

◆ cmdUndo()

void CmdSelectCoordSystem::cmdUndo ( )
virtual

Undo method that is called when QUndoStack is moved one command backward.

Implements CmdAbstract.

Definition at line 59 of file CmdSelectCoordSystem.cpp.

60{
61 LOG4CPP_INFO_S ((*mainCat)) << "CmdSelectCoordSystem::cmdUndo"
62 << " index=" << m_coordSystemIndexAfter << "->" << m_coordSystemIndexBefore;
63
65 mainWindow().updateCoordSystem (m_coordSystemIndexBefore);
67}

◆ saveXml()

void CmdSelectCoordSystem::saveXml ( QXmlStreamWriter & writer) const
virtual

Save commands as xml for later uploading.

Implements CmdAbstract.

Definition at line 69 of file CmdSelectCoordSystem.cpp.

70{
71 writer.writeStartElement(DOCUMENT_SERIALIZE_CMD);
72 writer.writeEndElement();
73}
const int INNER_RADIUS_MIN
const QString DOCUMENT_SERIALIZE_CMD

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