Aimsun Next Scripting  22
Public Slots | Signals | Public Member Functions | List of all members
GKCommander Class Reference

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 *)
 
GKCommandReportaddCommand (GKCommand */Transfer/)
 
void addDoneCommand (GKCommand */Transfer/)
 
void notUndoableOperationDone ()
 
void clear ()
 
QString undoName () const
 
QString redoName () const
 
GKObjectDelMultipleCmd * getMultiDelCmd () const
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GKCommander()

GKCommander::GKCommander ( )

Member Function Documentation

◆ addCommand()

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

◆ addDoneCommand()

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).

◆ clear()

void GKCommander::clear ( )

Removes all the current commands discarting undone operations and making done operations permament without marking as modified the model.

◆ commanderChanged

void GKCommander::commanderChanged ( GKCommander )
signal

◆ commanderDo

void GKCommander::commanderDo ( GKCommand )
signal

◆ commanderUndo

void GKCommander::commanderUndo ( GKCommand )
signal

◆ commandMerged

void GKCommander::commandMerged ( )
signal

◆ doCommand

void GKCommander::doCommand ( )
slot

Perform a redo operation (if any available)

◆ getMultiDelCmd()

GKObjectDelMultipleCmd * GKCommander::getMultiDelCmd ( ) const

Returns the command to delete several objects at once

◆ notUndoableOperationDone()

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.

◆ redoName()

QString GKCommander::redoName ( ) const

Return the name of the command that can be redoned or an empty string if there is no command.

◆ setModel()

void GKCommander::setModel ( GKModel )

Called by the GKModel when it creates the commander.

◆ undoCommand

void GKCommander::undoCommand ( )
slot

Perform a undo operation (if any available)

◆ undoName()

QString GKCommander::undoName ( ) const

Return the name of the command that can be undoned or an empty string if there is no command.

© Aimsun SLU
Aimsun ®