gamerulespanel.h
1 //------------------------------------------------------------------------------
2 // gamerulespanel.h
3 //------------------------------------------------------------------------------
4 //
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 // 02110-1301, USA.
19 //
20 //------------------------------------------------------------------------------
21 // Copyright (C) 2014 "Zalewa" <zalewapl@gmail.com>
22 //------------------------------------------------------------------------------
23 #ifndef id880d5e15_1a53_40da_bdb9_11d9b4dc3222
24 #define id880d5e15_1a53_40da_bdb9_11d9b4dc3222
25 
26 #include "dptr.h"
27 
28 #include <QWidget>
29 
30 class EnginePlugin;
31 class GameCreateParams;
32 class GameMode;
33 class Ini;
34 
35 class GameRulesPanel : public QWidget
36 {
37 Q_OBJECT
38 
39 public:
40  GameRulesPanel(QWidget *parent);
41  ~GameRulesPanel();
42 
43  void fillInParams(GameCreateParams &params);
44  void loadConfig(Ini &config);
45  void saveConfig(Ini &config);
46  void setupForEngine(const EnginePlugin *engine, const GameMode &gameMode);
47  void setupForRemoteGame();
48 
49 private:
51 
52  void fillInLimits(GameCreateParams &params);
53  void fillInModifiers(GameCreateParams &params);
54  void removeLimitWidgets();
55  void setupDifficulty();
56  void setupLimitWidgets(const EnginePlugin *engine, const GameMode &gameMode);
57  void setupModifiers(const EnginePlugin *engine);
58 };
59 
60 #endif
Game parametrization data used when creating new games.
Game mode representation.
Configuration handler.
Definition: ini.h:69