Qubet  1.0
The ultimate QGL addicting videogame!
 All Classes Functions Variables Pages
alphabet.h
1 // Qubet - Copyright (C) 2011
2 // Enrico Bacis
3 // Daniele Ciriello
4 
5 // Qubet is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 
19 #ifndef ALPHABET_H
20 #define ALPHABET_H
21 
22 #include "letter.h"
23 #include "skin.h"
24 
33 class Alphabet
34 {
35 
36 public:
37 
42  explicit Alphabet();
43 
47  ~Alphabet();
48 
62  Skin *getRandomLetterSkin(QChar letter);
63 
74  GLuint getRandomLetterTexture(QChar letter);
75 
90  QList<GLuint> getRandomLetterTextures(QChar letter, GLint numberOfTextures);
91 
102  QList<GLuint> getAllLetterTextures(QChar letter);
103 
111  GLvoid appendLetterTexture(QChar letter, GLuint textureID);
112 
113 
114 private:
115 
116  QMap<QChar,Letter*> lettersList;
118 };
119 
120 #endif // ALPHABET_H
GLuint getRandomLetterTexture(QChar letter)
Returns a random texture of the letter given as parameter.
Definition: alphabet.cpp:64
Skin * getRandomLetterSkin(QChar letter)
Returns a random generated Skin of the letter given as parameter.
Definition: alphabet.cpp:36
QMap< QChar, Letter * > lettersList
Definition: alphabet.h:116
It is the Skin Class.
Definition: skin.h:30
~Alphabet()
Safely destroy an Alphabet (and all the Letter in its list).
Definition: alphabet.cpp:27
GLvoid appendLetterTexture(QChar letter, GLuint textureID)
Appends the textureID given as parameter to the Letter's textures of the letter given as parameter...
Definition: alphabet.cpp:104
Alphabet()
Creates an empty Alphabet and initializes the seed of random number generation used to extract a set ...
Definition: alphabet.cpp:21
This class is used to keep a list of Letter (from this the name Alphabet) It provide access to Letter...
Definition: alphabet.h:33
QList< GLuint > getRandomLetterTextures(QChar letter, GLint numberOfTextures)
Returns a list of random textures of the letter given as parameter.
Definition: alphabet.cpp:75
QList< GLuint > getAllLetterTextures(QChar letter)
Returns a list of all the textures of the letter given as parameter.
Definition: alphabet.cpp:93