SymbolEditor
1.3.0
|
Update symbol command class;. More...
#include <Commands.h>
Public Member Functions | |
UpdateSymbolCommand (SymbolLibrary *library, qint16 index, const Symbol &symbol) | |
virtual | ~UpdateSymbolCommand () |
virtual void | undo () |
virtual void | redo () |
Private Attributes | |
SymbolLibrary * | m_symbolLibrary |
qint16 | m_index |
Symbol | m_symbol |
Symbol | m_originalSymbol |
Update symbol command class;.
Implement updating a symbol in the library using the index specified. The index may be 0 for new symbols and a new index will be generated by the library.
The original Symbol is stored for a possible undo.
Definition at line 191 of file Commands.h.
UpdateSymbolCommand::UpdateSymbolCommand | ( | SymbolLibrary * | library, |
qint16 | index, | ||
const Symbol & | symbol | ||
) |
Constructor
library | a pointer to the SymbolLibrary |
index | the index of the symbol to be updated |
symbol | a const reference to a Symbol representing the updated symbol |
Definition at line 331 of file Commands.cpp.
|
virtual |
Destructor
Definition at line 343 of file Commands.cpp.
|
virtual |
Redo the update symbol command. The original Symbol is saved for undo. This may be empty. The new Symbol is set in the library for the given index. If the index is 0 a new index is generated, returned and saved for undo.
Definition at line 368 of file Commands.cpp.
|
virtual |
Undo the update symbol command. If the original path was not empty it is restored to the indexed symbol otherwise the indexes symbol is removed from the library.
Definition at line 352 of file Commands.cpp.
|
private |
index of the symbol in the library
Definition at line 202 of file Commands.h.
|
private |
original symbol to be restored on undo
Definition at line 204 of file Commands.h.
|
private |
the updated symbol
Definition at line 203 of file Commands.h.
|
private |
pointer to the symbol library
Definition at line 201 of file Commands.h.