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

This the LevelEditor Class. More...

#include <leveleditor.h>

Inheritance diagram for LevelEditor:
Inheritance graph
Collaboration diagram for LevelEditor:
Collaboration graph

Signals

void levelEditorClosed ()
 signal emitted when the level editor is being closed.
 
void addLevelToLevelsList (Level *_level)
 This function add the current level to the levelsList. More...
 
void setMouseMovementTracking (int mode)
 This signal is emitted to set the Qubet's Mouse Move Tracking sensibility. The modes are: 0 - no signal emitted. 1 - the signal mouseMoved is emitted only when the mouse is moved and one of the mouse buttons are clicked. 2 - the signal mouseMoved is emitted always when the mouse is moved. More...
 
void enableAudio (bool enabled)
 Signal emitted to enable or disable the audio. More...
 
void playAmbientMusic (QString filename)
 Signal emitted to play the ambient music. More...
 
void stopAmbientMusic ()
 Signal emitted to stop the current ambient music.
 
void playEffect (QString effectName)
 Signal emitted to play an effect. More...
 
void setSkybox (QString skyboxName)
 Signal emitted to set the Skybox. More...
 

Public Member Functions

 LevelEditor (QMap< GLint, GLuint > &_iconsList, Alphabet *_alphabet, QObject *_parent, Level *_level=NULL, bool _audioEnabled=true, Skin *_asphaltSkin=NULL)
 Create a LevelEditor. More...
 
 ~LevelEditor ()
 This is the LevelEditor Destructor.
 
void draw (GLboolean simplifyForPicking=false)
 Method to draw the levelEditor. More...
 
GLvoid playAudio ()
 launch the signal playAmbientMusic.
 

Private Slots

void itemClicked (QMouseEvent *event, QList< GLuint > listNames)
 Slot invoked when the user clicks on a item. More...
 
void mouseReleased (QMouseEvent *event)
 Slot invoked when the user releases the mouse button. More...
 
void mouseMoved (QMouseEvent *event, QList< GLuint > listNames)
 Slot invoked when the user moves the mouse. More...
 
void wheelScrolled (QWheelEvent *event)
 Slot invoked when the user scrolls the wheel of the mouse button. More...
 
void keyPressed (QKeyEvent *event)
 Slot invoked when the user presses a key on the keyboard. More...
 

Private Member Functions

GLvoid lengthen ()
 This function lengthen the level.
 
GLvoid shorten ()
 This function shorten the level.
 
GLvoid enlarge ()
 This function enlarge the level.
 
GLvoid reduce ()
 This function reduce the level.
 
GLvoid gravityMinus ()
 This function decraese the gravity value.
 
GLvoid gravityPlus ()
 This function increase the gravity value.
 
GLvoid buttonBackTriggered ()
 This function is invoked when back button is pressed.
 
GLvoid buttonNextTriggered ()
 This function is invoked when next button is pressed.
 
GLvoid letterTyped (int key)
 This function is invoked when a letter is typed. More...
 
GLvoid checkMousePosition (GLint x, GLint y)
 This function check the position of the mouse. More...
 
GLvoid moveIn ()
 Move the view in.
 
GLvoid moveOut ()
 Move the view out.
 
GLvoid saveLevel ()
 Save the Level.
 
GLvoid quitEditor ()
 This function quit the level editor.
 

Private Attributes

QObjectparent
 
QMap< GLint, GLuint > iconsList
 
GLboolean audioEnabled
 
GLboolean isMoving
 
Levellevel
 
GLint currentView
 
GLuint currentLength
 
GLuint currentWidth
 
GLuint currentGravity
 
Alphabetalphabet
 
ActionListcurrentActions
 
Vector3fcameraOffset
 
GLfloat cameraAngle
 
Vector3flevelOffset
 
SkinvolumeSkin
 
SkinasphaltSkin
 
GLfloat angleRotVolumeCube
 
CubeStringlengthLabel
 
CubeStringwidthLabel
 
CubeStringgravityLabel
 
CubeStringlengthString
 
CubeStringwidthString
 
CubeStringgravityString
 
CubeStringcreate
 
CubeStringlabelSetLevelName
 
CubeStringback
 
CubeStringmenu
 
CubeStringnext
 
CubeStringsave
 
CubeStringcancel
 
CubeStringclear
 
CubeStringexit
 
CubeStringListformSetLevelName
 
GLboolean visible
 
GLint visibleTime
 
QString currentName
 
QString currentError
 
Vector3f lastCentre
 
Vector3f currentDelta
 
Vector3f deltaFromCentre
 
QList< Vector3ftoolbarObstacleCentres
 
GLint movingObject
 
bool positionValid
 
GLint xCell
 
GLint yCell
 
GLint zCell
 
GLint lastMouseX
 
GLint lastMouseY
 

Detailed Description

This the LevelEditor Class.

Version
1.0
Author
#34

Constructor & Destructor Documentation

LevelEditor::LevelEditor ( QMap< GLint, GLuint > &  _iconsList,
Alphabet _alphabet,
QObject _parent,
Level _level = NULL,
bool  _audioEnabled = true,
Skin _asphaltSkin = NULL 
)
explicit

Create a LevelEditor.

Parameters
_iconsListis the reference to Qubet's iconsList.
_alphabetis the reference to Qubet's alphabet.
_levelis the level to load in the LevelEditor (NULL to create a new Level).
_parentis a callback variable to the parent of the parent.
_audioEnabledis a variable to states if the audio is enabled or not.
_asphaltSkinis the asphalt Skin for the Level.

Here is the call graph for this function:

Member Function Documentation

void LevelEditor::addLevelToLevelsList ( Level _level)
signal

This function add the current level to the levelsList.

Parameters
_level

Here is the caller graph for this function:

GLvoid LevelEditor::checkMousePosition ( GLint  x,
GLint  y 
)
private

This function check the position of the mouse.

Parameters
xis the x coordinate.
yis the y coordinate.

Here is the caller graph for this function:

void LevelEditor::draw ( GLboolean  simplifyForPicking = false)

Method to draw the levelEditor.

Parameters
simplifyForPicking[default = false] is used to draw a simplified scene used for the picking function.

Here is the call graph for this function:

Here is the caller graph for this function:

void LevelEditor::enableAudio ( bool  enabled)
signal

Signal emitted to enable or disable the audio.

Parameters
enabledis the variable that states if the audio is to enable or not.

Here is the caller graph for this function:

void LevelEditor::itemClicked ( QMouseEvent *  event,
QList< GLuint >  listNames 
)
privateslot

Slot invoked when the user clicks on a item.

Parameters
eventis the QMouseEvent.
listNamesis the QList<GLuint> of item's names.

Here is the call graph for this function:

void LevelEditor::keyPressed ( QKeyEvent *  event)
privateslot

Slot invoked when the user presses a key on the keyboard.

Parameters
eventis the QKeyEvent*.

Here is the call graph for this function:

GLvoid LevelEditor::letterTyped ( int  key)
private

This function is invoked when a letter is typed.

Parameters
keyis the key pressed.

Here is the call graph for this function:

Here is the caller graph for this function:

void LevelEditor::mouseMoved ( QMouseEvent *  event,
QList< GLuint >  listNames 
)
privateslot

Slot invoked when the user moves the mouse.

Parameters
eventis the QMouseEvent*.
listNamesis the QList<GLuint> of item's names.

Here is the call graph for this function:

void LevelEditor::mouseReleased ( QMouseEvent *  event)
privateslot

Slot invoked when the user releases the mouse button.

Parameters
eventis the QMouseEvent*.

Here is the call graph for this function:

void LevelEditor::playAmbientMusic ( QString  filename)
signal

Signal emitted to play the ambient music.

Parameters
filenameis the filename to play.

Here is the caller graph for this function:

void LevelEditor::playEffect ( QString  effectName)
signal

Signal emitted to play an effect.

Parameters
effectNameis the name of the effect to play.

Here is the caller graph for this function:

void LevelEditor::setMouseMovementTracking ( int  mode)
signal

This signal is emitted to set the Qubet's Mouse Move Tracking sensibility. The modes are: 0 - no signal emitted. 1 - the signal mouseMoved is emitted only when the mouse is moved and one of the mouse buttons are clicked. 2 - the signal mouseMoved is emitted always when the mouse is moved.

Parameters
modeIt is the selected mode.

Here is the caller graph for this function:

void LevelEditor::setSkybox ( QString  skyboxName)
signal

Signal emitted to set the Skybox.

Parameters
skyboxNameis the name of the Skybox to apply.

Here is the caller graph for this function:

void LevelEditor::wheelScrolled ( QWheelEvent *  event)
privateslot

Slot invoked when the user scrolls the wheel of the mouse button.

Parameters
eventis the QWheelEvent*.

Here is the call graph for this function:

Member Data Documentation

Alphabet* LevelEditor::alphabet
private

It is the alphabet provided by Qubet.

GLfloat LevelEditor::angleRotVolumeCube
private

It is the current rotation angle of the volume icon.

Skin* LevelEditor::asphaltSkin
private

It is the skin of the Asphalt.

GLboolean LevelEditor::audioEnabled
private

It is the state of the audio.

CubeString* LevelEditor::back
private

It is the back CubeString.

GLfloat LevelEditor::cameraAngle
private

It is the camera angle for the editor.

Vector3f* LevelEditor::cameraOffset
private

It is the camera offset for the editor.

CubeString* LevelEditor::cancel
private

It is the cancel CubeString.

CubeString* LevelEditor::clear
private

It is the clear CubeString.

CubeString* LevelEditor::create
private

It is the create button CubeString.

ActionList* LevelEditor::currentActions
private

It is the list of the current menu steps.

Vector3f LevelEditor::currentDelta
private

It is the vector to manage the obstacle movement.

QString LevelEditor::currentError
private

It is the current Error.

GLuint LevelEditor::currentGravity
private

It is the current gravity.

GLuint LevelEditor::currentLength
private

It is the current length.

QString LevelEditor::currentName
private

It is the current name for the level.

GLint LevelEditor::currentView
private

It is the value of the current view

GLuint LevelEditor::currentWidth
private

It is the current width.

Vector3f LevelEditor::deltaFromCentre
private

It is the vector to manage the distance from the centre of the obstacle.

CubeString* LevelEditor::exit
private

It is the exit CubeString.

CubeStringList* LevelEditor::formSetLevelName
private

It is the formSetLevelName cubeStringList.

CubeString* LevelEditor::gravityLabel
private

It is the "gravity" CubeString.

CubeString* LevelEditor::gravityString
private

It is the gravity CubeString.

QMap<GLint,GLuint> LevelEditor::iconsList
private

It is the iconsList provided by Qubet object.

GLboolean LevelEditor::isMoving
private

It is the variable that states if the menu is moving or not.

CubeString* LevelEditor::labelSetLevelName
private

It is the setLevelName CubeString.

Vector3f LevelEditor::lastCentre
private

It is the previous position of the centre of the moving object.

GLint LevelEditor::lastMouseX
private

It is the last mouse x value.

GLint LevelEditor::lastMouseY
private

It is the last mouse y value.

CubeString* LevelEditor::lengthLabel
private

It is the "length" CubeString.

CubeString* LevelEditor::lengthString
private

It is the length CubeString.

Level* LevelEditor::level
private

It is the current editing Level.

Vector3f* LevelEditor::levelOffset
private

It is the offset of the Level.

CubeString* LevelEditor::menu
private

It is the menu CubeString.

GLint LevelEditor::movingObject
private

It is the number of the currently moving object.

CubeString* LevelEditor::next
private

It is the next CubeString.

QObject* LevelEditor::parent
private

It is a callback variable to the parent of the widget.

bool LevelEditor::positionValid
private

It is the value that say if the obstacle position is valid or not.

CubeString* LevelEditor::save
private

It is the save CubeString.

QList<Vector3f> LevelEditor::toolbarObstacleCentres
private

It is the list to keep the centre of the toolbar's obstacles.

GLboolean LevelEditor::visible
private

It is the boolean value that if the type block is visible.

GLint LevelEditor::visibleTime
private

It is the visible time counter of the type block.

Skin* LevelEditor::volumeSkin
private

It is the skin of the volume button.

CubeString* LevelEditor::widthLabel
private

It is the "width" CubeString.

CubeString* LevelEditor::widthString
private

It is the width CubeString.

GLint LevelEditor::xCell
private

It is the xCell value.

GLint LevelEditor::yCell
private

It is the yCell value.

GLint LevelEditor::zCell
private

It is the zCell value.


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