gamecreateparams.h
1 //------------------------------------------------------------------------------
2 // gamecreateparams.h
3 //------------------------------------------------------------------------------
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library 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 GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; 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 idF7CFB784_3591_4B2C_B5529AE7FBCC2568
24 #define idF7CFB784_3591_4B2C_B5529AE7FBCC2568
25 
26 #include "dptr.h"
27 #include "global.h"
28 #include <QList>
29 #include <QString>
30 #include <QStringList>
31 
32 class DMFlagsSection;
33 class GameCVar;
34 class GameDemo;
35 class GameMode;
36 class PWad;
37 
45 class MAIN_EXPORT GameCreateParams
46 {
47 public:
48  enum HostMode
49  {
50  Host,
51  Offline,
52  Demo,
53  Remote
54  };
55 
58 
62  const QString &connectPassword() const;
63  void setConnectPassword(const QString &pass);
64 
65  QStringList &customParameters();
66  const QStringList &customParameters() const;
67  void setCustomParameters(const QStringList &customParameters);
68 
73  QList<GameCVar> &cvars();
74  const QList<GameCVar> &cvars() const;
75  void setCvars(const QList<GameCVar> &cvars);
76 
94  const QString &demoPath() const;
95  void setDemoPath(const QString &demoPath);
96 
103  const GameDemo &demoRecord() const;
104  void setDemoRecord(const GameDemo &demo);
105 
106 
107  QList<DMFlagsSection> &dmFlags();
108  const QList<DMFlagsSection> &dmFlags() const;
109 
110  const QString &email() const;
111  void setEmail(const QString &email);
112 
116  const QString &executablePath() const;
117  void setExecutablePath(const QString &executablePath);
118 
119  const GameMode &gameMode() const;
120  void setGameMode(const GameMode &mode);
121 
122  HostMode hostMode() const;
123  void setHostMode(HostMode mode);
124 
125  bool isBroadcastToLan() const;
126  void setBroadcastToLan(bool b);
127 
128  bool isBroadcastToMaster() const;
129  void setBroadcastToMaster(bool b);
130 
131  bool isRandomMapRotation() const;
132  void setRandomMapRotation(bool b);
133 
137  const QString &ingamePassword() const;
138  void setIngamePassword(const QString &pass);
139 
140  const QString &iwadPath() const;
141  void setIwadPath(const QString &iwadPath);
142 
146  QString iwadName() const;
147 
151  const QString &loggingPath() const;
152  void setLoggingPath(const QString &iwadPath);
156  const QString &map() const;
157  void setMap(const QString &map);
158 
162  const QStringList &mapList() const;
163  void setMapList(const QStringList &mapList);
164 
165  int maxClients() const;
166  void setMaxClients(int num);
167 
168  int maxPlayers() const;
169  void setMaxPlayers(int num);
170 
175  int maxTotalClientSlots() const;
179  const QString &motd() const;
180  void setMotd(const QString &motd);
181 
182  const QString &name() const;
183  void setName(const QString &name);
184 
196  QVariant option(const QString &name) const;
197  void setOption(const QString &name, const QVariant &value);
198 
199  unsigned short port() const;
200  void setPort(unsigned short port);
201 
202  QList<bool> &pwadsOptional();
203  const QList<bool> &pwadsOptional() const;
204  void setPwadsOptional(const QList<bool> &pwadsOptional);
205 
206  QStringList &pwadsPaths();
207  const QStringList &pwadsPaths() const;
208  void setPwadsPaths(const QStringList &pwadsPaths);
209 
213  QList<PWad> pwads() const;
214 
218  QStringList pwadsNames() const;
219 
223  const QString &rconPassword() const;
224  void setRconPassword(const QString &pass);
225 
229  int skill() const;
230  void setSkill(int skill);
231 
235  const QString &url() const;
236  void setUrl(const QString &url);
237 
241  bool upnp() const;
242  void setUpnp(bool upnp);
243 
250  quint16 upnpPort() const;
251  void setUpnpPort(quint16 port);
252 
253 private:
255 };
256 
257 
258 
259 #endif // header