~keith-penguin/kdegames/trunk

« back to all changes in this revision

Viewing changes to ksirk/ksirk/Dialogs/newGameDialogImpl.h

  • Committer: Keith Worrell
  • Date: 2009-03-18 05:35:28 UTC
  • Revision ID: keith.worrell@gmail.com-20090318053528-mx6x9c0ngmg0kg6p
imported project

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          newGameDialogImpl.h  -  description
 
3
                             -------------------
 
4
    begin                : Wed Feb 23 2005
 
5
    copyright            : (C) 2005 by Gael de Chalendar
 
6
    email                : kleag@free.fr
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 *   You should have received a copy of the GNU General Public License
 
17
 *   along with this program; if not, write to the Free Software
 
18
 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
19
 *   02110-1301, USA
 
20
 ***************************************************************************/
 
21
#define KDE_NO_COMPAT
 
22
 
 
23
 
 
24
#include "ui_newGameDialog.h"
 
25
 
 
26
#include <qmap.h>
 
27
 
 
28
#ifndef KSIRK_NEWGAMEDIALOGIMPL_H
 
29
#define KSIRK_NEWGAMEDIALOGIMPL_H
 
30
 
 
31
namespace Ksirk 
 
32
{
 
33
namespace GameLogic
 
34
{
 
35
    class ONU;
 
36
    class GameAutomaton;
 
37
}
 
38
 
 
39
/**
 
40
  * This is the implementation of the new game configuration dialog made with
 
41
  * QT Designer
 
42
  * @author Gaël de Chalendar
 
43
  */
 
44
class NewGameDialogImpl : public QDialog, public Ui::NewGameDialog
 
45
{
 
46
  Q_OBJECT
 
47
public:
 
48
  NewGameDialogImpl(QWidget *parent=0);
 
49
 
 
50
  void init(GameLogic::GameAutomaton* automaton,
 
51
             const QString& skin,
 
52
             bool networkGame);
 
53
 
 
54
  virtual ~NewGameDialogImpl();
 
55
 
 
56
public Q_SLOTS:
 
57
    virtual void slotOK();
 
58
    virtual void slotCancel();
 
59
    virtual void slotHelp();
 
60
    void slotSkinChanged(int skinNum);
 
61
    void slotGHNS();
 
62
 
 
63
Q_SIGNALS:
 
64
  void newGameOK(unsigned int nbPlayers, const QString& skin, unsigned int nbNetworkPlayers, bool useGoals);
 
65
  void newGameKO();
 
66
 
 
67
private:
 
68
  /**
 
69
  * Fills the skins combo with skins dir names found in the Ksirk app data dir
 
70
  * @todo Use skins names instead of dir names
 
71
  */
 
72
  void fillSkinsCombo();
 
73
  
 
74
  GameLogic::GameAutomaton* m_automaton;
 
75
  QString m_skin;
 
76
  QMap<QString, GameLogic::ONU*> m_worlds;
 
77
 
 
78
};
 
79
 
 
80
} // closing namespace Ksirk
 
81
 
 
82
#endif // KSIRK_NEWGAMEDIALOGIMPL_H
 
83