File: ksquareswindow.h

package info (click to toggle)
ksquares 4%3A18.04.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,460 kB
  • sloc: cpp: 1,542; xml: 111; makefile: 5; sh: 3
file content (71 lines) | stat: -rw-r--r-- 2,102 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/***************************************************************************
 *   Copyright (C) 2006 by Matthew Williams    <matt@milliams.com>         *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/

#ifndef KSQUARESWINDOW_H
#define KSQUARESWINDOW_H

#include <KXmlGuiWindow>

#include "ksquaresgame.h"
#include "ui_prefs_ai.h"
#include "ui_prefs_display.h"

class GameBoardView;
class GameBoardScene;
class QLabel;
/**
 * @short Mainwindow class
 *
 * Sets actions, controls the creation of the game class and the GameBoardScene
 *
 * @author Matt Williams <matt@milliams.com>
 */

class KSquaresWindow : public KXmlGuiWindow
{
    Q_OBJECT

public:
    ///Constructor
    KSquaresWindow();
    ~KSquaresWindow();

public slots:
    void  showHighscores();
    //void  configureHighscores();
    ///Launch the new game dialog and create a new game
    void gameNew();
    ///Start a new game with the same settings (read from KConfig Settings)
    void gameReset();

private slots:
    void aiChooseLine(); // testing only
    void initObject();
    void optionsPreferences();
    void playerTakeTurn(KSquaresPlayer *currentPlayer);
    void gameOver(const QVector<KSquaresPlayer> &_playerList);  //when KSquaresGame says the game is over. Display score board

private:

    //void setupAccel();
    void setupActions();
    Ui::prefs_ai ui_prefs_ai;
    Ui::prefs_display ui_prefs_display;
    ///The game board view
    GameBoardView *m_view;
    ///The game scene
    GameBoardScene *m_scene;
    ///The game controller
    KSquaresGame *sGame;
    // Remember last network move
    int m_lastx1, m_lasty1, m_lastx2, m_lasty2;
    QLabel *m_player;
};

#endif // KSQUARESWINDOW_H