Qubet  1.0
The ultimate QGL addicting videogame!
 All Classes Functions Variables Pages
Public Member Functions | Private Attributes | List of all members
ActionList Class Reference

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>

Collaboration diagram for ActionList:
Collaboration graph

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
 

Detailed Description

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.

Version
1.0
Author
#34

Constructor & Destructor Documentation

ActionList::ActionList ( int  _primaryAction)
explicit

Creates a new ActionList with no secondaryActions and primaryAction given as parameter.

Parameters
_primaryActionis the primary action to set to the actionList.
ActionList::ActionList ( ActionList other)
explicit

Creates a new ActionList as a copy of another ActionList.

Parameters
otheris the actionList to copy.

Here is the call graph for this function:

Member Function Documentation

void ActionList::appendSecondaryAction ( int  _secondaryAction)

Appends a secondary action to secondaryActions list.

Parameters
_secondaryActionis the secondary action to append.

Here is the caller graph for this function:

QList< int > ActionList::getAllActions ( )

Returns a list of primary and secondary actions.

It is the current secondaryActions list, prepending the primaryAction.

Returns
a list of primary and secondary actions.

Here is the caller graph for this function:

int ActionList::getPrimaryAction ( )

Returns the current primaryAction.

Returns
The current primaryAction.

Here is the caller graph for this function:

QList< int > ActionList::getSecondaryActions ( )

Returns the secondaryActions list.

Returns
the secondaryActions list.

Here is the caller graph for this function:

void ActionList::removeSecondaryAction ( int  _secondaryAction)

Removes a secondary action to secondaryActions list.

Parameters
_secondaryActionis the secondary action to remove.

Here is the caller graph for this function:

void ActionList::setPrimaryAction ( int  _primaryAction)

Set the given parameter as the new primaryAction, overriding the old one.

Parameters
_primaryActionis the primaryAction to set.

Here is the caller graph for this function:

Member Data Documentation

int ActionList::primaryAction
private

It is the current primary action of the ActionList.

QList<int> ActionList::secondaryActions
private

It is a list of the current secondary actions of the ActionList


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