#include <mainwindow.h>
Collaboration diagram for Mainwindow:

Public Types | |
| enum | GameMode { Intro = 0, LSkat = 1, Skat = 2 } |
| Game mode type. More... | |
Public Slots | |
| void | menuNewLSkatGame () |
| A new game is started from the menu. | |
| void | menuEndGame () |
| A game is stopped in the menu. | |
| void | menuStartplayer () |
| The start player is changed in the menu. | |
| void | menuPlayer1By () |
| void | menuPlayer2By () |
| void | menuCardDeck () |
| A card deck is chosen from the menu. | |
| void | menuPlayerNames () |
| The player names shall be changed. | |
| void | menuClearStatistics () |
| The all time statistics is cleared from the menu. | |
| void | gameOver (int winner) |
| A game over signal arrived. | |
| void | nextPlayer (Player *player) |
| Next players turn. | |
Public Member Functions | |
| Mainwindow (QWidget *parent=0) | |
| Construct the main window. | |
| ~Mainwindow () | |
| Destructor. | |
Protected Slots | |
| void | setInputType (int no, InputDeviceType type) |
| Set the input type for a given player number. | |
Protected Member Functions | |
| AbstractInput * | createInput (InputDevice::InputDeviceType inputType, AbstractDisplay *display, AbstractEngine *engine) |
| A new input device is created. | |
| void | initGUI () |
| Initialize all GUI elements. | |
| void | startGame () |
| Start a new game. | |
| void | setStartPlayer (int no) |
| Set-up the start player. | |
| virtual void | saveProperties () |
| Saves the window properties. | |
| virtual void | readProperties () |
| Reads the session config file and restores the application's state. | |
| virtual bool | queryExit () |
| Called by KMainWindow when the last window of the application is going to be closed. | |
Definition at line 56 of file mainwindow.h.
|
|
Game mode type.
Definition at line 62 of file mainwindow.h. |
|
|
Construct the main window.
Definition at line 74 of file mainwindow.cpp. References ADVANCE_PERDIOD, global_debug, global_demo_mode, global_skip_intro, initGUI(), Intro, menuNewLSkatGame(), readProperties(), ConfigTwo::reset(), setInputType(), SRC_DIR, and AbstractDisplay::start(). Here is the call graph for this function: ![]() |
|
|
Destructor.
Definition at line 153 of file mainwindow.cpp. References saveProperties(). Here is the call graph for this function: ![]() |
|
||||||||||||||||
|
A new input device is created.
Definition at line 232 of file mainwindow.cpp. References global_debug, global_demo_mode, InputDevice::TypeAiInput, and InputDevice::TypeMouseInput. Referenced by menuNewLSkatGame(), and setInputType(). |
|
|
A game over signal arrived.
Definition at line 314 of file mainwindow.cpp. References ACTION, global_demo_mode, and menuNewLSkatGame(). Referenced by menuNewLSkatGame(). |
|
|
Initialize all GUI elements.
Definition at line 337 of file mainwindow.cpp. References ACTION, global_demo_mode, menuCardDeck(), menuClearStatistics(), menuEndGame(), menuNewLSkatGame(), menuPlayer1By(), menuPlayer2By(), menuPlayerNames(), and menuStartplayer(). Referenced by Mainwindow(). |
|
|
A card deck is chosen from the menu.
Definition at line 449 of file mainwindow.cpp. References global_debug. Referenced by initGUI(). |
|
|
The all time statistics is cleared from the menu.
Definition at line 480 of file mainwindow.cpp. References Player::clear(), and ConfigTwo::playerIterator(). Referenced by initGUI(). |
|
|
A game is stopped in the menu.
Definition at line 503 of file mainwindow.cpp. References AbstractEngine::stopGame(). Referenced by initGUI(). |
|
|
A new game is started from the menu.
Definition at line 514 of file mainwindow.cpp. References AbstractEngine::addPlayer(), ADVANCE_PERDIOD, createInput(), gameOver(), ConfigTwo::inputType(), LSkat, nextPlayer(), ConfigTwo::player(), Player::setInput(), startGame(), and AbstractEngine::stopGame(). Referenced by gameOver(), initGUI(), and Mainwindow(). |
|
|
Definition at line 433 of file mainwindow.cpp. References ACTION, and ConfigTwo::setInputType(). Referenced by initGUI(). |
|
|
Definition at line 441 of file mainwindow.cpp. References ACTION, and ConfigTwo::setInputType(). Referenced by initGUI(). |
|
|
The player names shall be changed.
Definition at line 562 of file mainwindow.cpp. References ConfigTwo::player(), and NameDialogWidget::setName(). Referenced by initGUI(). |
|
|
The start player is changed in the menu.
Definition at line 425 of file mainwindow.cpp. References ACTION, and setStartPlayer(). Referenced by initGUI(). |
|
|
Next players turn.
Definition at line 328 of file mainwindow.cpp. References Player::id(), and Player::name(). Referenced by menuNewLSkatGame(). |
|
|
Called by KMainWindow when the last window of the application is going to be closed.
Definition at line 167 of file mainwindow.cpp. References saveProperties(), and AbstractEngine::stopGame(). Here is the call graph for this function: ![]() |
|
|
Reads the session config file and restores the application's state.
Definition at line 196 of file mainwindow.cpp. References global_debug, ConfigTwo::load(), and setStartPlayer(). Referenced by Mainwindow(). Here is the call graph for this function: ![]() |
|
|
Saves the window properties.
Definition at line 179 of file mainwindow.cpp. References ConfigTwo::save(). Referenced by queryExit(), and ~Mainwindow(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Set the input type for a given player number.
Definition at line 593 of file mainwindow.cpp. References ACTION, createInput(), AbstractEngine::isGameRunning(), ConfigTwo::player(), and Player::setInput(). Referenced by Mainwindow(). |
|
|
Set-up the start player.
Definition at line 585 of file mainwindow.cpp. References ACTION. Referenced by menuStartplayer(), and readProperties(). |
|
|
Start a new game.
Definition at line 276 of file mainwindow.cpp. References ACTION, Player::deal(), ConfigTwo::playerIterator(), Deck::randomTrump(), Player::setDeck(), Player::setTrump(), and Deck::shuffle(). Referenced by menuNewLSkatGame(). Here is the call graph for this function: ![]() |
1.4.6