Main Page   Compound List   File List   Compound Members   File Members  

KLettresView Class Reference

KLettres View class. More...

#include <klettresview.h>

List of all members.

Public Slots

void slotGrownup ()
 Set the Grown-up background, show menubar, show the Kid button.

void slotKid ()
 Set the Kid background pic, hide the menubar, show the Grownup button.

void game ()
 Start the prog.

void treat1 (const QString &)
void timer1 ()
void slotLet2 (const QString &)
void timerDone ()
void chooseSound ()
 Choose a sound in random and ensure that it's not the same than the previous one.


Public Methods

 KLettresView (KLettres *parent)
virtual ~KLettresView ()

Public Attributes

QLabel * button1
 The button that display the letter or syllable.

QLineEdit * line1
 The line where the user enters his/her input.

QPixmap pm_k
 The pixmap for the kid background.

QPixmap pm_a
 The pixmap for the grown-up background.

QPalette pal
 Palette changes wether it's kid or grown-up.

QColorGroup cg
int niveau
 Current level.

int n
 Random number that decides on the letter/syllable and sound.

int temp
 Temporary number to store the previous random and check that it's not twice the same.

int length
 Length of the syllables.

uint selectedLanguage
 Number corresponding to the selected language: 0 is Czech, 1 is Danish, 2 is French (default), 3 is Dutch.

QString style
 Current style (kid or grownup).

QString st
 Current letter or syllable stored.

QString sj
 Current input in line1.

QString t1
 User input in upper case.

QString a1
 User input.

int input
 Cursor position in the line edit.


Detailed Description

KLettres View class.

This class serves as the view for KLettres. It holds the GUI for the kid and grown-up looks and has the code to display the letter/syllable and play the sound.

Author:
Anne-Marie Mahfouf <annma@kde.org>
Version:
1.1

Definition at line 40 of file klettresview.h.


Constructor & Destructor Documentation

KLettresView::KLettresView KLettres   parent
 

Default constructor

Definition at line 33 of file klettresview.cpp.

References button1, cg, line1, n, pal, pm_a, pm_k, and temp.

KLettresView::~KLettresView   [virtual]
 

Destructor

Definition at line 64 of file klettresview.cpp.


Member Function Documentation

void KLettresView::chooseSound   [slot]
 

Choose a sound in random and ensure that it's not the same than the previous one.

Definition at line 266 of file klettresview.cpp.

References button1, input, length, n, SoundFactory::namesList, SoundFactory::playSound(), KLettres::soundFactory, SoundFactory::sounds, st, and temp.

Referenced by game(), and timer1().

void KLettresView::game   [slot]
 

Start the prog.

This begin the game or begin a new level: set button and lineedit sizes set connections

Definition at line 97 of file klettresview.cpp.

References button1, chooseSound(), input, length, line1, niveau, slotLet2(), and treat1().

Referenced by KLettres::changeLanguage(), KLettres::KLettres(), and timerDone().

void KLettresView::slotGrownup   [slot]
 

Set the Grown-up background, show menubar, show the Kid button.

Definition at line 69 of file klettresview.cpp.

References button1, cg, pal, pm_a, and style.

void KLettresView::slotKid   [slot]
 

Set the Kid background pic, hide the menubar, show the Grownup button.

Definition at line 83 of file klettresview.cpp.

References button1, cg, pal, pm_k, and style.

void KLettresView::slotLet2 const QString &    [slot]
 

Definition at line 209 of file klettresview.cpp.

References a1, input, line1, sj, st, t1, and timerDone().

Referenced by game(), timerDone(), and treat1().

void KLettresView::timer1   [slot]
 

Definition at line 187 of file klettresview.cpp.

References button1, chooseSound(), line1, n, niveau, SoundFactory::playSound(), KLettres::soundFactory, t1, and treat1().

Referenced by treat1().

void KLettresView::timerDone   [slot]
 

Definition at line 229 of file klettresview.cpp.

References button1, game(), input, line1, n, niveau, SoundFactory::playSound(), sj, slotLet2(), KLettres::soundFactory, st, and t1.

Referenced by slotLet2().

void KLettresView::treat1 const QString &    [slot]
 

Definition at line 161 of file klettresview.cpp.

References a1, button1, line1, niveau, slotLet2(), t1, and timer1().

Referenced by game(), and timer1().


Member Data Documentation

QString KLettresView::a1
 

User input.

Definition at line 84 of file klettresview.h.

Referenced by slotLet2(), and treat1().

QLabel* KLettresView::button1
 

The button that display the letter or syllable.

Definition at line 55 of file klettresview.h.

Referenced by chooseSound(), game(), KLettresView(), slotGrownup(), slotKid(), timer1(), timerDone(), and treat1().

QColorGroup KLettresView::cg
 

Definition at line 64 of file klettresview.h.

Referenced by KLettresView(), slotGrownup(), and slotKid().

int KLettresView::input
 

Cursor position in the line edit.

Definition at line 86 of file klettresview.h.

Referenced by chooseSound(), game(), slotLet2(), and timerDone().

int KLettresView::length
 

Length of the syllables.

Definition at line 72 of file klettresview.h.

Referenced by chooseSound(), and game().

QLineEdit* KLettresView::line1
 

The line where the user enters his/her input.

Definition at line 57 of file klettresview.h.

Referenced by game(), KLettresView(), slotLet2(), timer1(), timerDone(), and treat1().

int KLettresView::n
 

Random number that decides on the letter/syllable and sound.

Definition at line 68 of file klettresview.h.

Referenced by chooseSound(), KLettresView(), timer1(), and timerDone().

int KLettresView::niveau
 

Current level.

Definition at line 66 of file klettresview.h.

Referenced by game(), KLettres::KLettres(), SoundFactory::loadLanguage(), timer1(), timerDone(), and treat1().

QPalette KLettresView::pal
 

Palette changes wether it's kid or grown-up.

Definition at line 63 of file klettresview.h.

Referenced by KLettresView(), slotGrownup(), and slotKid().

QPixmap KLettresView::pm_a
 

The pixmap for the grown-up background.

Definition at line 61 of file klettresview.h.

Referenced by KLettresView(), and slotGrownup().

QPixmap KLettresView::pm_k
 

The pixmap for the kid background.

Definition at line 59 of file klettresview.h.

Referenced by KLettresView(), and slotKid().

uint KLettresView::selectedLanguage
 

Number corresponding to the selected language: 0 is Czech, 1 is Danish, 2 is French (default), 3 is Dutch.

Definition at line 74 of file klettresview.h.

Referenced by KLettres::KLettres().

QString KLettresView::sj
 

Current input in line1.

Definition at line 80 of file klettresview.h.

Referenced by slotLet2(), and timerDone().

QString KLettresView::st
 

Current letter or syllable stored.

Definition at line 78 of file klettresview.h.

Referenced by chooseSound(), slotLet2(), and timerDone().

QString KLettresView::style
 

Current style (kid or grownup).

Definition at line 76 of file klettresview.h.

Referenced by slotGrownup(), and slotKid().

QString KLettresView::t1
 

User input in upper case.

Definition at line 82 of file klettresview.h.

Referenced by slotLet2(), timer1(), timerDone(), and treat1().

int KLettresView::temp
 

Temporary number to store the previous random and check that it's not twice the same.

Definition at line 70 of file klettresview.h.

Referenced by chooseSound(), and KLettresView().


The documentation for this class was generated from the following files:
Generated on Sat Oct 18 21:37:50 2003 by doxygen1.2.18