#include <kwin4.h>
Collaboration diagram for KWin4App:

Public Slots | |
| void | serverTypeChanged (int t) |
| The server type was changed (KGame). | |
| void | remoteChanged (int who) |
| The remote player changed (GUI signal). | |
| void | slotGameOver (int status, KPlayer *p, KGame *me) |
| The game is over indication. | |
| void | moveDone (int playerNumber) |
| A move has been performed. | |
| void | networkBroken (int id, int oldstatus, KGame *game) |
| The network connection has been lost. | |
| void | gameRun () |
| Being noticed by KGAme that a new game started. | |
| void | updateStatusNames () |
| Update the names in the status bar. | |
| void | configureNetwork () |
| Show the network configuration dialog. | |
| void | configureChat () |
| Show the network chat dialog. | |
| void | debugKGame () |
| Show the debug a KGame dialog. | |
| void | menuNewGame () |
| The New game menu is selected. | |
| void | menuOpenGame () |
| The Load game menu is selected. | |
| void | menuSaveGame () |
| The Save game menu is selected. | |
| void | endGame () |
| Called when the game is to be ended, e.g. | |
| void | showStatistics () |
| Shows the statistics dialog. | |
| void | askForHint () |
| A game hint is asked via the menu. | |
| void | changeTheme (const QString &name) |
| A new theme is selected from the menu. | |
| void | undoMove () |
| A move undo request is given via the menu. | |
| void | redoMove () |
| A move redo request is given via the menu. | |
| void | displayStatusbarMover (const QString &text) |
| Display the current player to move in the statusbar. | |
| void | displayStatusMessage (const QString &text) |
| Display a message in the status bar. | |
| void | configureSettings () |
| Show the settings dialog. | |
Public Member Functions | |
| KWin4App (QWidget *parent=0) | |
| Construct the application. | |
| ~KWin4App () | |
| Destruct the application. | |
Protected Types | |
| enum | CheckFlags { All = 0, CheckFileMenu = 1, CheckEditMenu = 2 } |
| Flags which menus should be checked and set by below functions. More... | |
Protected Member Functions | |
| void | EndGame (TABLE mode) |
| The game is ended. | |
| void | changeAction (const char *action, bool enable) |
| Enable or disable an action depending on the boolean parameter. | |
| void | enableAction (const char *action) |
| Enable oactions that is menu/toolbar items. | |
| void | disableAction (const char *action) |
| Disable actions that is menu/toolbar items. | |
| void | checkMenus (CheckFlags menu=All) |
| Checks all menues and depening on the game status enables or disables them. | |
| void | initGUI () |
| Setup all actions (menus and toolbar items). | |
| void | initStatusBar () |
| Setup the statusbar. | |
| void | initDocument () |
| Prepare the game engine (document) and connect its signals. | |
| virtual void | saveProperties (KConfigGroup &cfg) |
| Save the properties of the application. | |
| virtual void | readProperties (const KConfigGroup &cfg) |
| Read the properties of the application. | |
Definition at line 45 of file kwin4.h.
|
|
Flags which menus should be checked and set by below functions.
|
|
|
Construct the application.
Definition at line 68 of file kwin4.cpp. References checkMenus(), initDocument(), initGUI(), KWin4Doc::initPlayers(), initStatusBar(), KWin4Doc::readConfig(), KWin4Doc::setView(), and SRC_DIR. Here is the call graph for this function: ![]() |
|
|
Destruct the application.
|
|
|
A game hint is asked via the menu. The game will give a movement tip. Definition at line 380 of file kwin4.cpp. References KWin4Doc::calculateHint(). Referenced by initGUI(). |
|
||||||||||||
|
Enable or disable an action depending on the boolean parameter.
Definition at line 293 of file kwin4.cpp. Referenced by checkMenus(), disableAction(), and enableAction(). |
|
|
A new theme is selected from the menu.
Definition at line 254 of file kwin4.cpp. References ThemeManager::updateTheme(). Referenced by initGUI(). |
|
|
Checks all menues and depening on the game status enables or disables them. This is usually done on program init.
Definition at line 128 of file kwin4.cpp. References changeAction(), CheckEditMenu, CheckFileMenu, disableAction(), KWin4Doc::getCurrentMove(), and KWin4Doc::getHistoryCnt(). Referenced by EndGame(), gameRun(), KWin4App(), menuOpenGame(), moveDone(), redoMove(), slotGameOver(), and undoMove(). Here is the call graph for this function: ![]() |
|
|
Show the network chat dialog.
Definition at line 609 of file kwin4.cpp. References KWin4Doc::getPlayer(), Red, ChatDlg::setPlayer(), and Yellow. Referenced by initGUI(). |
|
|
Show the network configuration dialog.
Definition at line 552 of file kwin4.cpp. Referenced by initGUI(). |
|
|
Show the settings dialog.
Definition at line 639 of file kwin4.cpp. References Prefs::self(), and Ui_Settings::setupUi(). Referenced by initGUI(). |
|
|
Show the debug a KGame dialog.
Definition at line 631 of file kwin4.cpp. Referenced by initGUI(). |
|
|
Disable actions that is menu/toolbar items.
Definition at line 85 of file kwin4.h. References changeAction(). Referenced by checkMenus(). Here is the call graph for this function: ![]() |
|
|
Display the current player to move in the statusbar.
Definition at line 453 of file kwin4.cpp. References ID_STATUS_MOVER. Referenced by initStatusBar(), and updateStatusNames(). |
|
|
Display a message in the status bar.
Definition at line 444 of file kwin4.cpp. References ID_STATUS_MSG. Referenced by initStatusBar(), menuNewGame(), moveDone(), and slotGameOver(). |
|
|
Enable oactions that is menu/toolbar items.
Definition at line 80 of file kwin4.h. References changeAction(). Here is the call graph for this function: ![]() |
|
|
Called when the game is to be ended, e.g. via the abort game menu. Definition at line 373 of file kwin4.cpp. Referenced by initGUI(). |
|
|
The game is ended. Either because it is finised or because it is aborted by the player.
Definition at line 462 of file kwin4.cpp. References checkMenus(), KWin4Doc::endGame(), KWin4Doc::switchStartPlayer(), and updateStatusNames(). Referenced by slotGameOver(). Here is the call graph for this function: ![]() |
|
|
Being noticed by KGAme that a new game started.
Definition at line 365 of file kwin4.cpp. References All, checkMenus(), and updateStatusNames(). Referenced by initDocument(). |
|
|
Prepare the game engine (document) and connect its signals.
Definition at line 276 of file kwin4.cpp. References gameRun(), moveDone(), networkBroken(), and slotGameOver(). Referenced by KWin4App(). |
|
|
Setup all actions (menus and toolbar items).
Definition at line 179 of file kwin4.cpp. References ACTION, askForHint(), changeTheme(), configureChat(), configureNetwork(), configureSettings(), debugKGame(), endGame(), global_debug, menuNewGame(), menuOpenGame(), menuSaveGame(), redoMove(), showStatistics(), and undoMove(). Referenced by KWin4App(). |
|
|
Setup the statusbar.
Definition at line 264 of file kwin4.cpp. References displayStatusbarMover(), displayStatusMessage(), ID_STATUS_MOVER, and ID_STATUS_MSG. Referenced by KWin4App(). |
|
|
The New game menu is selected.
Definition at line 351 of file kwin4.cpp. References displayStatusMessage(). Referenced by initGUI(). |
|
|
The Load game menu is selected.
Definition at line 327 of file kwin4.cpp. References checkMenus(), and global_debug. Referenced by initGUI(). |
|
|
The Save game menu is selected.
Definition at line 339 of file kwin4.cpp. References global_debug. Referenced by initGUI(). |
|
|
A move has been performed. Update the status etc.
Definition at line 512 of file kwin4.cpp. References CheckEditMenu, checkMenus(), displayStatusMessage(), and updateStatusNames(). Referenced by initDocument(). |
|
||||||||||||||||
|
The network connection has been lost.
Definition at line 487 of file kwin4.cpp. References KWin4Doc::getCurrentPlayer(), KWin4Doc::getPlayer(), KWin4Doc::playedBy(), Red, KWin4Doc::setPlayedBy(), and Yellow. Referenced by initDocument(). |
|
|
Read the properties of the application.
|
|
|
A move redo request is given via the menu.
Definition at line 430 of file kwin4.cpp. References CheckEditMenu, checkMenus(), KWin4Doc::getCurrentPlayer(), KWin4Doc::playedBy(), KWin4Doc::redoMove(), and updateStatusNames(). Referenced by initGUI(). |
|
|
The remote player changed (GUI signal).
Definition at line 593 of file kwin4.cpp. References KWin4Doc::getPlayer(), Red, and Yellow. |
|
|
Save the properties of the application.
|
|
|
The server type was changed (KGame).
|
|
|
Shows the statistics dialog.
Definition at line 387 of file kwin4.cpp. References KWin4Doc::getName(), KWin4Doc::getStatistic(), Ui_Statistics::p1_aborted, Ui_Statistics::p1_drawn, Ui_Statistics::p1_lost, Ui_Statistics::p1_name, Ui_Statistics::p1_sum, Ui_Statistics::p1_won, Ui_Statistics::p2_aborted, Ui_Statistics::p2_drawn, Ui_Statistics::p2_lost, Ui_Statistics::p2_name, Ui_Statistics::p2_sum, Ui_Statistics::p2_won, Red, KWin4Doc::resetStatistic(), Ui_Statistics::setupUi(), TBrk, TLost, TRemis, TSum, TWin, and Yellow. Referenced by initGUI(). |
|
||||||||||||||||
|
The game is over indication.
Definition at line 520 of file kwin4.cpp. References CheckEditMenu, checkMenus(), displayStatusMessage(), EndGame(), KWin4Doc::getName(), TBrk, TLost, TRemis, TWin, and Yellow. Referenced by initDocument(). |
|
|
A move undo request is given via the menu.
Definition at line 415 of file kwin4.cpp. References CheckEditMenu, checkMenus(), KWin4Doc::getCurrentPlayer(), KWin4Doc::playedBy(), KWin4Doc::undoMove(), and updateStatusNames(). Referenced by initGUI(). |
|
|
Update the names in the status bar.
Definition at line 472 of file kwin4.cpp. References displayStatusbarMover(), KWin4Doc::getCurrentPlayer(), KWin4Doc::getName(), Red, and Yellow. Referenced by EndGame(), gameRun(), moveDone(), redoMove(), and undoMove(). |
1.4.6