SymbolEditor  1.3.0
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
ImportLibraryCommand Class Reference

Import library command class. More...

#include <Commands.h>

Inheritance diagram for ImportLibraryCommand:
Collaboration diagram for ImportLibraryCommand:

Public Member Functions

 ImportLibraryCommand (SymbolLibrary *library, SymbolLibrary *imported)
 
virtual ~ImportLibraryCommand ()
 
virtual void undo ()
 
virtual void redo ()
 

Private Attributes

SymbolLibrarym_symbolLibrary
 
SymbolLibrarym_imported
 
QList< qint16 > m_addedIndexes
 

Detailed Description

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.

Constructor & Destructor Documentation

ImportLibraryCommand::ImportLibraryCommand ( SymbolLibrary library,
SymbolLibrary imported 
)

Constructor

Parameters
librarya pointer to the SymbolLibrary
importeda pointer to the imported SymbolLibrary

Definition at line 381 of file Commands.cpp.

ImportLibraryCommand::~ImportLibraryCommand ( )
virtual

Destructor The imported library is deleted as this class has taken ownership of it.

Definition at line 393 of file Commands.cpp.

Member Function Documentation

void ImportLibraryCommand::redo ( )
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.

Here is the call graph for this function:

void ImportLibraryCommand::undo ( )
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.

Here is the call graph for this function:

Member Data Documentation

QList<qint16> ImportLibraryCommand::m_addedIndexes
private

indexes of the symbols imported to be removed on undo

Definition at line 228 of file Commands.h.

SymbolLibrary* ImportLibraryCommand::m_imported
private

pointer to the imported library

Definition at line 227 of file Commands.h.

SymbolLibrary* ImportLibraryCommand::m_symbolLibrary
private

pointer to the symbol library

Definition at line 226 of file Commands.h.


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