klettres
#include <klettresview.h>
Inherits QWidget.
Public Slots | |
| void | game () |
Public Member Functions | |
| KLettresView (KLettres *parent) | |
| virtual | ~KLettresView () |
| void | enterLetter (QString letter) |
| void | setTheme (KLTheme *theme) |
Public Attributes | |
| KLettres * | m_klettres |
| KLineEdit * | m_letterEdit |
| int | m_timer |
| int | randomInt |
Protected Slots | |
| void | slotPlayAgain () |
| void | slotProcess (const QString &inputLetter) |
| void | slotTimerDone () |
Protected Member Functions | |
| void | chooseSound () |
| void | keyReleaseEvent (QKeyEvent *e) |
| void | paintBackground (QPainter &p, const QRect &rect) |
| void | paintEvent (QPaintEvent *) |
| void | paintLetter (QPainter &p, const QRect &rect) |
Protected Attributes | |
| QPixmap | m_backgroundCache |
| QString | m_currentLetter |
| int | m_cursorPos |
| int | m_length |
| int | m_random |
| QSvgRenderer * | m_renderer |
| KLTheme * | m_theme |
| QString | m_upperLetter |
Detailed Description
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.
KLettres View class
- Version
- 2.1
Definition at line 42 of file klettresview.h.
Constructor & Destructor Documentation
|
explicit |
Default constructor.
Definition at line 39 of file klettresview.cpp.
|
virtual |
Destructor.
Definition at line 57 of file klettresview.cpp.
Member Function Documentation
|
protected |
Choose a sound in random and ensure that it's not the same than the previous one.
Definition at line 63 of file klettresview.cpp.
|
inline |
Enter a letter into the input widget.
Definition at line 56 of file klettresview.h.
|
slot |
Start playing displaying a new letter/syllable, playing the associated sound.
Definition at line 149 of file klettresview.cpp.
|
protected |
If the user hits backpace.
Definition at line 235 of file klettresview.cpp.
|
protected |
Paint the background picture.
Definition at line 123 of file klettresview.cpp.
|
protected |
Paint the letter/syllable in levels 1 and 3 and the background.
Definition at line 115 of file klettresview.cpp.
|
protected |
Paint the letter/syllable in levels 1 and 3.
Definition at line 134 of file klettresview.cpp.
| void KLettresView::setTheme | ( | KLTheme * | theme | ) |
set the chosen theme
Definition at line 88 of file klettresview.cpp.
|
protectedslot |
Play the same sound again.
Definition at line 229 of file klettresview.cpp.
|
protectedslot |
Definition at line 165 of file klettresview.cpp.
|
protectedslot |
Definition at line 201 of file klettresview.cpp.
Member Data Documentation
|
protected |
Definition at line 96 of file klettresview.h.
|
protected |
Current letter or syllable stored.
Definition at line 82 of file klettresview.h.
|
protected |
Cursor position in the line edit.
Definition at line 74 of file klettresview.h.
| KLettres* KLettresView::m_klettres |
A Klettres object.
Definition at line 63 of file klettresview.h.
|
protected |
Length of the syllables.
Definition at line 78 of file klettresview.h.
| KLineEdit* KLettresView::m_letterEdit |
The line where the user enters his/her input.
Definition at line 65 of file klettresview.h.
|
protected |
Random number that decides on the letter/syllable and sound.
Definition at line 76 of file klettresview.h.
|
protected |
Definition at line 95 of file klettresview.h.
|
protected |
Current theme.
Definition at line 92 of file klettresview.h.
| int KLettresView::m_timer |
The timer value i.e. the time for displaying the letters/syllables.
Definition at line 59 of file klettresview.h.
|
protected |
Current letter entered uppercase i.e. m_inputLetter.upper()
Definition at line 84 of file klettresview.h.
| int KLettresView::randomInt |
The index to the random sequence.
Definition at line 61 of file klettresview.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
KDE API Reference