KGameDifficultyPrivate Class Reference

List of all members.

Public Slots

void changeSelection (int newSelection)

Signals

void standardLevelChanged (KGameDifficulty::standardLevel level)
void customLevelChanged (int key)

Public Member Functions

 ~KGameDifficultyPrivate ()
void init (KXmlGuiWindow *window, const QObject *recvr, const char *slotStandard, const char *slotCustom)
void rebuildActions ()
QString standardLevelString (KGameDifficulty::standardLevel level)
 
Returns:
standard string for standard level

void setLevel (KGameDifficulty::standardLevel level)
void setLevelCustom (int key)

Public Attributes

int m_levelCustom
KGameDifficulty::standardLevel m_level
QList
< KGameDifficulty::standardLevel
m_standardLevels
QMap< int, QString > m_customLevels
KSelectAction * m_menu
KGameDifficulty::onChange m_restartOnChange
bool m_running
int m_oldSelection
KComboBox * m_comboBox


Detailed Description

Definition at line 30 of file kgamedifficulty.cpp.


Constructor & Destructor Documentation

KGameDifficultyPrivate::~KGameDifficultyPrivate (  ) 

Definition at line 98 of file kgamedifficulty.cpp.


Member Function Documentation

void KGameDifficultyPrivate::init ( KXmlGuiWindow *  window,
const QObject *  recvr,
const char *  slotStandard,
const char *  slotCustom = 0 
)

Definition at line 104 of file kgamedifficulty.cpp.

References changeSelection(), customLevelChanged(), m_comboBox, m_level, m_menu, m_oldSelection, m_running, KGameDifficulty::NoLevel, KGameDifficulty::RestartOnChange, KGameDifficulty::setRestartOnChange(), and standardLevelChanged().

Referenced by KGameDifficulty::init().

Here is the call graph for this function:

void KGameDifficultyPrivate::rebuildActions (  ) 

Definition at line 179 of file kgamedifficulty.cpp.

References KGameDifficulty::Configurable, KGameDifficulty::Custom, m_comboBox, m_customLevels, m_level, m_levelCustom, m_menu, m_standardLevels, KGameDifficulty::setLevel(), KGameDifficulty::setLevelCustom(), and standardLevelString().

Referenced by KGameDifficulty::addCustomLevel(), KGameDifficulty::addStandardLevel(), KGameDifficulty::removeCustomLevel(), and KGameDifficulty::removeStandardLevel().

Here is the call graph for this function:

QString KGameDifficultyPrivate::standardLevelString ( KGameDifficulty::standardLevel  level  ) 

Returns:
standard string for standard level

Definition at line 151 of file kgamedifficulty.cpp.

References KGameDifficulty::Configurable, KGameDifficulty::Custom, KGameDifficulty::Easy, KGameDifficulty::ExtremelyHard, KGameDifficulty::Hard, KGameDifficulty::Impossible, KGameDifficulty::Medium, KGameDifficulty::NoLevel, KGameDifficulty::RidiculouslyEasy, KGameDifficulty::VeryEasy, and KGameDifficulty::VeryHard.

Referenced by KGameDifficulty::levelString(), and rebuildActions().

void KGameDifficultyPrivate::setLevel ( KGameDifficulty::standardLevel  level  ) 

Definition at line 233 of file kgamedifficulty.cpp.

References KGameDifficulty::Configurable, KGameDifficulty::Custom, m_comboBox, m_level, m_menu, m_oldSelection, m_standardLevels, KGameDifficulty::NoLevel, and standardLevelChanged().

Referenced by KGameDifficulty::setLevel().

void KGameDifficultyPrivate::setLevelCustom ( int  key  ) 

Definition at line 256 of file kgamedifficulty.cpp.

References KGameDifficulty::Configurable, KGameDifficulty::Custom, customLevelChanged(), m_comboBox, m_customLevels, m_level, m_levelCustom, m_menu, m_oldSelection, and m_standardLevels.

Referenced by KGameDifficulty::setLevelCustom().

void KGameDifficultyPrivate::changeSelection ( int  newSelection  )  [slot]

Player wants to change the difficulty level to a standard level The difference with the methode "setSelection" is that the player may have to confirm that he agrees to end the current game (if needed).

Parameters:
newSelection Selected item.

Definition at line 134 of file kgamedifficulty.cpp.

References m_oldSelection, m_restartOnChange, m_running, and KGameDifficulty::RestartOnChange.

Referenced by init().

void KGameDifficultyPrivate::standardLevelChanged ( KGameDifficulty::standardLevel  level  )  [signal]

Current difficulty level changed to a standard level The game catchs this signal and restarts a game with the new standard difficulty level.

Parameters:
level New standard level.

Referenced by init(), and setLevel().

void KGameDifficultyPrivate::customLevelChanged ( int  key  )  [signal]

Current difficulty level changed to a custom level The game catchs this signal and restarts a game with the new standard difficulty level.

Parameters:
key Custom level identifier.

Referenced by init(), and setLevelCustom().


Member Data Documentation

int KGameDifficultyPrivate::m_levelCustom

Current custom difficulty level

Definition at line 53 of file kgamedifficulty.cpp.

Referenced by KGameDifficulty::levelCustom(), rebuildActions(), and setLevelCustom().

KGameDifficulty::standardLevel KGameDifficultyPrivate::m_level

Definition at line 55 of file kgamedifficulty.cpp.

Referenced by init(), KGameDifficulty::level(), rebuildActions(), setLevel(), and setLevelCustom().

QList<KGameDifficulty::standardLevel> KGameDifficultyPrivate::m_standardLevels

Definition at line 56 of file kgamedifficulty.cpp.

Referenced by KGameDifficulty::addStandardLevel(), rebuildActions(), KGameDifficulty::removeStandardLevel(), setLevel(), and setLevelCustom().

QMap<int, QString> KGameDifficultyPrivate::m_customLevels

Definition at line 57 of file kgamedifficulty.cpp.

Referenced by KGameDifficulty::addCustomLevel(), rebuildActions(), KGameDifficulty::removeCustomLevel(), and setLevelCustom().

KSelectAction* KGameDifficultyPrivate::m_menu

Definition at line 59 of file kgamedifficulty.cpp.

Referenced by init(), rebuildActions(), KGameDifficulty::setEnabled(), setLevel(), and setLevelCustom().

KGameDifficulty::onChange KGameDifficultyPrivate::m_restartOnChange

Definition at line 60 of file kgamedifficulty.cpp.

Referenced by changeSelection(), and KGameDifficulty::setRestartOnChange().

bool KGameDifficultyPrivate::m_running

Definition at line 61 of file kgamedifficulty.cpp.

Referenced by changeSelection(), init(), and KGameDifficulty::setRunning().

int KGameDifficultyPrivate::m_oldSelection

Definition at line 62 of file kgamedifficulty.cpp.

Referenced by changeSelection(), init(), setLevel(), and setLevelCustom().

KComboBox* KGameDifficultyPrivate::m_comboBox

Definition at line 63 of file kgamedifficulty.cpp.

Referenced by init(), rebuildActions(), KGameDifficulty::setEnabled(), setLevel(), setLevelCustom(), and KGameDifficulty::setRestartOnChange().


The documentation for this class was generated from the following file:
Generated on Sun Mar 16 08:03:19 2008 for Libkdegames by  doxygen 1.5.3