Engauge Digitizer 2
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
CmdAbstract Class Referenceabstract

Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand. More...

#include <CmdAbstract.h>

Inheritance diagram for CmdAbstract:
CmdAddPointAxis CmdAddPointGraph CmdAddPointsGraph CmdCopy CmdCut CmdDelete CmdEditPointAxis CmdMoveBy CmdPaste CmdSelectCoordSystem CmdSettingsAxesChecker CmdSettingsColorFilter CmdSettingsCoords CmdSettingsCurveAddRemove CmdSettingsCurveProperties CmdSettingsDigitizeCurve CmdSettingsExportFormat CmdSettingsGeneral CmdSettingsGridRemoval CmdSettingsPointMatch CmdSettingsSegments

Public Member Functions

 CmdAbstract (MainWindow &mainWindow, Document &document, const QString &cmdDescription)
 Single constructor.
 
virtual void cmdRedo ()=0
 Redo method that is called when QUndoStack is moved one command forward.
 
virtual void cmdUndo ()=0
 Undo method that is called when QUndoStack is moved one command backward.
 
virtual void saveXml (QXmlStreamWriter &writer) const =0
 Save commands as xml for later uploading.
 

Protected Member Functions

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.
 

Detailed Description

Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.

Definition at line 18 of file CmdAbstract.h.

Constructor & Destructor Documentation

◆ CmdAbstract()

CmdAbstract::CmdAbstract ( MainWindow mainWindow,
Document document,
const QString &  cmdDescription 
)

Single constructor.

Definition at line 18 of file CmdAbstract.cpp.

◆ ~CmdAbstract()

CmdAbstract::~CmdAbstract ( )
virtual

Definition at line 29 of file CmdAbstract.cpp.

Member Function Documentation

◆ cmdRedo()

virtual void CmdAbstract::cmdRedo ( )
pure virtual

◆ cmdUndo()

virtual void CmdAbstract::cmdUndo ( )
pure virtual

◆ document() [1/2]

Document & CmdAbstract::document ( )
protected

Return the Document that this command will modify during redo and undo.

Definition at line 33 of file CmdAbstract.cpp.

◆ document() [2/2]

const Document & CmdAbstract::document ( ) const
protected

Return a const copy of the Document for non redo/undo interaction.

Definition at line 38 of file CmdAbstract.cpp.

◆ mainWindow()

MainWindow & CmdAbstract::mainWindow ( )
protected

Return the MainWindow so it can be updated by this command as a last step.

Definition at line 43 of file CmdAbstract.cpp.

◆ resetSelection()

void CmdAbstract::resetSelection ( const PointIdentifiers pointIdentifiersToSelect)
protected

Since the set of selected points has probably changed, changed that set back to the specified set.

This lets the user move selected point(s) repeatedly using arrow keys. Also provides expected behavior when pasting

Definition at line 79 of file CmdAbstract.cpp.

◆ saveXml()

virtual void CmdAbstract::saveXml ( QXmlStreamWriter &  writer) const
pure virtual

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