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

klettres

Public Slots | Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
KLettresView Class Reference

#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

Author
Anne-Marie Mahfouf annma.nosp@m.@kde.nosp@m..org
Version
2.1

Definition at line 42 of file klettresview.h.

Constructor & Destructor Documentation

KLettresView::KLettresView ( KLettres *  parent)
explicit

Default constructor.

Definition at line 39 of file klettresview.cpp.

KLettresView::~KLettresView ( )
virtual

Destructor.

Definition at line 57 of file klettresview.cpp.

Member Function Documentation

void KLettresView::chooseSound ( )
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.

void KLettresView::enterLetter ( QString  letter)
inline

Enter a letter into the input widget.

Definition at line 56 of file klettresview.h.

void KLettresView::game ( )
slot

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

Definition at line 149 of file klettresview.cpp.

void KLettresView::keyReleaseEvent ( QKeyEvent *  e)
protected

If the user hits backpace.

Definition at line 235 of file klettresview.cpp.

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

Paint the background picture.

Definition at line 123 of file klettresview.cpp.

void KLettresView::paintEvent ( QPaintEvent *  e)
protected

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

Definition at line 115 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 134 of file klettresview.cpp.

void KLettresView::setTheme ( KLTheme *  theme)

set the chosen theme

Definition at line 88 of file klettresview.cpp.

void KLettresView::slotPlayAgain ( )
protectedslot

Play the same sound again.

Definition at line 229 of file klettresview.cpp.

void KLettresView::slotProcess ( const QString &  inputLetter)
protectedslot

Definition at line 165 of file klettresview.cpp.

void KLettresView::slotTimerDone ( )
protectedslot

Definition at line 201 of file klettresview.cpp.

Member Data Documentation

QPixmap KLettresView::m_backgroundCache
protected

Definition at line 96 of file klettresview.h.

QString KLettresView::m_currentLetter
protected

Current letter or syllable stored.

Definition at line 82 of file klettresview.h.

int KLettresView::m_cursorPos
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.

int KLettresView::m_length
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.

int KLettresView::m_random
protected

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

Definition at line 76 of file klettresview.h.

QSvgRenderer* KLettresView::m_renderer
protected

Definition at line 95 of file klettresview.h.

KLTheme* KLettresView::m_theme
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.

QString KLettresView::m_upperLetter
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:
  • klettresview.h
  • klettresview.cpp
This file is part of the KDE documentation.
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.

klettres

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal