This class is used to keep track of actions to do. For example it can keep track of current view scrolling movement, or cube rotations. More...
#include <actionlist.h>
Public Member Functions | |
ActionList () | |
Creates a new ActionList with no secondaryActions and 0 as primaryAction. | |
ActionList (int _primaryAction) | |
Creates a new ActionList with no secondaryActions and primaryAction given as parameter. More... | |
ActionList (ActionList *other) | |
Creates a new ActionList as a copy of another ActionList. More... | |
~ActionList () | |
Safely removes an ActionList. | |
void | setPrimaryAction (int _primaryAction) |
Set the given parameter as the new primaryAction, overriding the old one. More... | |
int | getPrimaryAction () |
Returns the current primaryAction. More... | |
void | appendSecondaryAction (int _secondaryAction) |
Appends a secondary action to secondaryActions list. More... | |
void | removeSecondaryAction (int _secondaryAction) |
Removes a secondary action to secondaryActions list. More... | |
QList< int > | getSecondaryActions () |
Returns the secondaryActions list. More... | |
QList< int > | getAllActions () |
Returns a list of primary and secondary actions. More... | |
Private Attributes | |
int | primaryAction |
QList< int > | secondaryActions |
This class is used to keep track of actions to do. For example it can keep track of current view scrolling movement, or cube rotations.
There are two type of actions: Primary and Secondary actions.
You can have an example of this in Qubet's menu.
|
explicit |
Creates a new ActionList with no secondaryActions and primaryAction given as parameter.
_primaryAction | is the primary action to set to the actionList. |
|
explicit |
Creates a new ActionList as a copy of another ActionList.
other | is the actionList to copy. |
void ActionList::appendSecondaryAction | ( | int | _secondaryAction | ) |
Appends a secondary action to secondaryActions list.
_secondaryAction | is the secondary action to append. |
QList< int > ActionList::getAllActions | ( | ) |
Returns a list of primary and secondary actions.
It is the current secondaryActions list, prepending the primaryAction.
int ActionList::getPrimaryAction | ( | ) |
Returns the current primaryAction.
QList< int > ActionList::getSecondaryActions | ( | ) |
Returns the secondaryActions list.
void ActionList::removeSecondaryAction | ( | int | _secondaryAction | ) |
Removes a secondary action to secondaryActions list.
_secondaryAction | is the secondary action to remove. |
void ActionList::setPrimaryAction | ( | int | _primaryAction | ) |
Set the given parameter as the new primaryAction, overriding the old one.
_primaryAction | is the primaryAction to set. |
|
private |
It is the current primary action of the ActionList.
|
private |
It is a list of the current secondary actions of the ActionList