Main Page   Compound List   File List   Compound Members   File Members  

KLettres Class Reference

Main window class. More...

#include <klettres.h>

List of all members.

Public Methods

 KLettres ()
 Constructor.

virtual ~KLettres ()
 Destructor.

void registerLanguage (const QString &menuItem, const char *actionId, bool enabled)
void changeLanguage (uint newLanguage)
bool loadLayout (QDomDocument &layoutDocument)

Public Attributes

QLabel * langLabel
 Label on statusBar that displays the current language.

QLabel * levLabel
 Label on the statusBar that displays the current level.

QFont newFont
 Holds the current font.

KToolBar * tb
 Create an instance of a KToolBar.

KComboBox * lev_comb
 Combobox that holds the different levels in the toolbar.

QString language
 Holds the i18n current language.

QString langString
 Holds the non i18n language, style is the background mode, either kid or grownup.

QString style
 Holds the non i18n language, style is the background mode, either kid or grownup.

int length
int input
int num
int numRead
bool menuBool
 is false when menubar button is not shown

bool kidBool
 is false when kid button not shown

bool grownBool
 is false when grownup button not shown

KLettresViewm_view
 Call an instance of the KLettresView widget.

SoundFactorysoundFactory
 Sound class.


Protected Methods

void saveProperties (KConfig *)
void readProperties (KConfig *)


Detailed Description

Main window class.

This class serves as the main window for KLettres. It handles the menus, toolbars, and status bars.

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

Definition at line 45 of file klettres.h.


Constructor & Destructor Documentation

KLettres::KLettres  
 

Constructor.

Definition at line 47 of file klettres.cpp.

References KLettresView::game(), grownBool, kidBool, langLabel, lev_comb, levLabel, m_view, menuBool, KLettresView::niveau, KLettresView::selectedLanguage, soundFactory, style, and tb.

KLettres::~KLettres   [virtual]
 

Destructor.

Definition at line 103 of file klettres.cpp.


Member Function Documentation

void KLettres::changeLanguage uint    newLanguage
 

Switch to another language

Parameters:
-  uint is the id of the new language

Definition at line 151 of file klettres.cpp.

References SoundFactory::change(), KLettresView::game(), m_view, and soundFactory.

bool KLettres::loadLayout QDomDocument &    layoutDocument
 

Load the xml file

Parameters:
-  the xml file
Returns:
- bool true if the xml document is found and well formed, false otherwise

Definition at line 178 of file klettres.cpp.

Referenced by SoundFactory::change(), and SoundFactory::SoundFactory().

void KLettres::readProperties KConfig *    [protected]
 

This function is called when this app is restored. The KConfig object points to the session management config file that was saved with saveProperties

Definition at line 266 of file klettres.cpp.

void KLettres::registerLanguage const QString &    menuItem,
const char *    actionId,
bool    enabled
 

Definition at line 125 of file klettres.cpp.

Referenced by SoundFactory::registerLanguages().

void KLettres::saveProperties KConfig *    [protected]
 

This function is called when it is time for the app to save its properties for session management purposes.

Definition at line 259 of file klettres.cpp.


Member Data Documentation

bool KLettres::grownBool
 

is false when grownup button not shown

Definition at line 75 of file klettres.h.

Referenced by KLettres().

int KLettres::input
 

Definition at line 69 of file klettres.h.

bool KLettres::kidBool
 

is false when kid button not shown

Definition at line 73 of file klettres.h.

Referenced by KLettres().

QLabel* KLettres::langLabel
 

Label on statusBar that displays the current language.

Definition at line 55 of file klettres.h.

Referenced by KLettres().

QString KLettres::langString
 

Holds the non i18n language, style is the background mode, either kid or grownup.

Definition at line 67 of file klettres.h.

QString KLettres::language
 

Holds the i18n current language.

Definition at line 65 of file klettres.h.

int KLettres::length
 

Definition at line 69 of file klettres.h.

KComboBox* KLettres::lev_comb
 

Combobox that holds the different levels in the toolbar.

Definition at line 63 of file klettres.h.

Referenced by KLettres().

QLabel* KLettres::levLabel
 

Label on the statusBar that displays the current level.

Definition at line 57 of file klettres.h.

Referenced by KLettres().

KLettresView* KLettres::m_view
 

Call an instance of the KLettresView widget.

Definition at line 90 of file klettres.h.

Referenced by changeLanguage(), KLettres(), and SoundFactory::loadLanguage().

bool KLettres::menuBool
 

is false when menubar button is not shown

Definition at line 71 of file klettres.h.

Referenced by KLettres().

QFont KLettres::newFont
 

Holds the current font.

Definition at line 59 of file klettres.h.

int KLettres::num
 

Definition at line 69 of file klettres.h.

int KLettres::numRead
 

Definition at line 69 of file klettres.h.

SoundFactory* KLettres::soundFactory
 

Sound class.

Definition at line 92 of file klettres.h.

Referenced by changeLanguage(), KLettresView::chooseSound(), KLettres(), KLettresView::timer1(), and KLettresView::timerDone().

QString KLettres::style
 

Holds the non i18n language, style is the background mode, either kid or grownup.

Definition at line 67 of file klettres.h.

Referenced by KLettres().

KToolBar* KLettres::tb
 

Create an instance of a KToolBar.

Definition at line 61 of file klettres.h.

Referenced by KLettres().


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