• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

klettres

KLettresView Class Reference

#include <klettresview.h>

Inheritance diagram for KLettresView:

Inheritance graph
[legend]

List of all members.


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

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

Definition at line 42 of file klettresview.h.


Public Slots

void game ()

Public Member Functions

 KLettresView (KLettres *parent)
virtual ~KLettresView ()
void enterLetter (QString letter)
void setTheme (KLTheme *theme)

Public Attributes

int m_timer
int randomInt
KLettres * m_klettres
KLineEdit * m_letterEdit

Protected Slots

void slotPlayAgain ()
void slotProcess (const QString &inputLetter)
void slotTimerDone ()

Protected Member Functions

void chooseSound ()
void paintEvent (QPaintEvent *)
void paintBackground (QPainter &p, const QRect &rect)
void paintLetter (QPainter &p, const QRect &rect)

Protected Attributes

int m_cursorPos
int m_random
int m_length
QString m_currentLetter
QString m_upperLetter
KLTheme * m_theme
QSvgRenderer * m_renderer
QPixmap m_backgroundCache

Constructor & Destructor Documentation

KLettresView::KLettresView ( KLettres *  parent  )  [explicit]

Default constructor.

Definition at line 38 of file klettresview.cpp.

KLettresView::~KLettresView (  )  [virtual]

Destructor.

Definition at line 55 of file klettresview.cpp.


Member Function Documentation

void KLettresView::enterLetter ( QString  letter  )  [inline]

Enter a letter into the input widget.

Definition at line 56 of file klettresview.h.

void KLettresView::setTheme ( KLTheme *  theme  ) 

set the chosen theme

Definition at line 83 of file klettresview.cpp.

void KLettresView::chooseSound (  )  [protected]

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

Definition at line 61 of file klettresview.cpp.

void KLettresView::paintEvent ( QPaintEvent *  e  )  [protected]

Paint the letter/syllable in levels 1 and 3 and the background.

Reimplemented from QWidget.

Definition at line 110 of file klettresview.cpp.

void KLettresView::paintBackground ( QPainter &  p,
const QRect &  rect 
) [protected]

Definition at line 118 of file klettresview.cpp.

void KLettresView::paintLetter ( QPainter &  p,
const QRect &  rect 
) [protected]

Paint the letter/syllable in levels 1 and 3.

Definition at line 129 of file klettresview.cpp.

void KLettresView::game (  )  [slot]

Start playing displaying a new letter/syllable, playing the associated sound.

Definition at line 144 of file klettresview.cpp.

void KLettresView::slotPlayAgain (  )  [protected, slot]

Play the same sound again.

Definition at line 219 of file klettresview.cpp.

void KLettresView::slotProcess ( const QString &  inputLetter  )  [protected, slot]

Definition at line 159 of file klettresview.cpp.

void KLettresView::slotTimerDone (  )  [protected, slot]

Definition at line 189 of file klettresview.cpp.


Member Data Documentation

int KLettresView::m_timer

The timer value i.e. the time for displaying the letters/syllables.

Definition at line 59 of file klettresview.h.

int KLettresView::randomInt

The index to the random sequence.

Definition at line 61 of file klettresview.h.

KLettres* KLettresView::m_klettres

A Klettres object.

Definition at line 63 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.

int KLettresView::m_cursorPos [protected]

cursor position in the line edit

Definition at line 71 of file klettresview.h.

int KLettresView::m_random [protected]

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

Definition at line 73 of file klettresview.h.

int KLettresView::m_length [protected]

Length of the syllables.

Definition at line 75 of file klettresview.h.

QString KLettresView::m_currentLetter [protected]

Current letter or syllable stored.

Definition at line 79 of file klettresview.h.

QString KLettresView::m_upperLetter [protected]

Current letter entered uppercase i.e. m_inputLetter.upper().

Definition at line 81 of file klettresview.h.

KLTheme* KLettresView::m_theme [protected]

Current theme.

Definition at line 89 of file klettresview.h.

QSvgRenderer* KLettresView::m_renderer [protected]

Definition at line 92 of file klettresview.h.

QPixmap KLettresView::m_backgroundCache [protected]

Definition at line 93 of file klettresview.h.


The documentation for this class was generated from the following files:
  • klettresview.h
  • klettresview.cpp

klettres

Skip menu "klettres"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal