Aimsun Next Scripting
22
|
Public Slots | |
void | doCommand () |
void | undoCommand () |
Signals | |
void | commandMerged () |
void | commanderChanged (GKCommander *) |
void | commanderDo (GKCommand *) |
void | commanderUndo (GKCommand *) |
Public Member Functions | |
GKCommander () | |
void | setModel (GKModel *) |
GKCommandReport * | addCommand (GKCommand */Transfer/) |
void | addDoneCommand (GKCommand */Transfer/) |
void | notUndoableOperationDone () |
void | clear () |
QString | undoName () const |
QString | redoName () const |
GKObjectDelMultipleCmd * | getMultiDelCmd () const |
The GKCommander is the class that executes and holds all the commands executed.
When the developer wants to execute a command it will add it to the commander (the commander is part of the model) using the GKCommander::addCommand method.
GKCommander::GKCommander | ( | ) |
GKCommandReport * GKCommander::addCommand | ( | GKCommand */Transfer/ | ) |
Add a command to the system. The command will be executed by this function and will return any error found on the init function. If an error is found the command will be deleted, if not the command will be adopted.
Calling this function with aCommand = None has the same effect as calling GKCommander::notUndoableOperationDone
void GKCommander::addDoneCommand | ( | GKCommand */Transfer/ | ) |
Add a done command to the system. The command will NOT be executed by this function since it has been already executed. The command will be adopted. init function in the command will not be called since the command has been already execute (and no error is returned).
void GKCommander::clear | ( | ) |
Removes all the current commands discarting undone operations and making done operations permament without marking as modified the model.
|
signal |
|
signal |
|
signal |
|
signal |
|
slot |
Perform a redo operation (if any available)
GKObjectDelMultipleCmd * GKCommander::getMultiDelCmd | ( | ) | const |
Returns the command to delete several objects at once
void GKCommander::notUndoableOperationDone | ( | ) |
A command that the user cannot "undo" has been executed so the all the current undo commands are removed making done operations permament. This method marks the model as modified.
QString GKCommander::redoName | ( | ) | const |
Return the name of the command that can be redoned or an empty string if there is no command.
|
slot |
Perform a undo operation (if any available)
QString GKCommander::undoName | ( | ) | const |
Return the name of the command that can be undoned or an empty string if there is no command.