SymbolEditor
1.3.0
|
Import library command class. More...
#include <Commands.h>
Public Member Functions | |
ImportLibraryCommand (SymbolLibrary *library, SymbolLibrary *imported) | |
virtual | ~ImportLibraryCommand () |
virtual void | undo () |
virtual void | redo () |
Private Attributes | |
SymbolLibrary * | m_symbolLibrary |
SymbolLibrary * | m_imported |
QList< qint16 > | m_addedIndexes |
Import library command class.
Implement importing the symbols from one library into the current library. The indexes from the import library are ignored and new indexes are generated by the current library.
The list of generated indexes is stored for a possible undo.
Definition at line 216 of file Commands.h.
ImportLibraryCommand::ImportLibraryCommand | ( | SymbolLibrary * | library, |
SymbolLibrary * | imported | ||
) |
Constructor
library | a pointer to the SymbolLibrary |
imported | a pointer to the imported SymbolLibrary |
Definition at line 381 of file Commands.cpp.
|
virtual |
Destructor The imported library is deleted as this class has taken ownership of it.
Definition at line 393 of file Commands.cpp.
|
virtual |
Redo the import library command. Each symbol in the imported library are added to the current library creating new indexes which are added to the m_addedIndexes list for undo.
Definition at line 417 of file Commands.cpp.
|
virtual |
Undo the import library command. All symbols that were added are removed from the library. The list of added indexes is cleared.
Definition at line 403 of file Commands.cpp.
|
private |
indexes of the symbols imported to be removed on undo
Definition at line 228 of file Commands.h.
|
private |
pointer to the imported library
Definition at line 227 of file Commands.h.
|
private |
pointer to the symbol library
Definition at line 226 of file Commands.h.