author | alfadur |
Thu, 25 Jul 2019 00:05:30 +0300 | |
changeset 15268 | 24828281c9c5 |
parent 14966 | 575dbd7b5f43 |
child 15288 | c4fd2813b127 |
child 15304 | 3bf780084c86 |
permissions | -rw-r--r-- |
184 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
11046 | 3 |
* Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com> |
184 | 4 |
* |
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
10108
c68cf030eded
update FSF address. note: two sdl include files (by Sam Lantinga) still have the old FSF address in their copyright - but I ain't gonna touch their copyright headers
sheepluva
parents:
10015
diff
changeset
|
16 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
184 | 17 |
*/ |
18 |
||
19 |
#ifndef GAMECONFIG_H |
|
20 |
#define GAMECONFIG_H |
|
21 |
||
301 | 22 |
#include <QSettings> |
184 | 23 |
#include <QStringList> |
555 | 24 |
#include <QRect> |
5260
f50f620771ee
When the password field is filled with null characters and when the user tries to edit the field, clear it.
Zorg <zorgiepoo@gmail.com>
parents:
5229
diff
changeset
|
25 |
#include <QEvent> |
8346 | 26 |
#include <QList> |
8354
c25bee85d6f8
Separated fullscreen and windowed hwengine resolution parameters.
vitiv <nikita.utiu@gmail.com>
parents:
8346
diff
changeset
|
27 |
#include <utility> |
8346 | 28 |
#include "binds.h" |
184 | 29 |
|
30 |
class HWForm; |
|
301 | 31 |
class QSettings; |
184 | 32 |
|
301 | 33 |
class GameUIConfig : public QSettings |
184 | 34 |
{ |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
35 |
Q_OBJECT |
184 | 36 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
37 |
public: |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
38 |
HWForm * Form; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
39 |
GameUIConfig(HWForm * FormWidgets, const QString & fileName); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
40 |
QStringList GetTeamsList(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
41 |
QRect vid_Resolution(); |
8354
c25bee85d6f8
Separated fullscreen and windowed hwengine resolution parameters.
vitiv <nikita.utiu@gmail.com>
parents:
8346
diff
changeset
|
42 |
std::pair<QRect, QRect> vid_ResolutionPair(); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
43 |
bool vid_Fullscreen(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
44 |
quint32 translateQuality(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
45 |
bool isSoundEnabled(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
46 |
bool isFrontendSoundEnabled(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
47 |
QString language(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
48 |
bool isMusicEnabled(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
49 |
bool isFrontendMusicEnabled(); |
13633
d5e029b84e16
Add setting to disable audio dampening if losing window focus
Wuzzy <Wuzzy2@mail.ru>
parents:
11046
diff
changeset
|
50 |
bool isAudioDampenEnabled(); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
51 |
bool isShowFPSEnabled(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
52 |
bool isAltDamageEnabled(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
53 |
bool appendDateTimeToRecordName(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
54 |
quint8 volume(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
55 |
quint8 timerInterval(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
56 |
QString netNick(); |
14745
7b2bd37d7503
Fix inconsistencies in guest nick name generation
Wuzzy <Wuzzy2@mail.ru>
parents:
14682
diff
changeset
|
57 |
QString getRandomNick(); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
58 |
QByteArray netPasswordHash(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
59 |
int netPasswordLength(); |
8294
0e5782b0dd54
Removed whitespaces, refactored hash setting getting and clearing
Ondrej Skopek <skopekondrej@gmail.com>
parents:
8179
diff
changeset
|
60 |
void clearPasswordHash(); |
0e5782b0dd54
Removed whitespaces, refactored hash setting getting and clearing
Ondrej Skopek <skopekondrej@gmail.com>
parents:
8179
diff
changeset
|
61 |
void setPasswordHash(const QString & passwordhash); |
0e5782b0dd54
Removed whitespaces, refactored hash setting getting and clearing
Ondrej Skopek <skopekondrej@gmail.com>
parents:
8179
diff
changeset
|
62 |
QString passwordHash(); |
0e5782b0dd54
Removed whitespaces, refactored hash setting getting and clearing
Ondrej Skopek <skopekondrej@gmail.com>
parents:
8179
diff
changeset
|
63 |
void clearTempHash(); |
0e5782b0dd54
Removed whitespaces, refactored hash setting getting and clearing
Ondrej Skopek <skopekondrej@gmail.com>
parents:
8179
diff
changeset
|
64 |
void setTempHash(const QString & temphash); |
0e5782b0dd54
Removed whitespaces, refactored hash setting getting and clearing
Ondrej Skopek <skopekondrej@gmail.com>
parents:
8179
diff
changeset
|
65 |
QString tempHash(); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
66 |
void setNetPasswordLength(int passwordLength); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
67 |
bool isReducedQuality() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
68 |
bool isFrontendEffects() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
69 |
bool isFrontendFullscreen() const; |
14682
93429d8f6b3f
Add setting to set default/initial zoom
Wuzzy <Wuzzy2@mail.ru>
parents:
14675
diff
changeset
|
70 |
quint16 zoom(); |
14675
56831f466d1d
Add settings.ini setting and hwengine param to disable holiday silliness (hat changes, etc.)
Wuzzy <Wuzzy2@mail.ru>
parents:
13633
diff
changeset
|
71 |
bool isHolidaySillinessEnabled() const; |
14966
575dbd7b5f43
Quick games: Cap max. difficulty for the first 15 games
Wuzzy <Wuzzy2@mail.ru>
parents:
14745
diff
changeset
|
72 |
int quickGameExperience() const; |
575dbd7b5f43
Quick games: Cap max. difficulty for the first 15 games
Wuzzy <Wuzzy2@mail.ru>
parents:
14745
diff
changeset
|
73 |
void setQuickGameExperience(int exp); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
74 |
void resizeToConfigValues(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
75 |
quint32 stereoMode() const; |
8179
a1ffcb559f99
Refactor: get rid of excessive QSettings instances on the same poor hedgewars.ini file
unc0rr
parents:
7633
diff
changeset
|
76 |
void setValue(const QString & key, const QVariant & value); |
8346 | 77 |
QString bind(int bindID); |
78 |
void setBind(int bindID, QString & strbind); |
|
2377 | 79 |
|
7235
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
80 |
QString AVFormat(); |
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
81 |
QString videoCodec(); |
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
82 |
QString audioCodec(); |
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
83 |
QRect rec_Resolution(); |
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
84 |
int rec_Framerate(); |
7633
d4251e519062
Allow adjusting bitrate so that I can get a somewhat usable webm video. The audio is still tinny and unlistenable. Configuration option for that might be helpful, or just adjusting defaults in the wrapper.
nemo
parents:
7235
diff
changeset
|
85 |
int rec_Bitrate(); |
7235
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
86 |
bool recordAudio(); |
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
87 |
|
2401 | 88 |
#ifdef __APPLE__ |
89 |
#ifdef SPARKLE_ENABLED |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
90 |
bool isAutoUpdateEnabled(); |
2401 | 91 |
#endif |
2261 | 92 |
#endif |
7235
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
93 |
void reloadValues(); |
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
94 |
void reloadVideosValues(); |
2377 | 95 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
96 |
signals: |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
97 |
void frontendFullscreen(bool value); |
184 | 98 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
99 |
public slots: |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
100 |
void SaveOptions(); |
7235
baa69bd025d9
1. Implement new page in frontend with options for video recording.
Stepan777 <stepik-777@mail.ru>
parents:
6952
diff
changeset
|
101 |
void SaveVideosOptions(); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
102 |
void updNetNick(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
103 |
private: |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
104 |
bool netPasswordIsValid(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
5390
diff
changeset
|
105 |
bool eventFilter(QObject *object, QEvent *event); |
8434 | 106 |
QString temphash; |
8346 | 107 |
QList<BindAction> m_binds; |
9547 | 108 |
|
109 |
void applyProxySettings(); |
|
14745
7b2bd37d7503
Fix inconsistencies in guest nick name generation
Wuzzy <Wuzzy2@mail.ru>
parents:
14682
diff
changeset
|
110 |
|
7b2bd37d7503
Fix inconsistencies in guest nick name generation
Wuzzy <Wuzzy2@mail.ru>
parents:
14682
diff
changeset
|
111 |
QString cachedRandomNick; |
184 | 112 |
}; |
113 |
||
114 |
#endif |