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 
42 class MAIN_EXPORT GameCreateParams
43 {
44 public:
45  enum HostMode
46  {
47  Host,
48  Offline,
49  Demo,
50  Remote
51  };
52 
55 
59  const QString &connectPassword() const;
60  void setConnectPassword(const QString &pass);
61 
62  QStringList &customParameters();
63  const QStringList &customParameters() const;
64  void setCustomParameters(const QStringList &customParameters);
65 
70  QList<GameCVar> &cvars();
71  const QList<GameCVar> &cvars() const;
72  void setCvars(const QList<GameCVar> &cvars);
73 
91  const QString &demoPath() const;
92  void setDemoPath(const QString &demoPath);
93 
100  const GameDemo &demoRecord() const;
101  void setDemoRecord(const GameDemo &demo);
102 
103 
104  QList<DMFlagsSection> &dmFlags();
105  const QList<DMFlagsSection> &dmFlags() const;
106 
107  const QString &email() const;
108  void setEmail(const QString &email);
109 
113  const QString &executablePath() const;
114  void setExecutablePath(const QString &executablePath);
115 
116  const GameMode &gameMode() const;
117  void setGameMode(const GameMode &mode);
118 
119  HostMode hostMode() const;
120  void setHostMode(HostMode mode);
121 
122  bool isBroadcastToLan() const;
123  void setBroadcastToLan(bool b);
124 
125  bool isBroadcastToMaster() const;
126  void setBroadcastToMaster(bool b);
127 
128  bool isRandomMapRotation() const;
129  void setRandomMapRotation(bool b);
130 
134  const QString &ingamePassword() const;
135  void setIngamePassword(const QString &pass);
136 
137  const QString &iwadPath() const;
138  void setIwadPath(const QString &iwadPath);
139 
143  QString iwadName() const;
144 
148  const QString &loggingPath() const;
149  void setLoggingPath(const QString &iwadPath);
153  const QString &map() const;
154  void setMap(const QString &map);
155 
159  const QStringList &mapList() const;
160  void setMapList(const QStringList &mapList);
161 
162  int maxClients() const;
163  void setMaxClients(int num);
164 
165  int maxPlayers() const;
166  void setMaxPlayers(int num);
167 
172  int maxTotalClientSlots() const;
176  const QString &motd() const;
177  void setMotd(const QString &motd);
178 
179  const QString &name() const;
180  void setName(const QString &name);
181 
193  QVariant option(const QString &name) const;
194  void setOption(const QString &name, const QVariant &value);
195 
196  unsigned short port() const;
197  void setPort(unsigned short port);
198 
199  QList<bool> &pwadsOptional();
200  const QList<bool> &pwadsOptional() const;
201  void setPwadsOptional(const QList<bool> &pwadsOptional);
202 
203  QStringList &pwadsPaths();
204  const QStringList &pwadsPaths() const;
205  void setPwadsPaths(const QStringList &pwadsPaths);
206 
210  QList<PWad> pwads() const;
211 
215  QStringList pwadsNames() const;
216 
220  const QString &rconPassword() const;
221  void setRconPassword(const QString &pass);
222 
226  int skill() const;
227  void setSkill(int skill);
228 
232  const QString &url() const;
233  void setUrl(const QString &url);
234 
238  bool upnp() const;
239  void setUpnp(bool upnp);
240 
247  quint16 upnpPort() const;
248  void setUpnpPort(quint16 port);
249 
250 private:
252 };
253 
254 
255 
256 #endif // header