author | Wuzzy <Wuzzy2@mail.ru> |
Tue, 07 May 2019 18:45:14 +0200 | |
changeset 14899 | 4d5df8d35a95 |
parent 13265 | 8a5feb0edce5 |
permissions | -rw-r--r-- |
164 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
4976 | 3 |
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com> |
11046 | 4 |
* Copyright (c) 2004-2015 Andrey Korotaev <unC0Rr@gmail.com> |
164 | 5 |
* |
184 | 6 |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
|
8 |
* the Free Software Foundation; version 2 of the License |
|
164 | 9 |
* |
184 | 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. |
|
164 | 14 |
* |
184 | 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 |
|
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:
9998
diff
changeset
|
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
164 | 18 |
*/ |
19 |
||
20 |
#ifndef _HWMAP_CONTAINER_INCLUDED |
|
21 |
#define _HWMAP_CONTAINER_INCLUDED |
|
22 |
||
10462
dd3cf0c91cc9
A slider for controlling things like bumpiness of map and tunnel sizes.
nemo
parents:
10161
diff
changeset
|
23 |
#include <QByteArray> |
249 | 24 |
#include <QComboBox> |
10462
dd3cf0c91cc9
A slider for controlling things like bumpiness of map and tunnel sizes.
nemo
parents:
10161
diff
changeset
|
25 |
#include <QGridLayout> |
1802 | 26 |
#include <QLabel> |
13251
edb2f654f8f6
Shorten and wrap map name properly when viewing room as non-master
Wuzzy <Wuzzy2@mail.ru>
parents:
13249
diff
changeset
|
27 |
#include <QTextEdit> |
4519 | 28 |
#include <QLineEdit> |
10462
dd3cf0c91cc9
A slider for controlling things like bumpiness of map and tunnel sizes.
nemo
parents:
10161
diff
changeset
|
29 |
#include <QSlider> |
dd3cf0c91cc9
A slider for controlling things like bumpiness of map and tunnel sizes.
nemo
parents:
10161
diff
changeset
|
30 |
#include <QVBoxLayout> |
dd3cf0c91cc9
A slider for controlling things like bumpiness of map and tunnel sizes.
nemo
parents:
10161
diff
changeset
|
31 |
#include <QWidget> |
164 | 32 |
|
6933
78d194a30520
mapContainer: use DataManager, reload maps after data update (e.g. by DLC)
sheepluva
parents:
6700
diff
changeset
|
33 |
#include "DataManager.h" |
78d194a30520
mapContainer: use DataManager, reload maps after data update (e.g. by DLC)
sheepluva
parents:
6700
diff
changeset
|
34 |
|
1210 | 35 |
#include "hwmap.h" |
4520
e7882bd1a894
Allow to draw maps in frontend and play them (only locally, some bugs to fix)
unc0rr
parents:
4519
diff
changeset
|
36 |
#include "drawmapscene.h" |
7258 | 37 |
#include "MapModel.h" |
1210 | 38 |
|
164 | 39 |
class QPushButton; |
1209 | 40 |
class IconedGroupBox; |
5289
9d18b61bd3eb
- Implement ThemesModel (load theme icons once, store in memory, don't reload from disk every time selection changes)
unc0rr
parents:
4976
diff
changeset
|
41 |
class QListView; |
6938
217ed62e872c
MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents:
6937
diff
changeset
|
42 |
class SeparatorPainter; |
8377 | 43 |
class QListWidget; |
164 | 44 |
|
249 | 45 |
class MapFileErrorException |
46 |
{ |
|
47 |
}; |
|
48 |
||
164 | 49 |
class HWMapContainer : public QWidget |
50 |
{ |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
51 |
Q_OBJECT |
320 | 52 |
|
8377 | 53 |
Q_PROPERTY(bool master READ isMaster WRITE setMaster) |
54 |
||
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
55 |
public: |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
56 |
HWMapContainer(QWidget * parent=0); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
57 |
QString getCurrentSeed() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
58 |
QString getCurrentMap() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
59 |
QString getCurrentTheme() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
60 |
int getCurrentHHLimit() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
61 |
QString getCurrentScheme() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
62 |
QString getCurrentWeapons() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
63 |
quint32 getTemplateFilter() const; |
10472
8d04cebedb16
Partially hook up feature size so horrorcat has something to test.
nemo
parents:
10471
diff
changeset
|
64 |
quint32 getFeatureSize() const; |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
65 |
MapGenerator get_mapgen(void) const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
66 |
int getMazeSize(void) const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
67 |
bool getCurrentIsMission() const; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
68 |
QByteArray getDrawnMapData(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
69 |
DrawMapScene * getDrawMapScene(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
70 |
void mapDrawingFinished(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
71 |
QLineEdit* seedEdit; |
8377 | 72 |
bool isMaster(); |
164 | 73 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
74 |
public slots: |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
75 |
void askForGeneratedPreview(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
76 |
void setSeed(const QString & seed); |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10480
diff
changeset
|
77 |
void setScript(const QString & script, const QString & scriptparam); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
78 |
void setMap(const QString & map); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
79 |
void setTheme(const QString & theme); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
80 |
void setTemplateFilter(int); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
81 |
void setMapgen(MapGenerator m); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
82 |
void setMazeSize(int size); |
10480 | 83 |
void setFeatureSize(int size); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
84 |
void setDrawnMapData(const QByteArray & ar); |
10480 | 85 |
void setAllMapParameters(const QString & map, MapGenerator m, int mazesize, const QString & seed, int tmpl, int featureSize); |
6938
217ed62e872c
MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents:
6937
diff
changeset
|
86 |
void updateModelViews(); |
7008
25563f054ef3
fix a previewmap-related QObject::disconnect segfault
sheepluva
parents:
6960
diff
changeset
|
87 |
void onPreviewMapDestroyed(QObject * map); |
8377 | 88 |
void setMaster(bool master); |
11757
6874644a2d00
in non-local games, don't include DLC-themes/maps/missions during random selection. thanks to unC0Rr for helping me realize that I was stupid in a different way than I thought :P
sheepluva
parents:
11046
diff
changeset
|
89 |
void setRandomWithoutDLC(bool withoutDLC); |
164 | 90 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
91 |
signals: |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
92 |
void seedChanged(const QString & seed); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
93 |
void mapChanged(const QString & map); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
94 |
void themeChanged(const QString & theme); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
95 |
void newTemplateFilter(int filter); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
96 |
void mapgenChanged(MapGenerator m); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
97 |
void mazeSizeChanged(int s); |
10480 | 98 |
void mapFeatureSizeChanged(int s); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
99 |
void drawMapRequested(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
100 |
void drawnMapChanged(const QByteArray & data); |
325 | 101 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
102 |
private slots: |
13260
2c0779260e8a
Partially fix wrong preview when joining host room with missing map
Wuzzy <Wuzzy2@mail.ru>
parents:
13254
diff
changeset
|
103 |
void onImageReceived(const QPixmap & newImage); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
104 |
void setHHLimit(int hhLimit); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
105 |
void setRandomSeed(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
106 |
void setRandomTheme(); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
107 |
void setRandomMap(); |
8377 | 108 |
void setNewSeed(const QString & newSeed); |
109 |
void mapTypeChanged(int); |
|
110 |
void showThemePrompt(); |
|
111 |
void updateTheme(const QModelIndex & current); |
|
112 |
void staticMapChanged(const QModelIndex & map, const QModelIndex & old = QModelIndex()); |
|
113 |
void missionMapChanged(const QModelIndex & map, const QModelIndex & old = QModelIndex()); |
|
114 |
void loadDrawing(); |
|
115 |
void showSeedPrompt(); |
|
8467 | 116 |
void previewClicked(); |
164 | 117 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
118 |
protected: |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
119 |
virtual void resizeEvent ( QResizeEvent * event ); |
9739
c2c9dd2544b8
make lazy loading of map preview a little bit less of a hack
sheepluva
parents:
9735
diff
changeset
|
120 |
virtual void showEvent ( QShowEvent * event ); |
164 | 121 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
122 |
private: |
8377 | 123 |
QVBoxLayout mainLayout; |
8467 | 124 |
QPushButton* mapPreview; |
10462
dd3cf0c91cc9
A slider for controlling things like bumpiness of map and tunnel sizes.
nemo
parents:
10161
diff
changeset
|
125 |
QSlider* mapFeatureSize; |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
126 |
QComboBox* chooseMap; |
8377 | 127 |
MapModel * m_staticMapModel; |
128 |
MapModel * m_missionMapModel; |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
129 |
IconedGroupBox* gbThemes; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
130 |
QListView* lvThemes; |
6937
7f77fa908a4e
messing with the theme model a bit (gets now auto-updated after DLC download too)
sheepluva
parents:
6933
diff
changeset
|
131 |
ThemeModel * m_themeModel; |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
132 |
HWMap* pMap; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
133 |
QString m_seed; |
10150
fa5c83fd0ad9
Allow lua drawn maps (shoppamap, tunnels, diagonal maze etc) to generate previews.
nemo
parents:
10108
diff
changeset
|
134 |
QString m_script; |
10959
1225f42f61e2
Pass ScriptParams to preview to support techracer. Proof of concept for techracer, generate a preview for m=4
nemo
parents:
10480
diff
changeset
|
135 |
QString m_scriptparam; |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
136 |
QPushButton* seedSet; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
137 |
QLabel* seedLabel; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
138 |
int hhLimit; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
139 |
int templateFilter; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
140 |
QPixmap hhSmall; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
141 |
QLabel* lblFilter; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
142 |
QComboBox* cbTemplateFilter; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
143 |
QLabel *maze_size_label; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
144 |
QComboBox *cbMazeSize; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
145 |
MapGenerator mapgen; |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
146 |
DrawMapScene drawMapScene; |
8377 | 147 |
QComboBox * cType; |
148 |
QListView * staticMapList; |
|
149 |
QListView * missionMapList; |
|
13251
edb2f654f8f6
Shorten and wrap map name properly when viewing room as non-master
Wuzzy <Wuzzy2@mail.ru>
parents:
13249
diff
changeset
|
150 |
QTextEdit * teMapName; |
8377 | 151 |
QListWidget * generationStyles; |
152 |
QListWidget * mazeStyles; |
|
153 |
QLabel * lblMapList; |
|
154 |
QLabel * lblDesc; |
|
155 |
QPushButton * btnTheme; |
|
156 |
QPushButton * btnLoadMap; |
|
157 |
QPushButton * btnEditMap; |
|
158 |
QPushButton * btnRandomize; |
|
11785 | 159 |
QPushButton * btnRandTheme; |
8377 | 160 |
QString selectedTheme; |
161 |
QPushButton * btnSeed; |
|
13246
0c98d3b249f7
Online room: Display error image in preview when host selects a map you don't have
Wuzzy <Wuzzy2@mail.ru>
parents:
11809
diff
changeset
|
162 |
QHBoxLayout * twoColumnLayout; |
8377 | 163 |
bool m_master; |
164 |
QList<QWidget *> m_childWidgets; |
|
9739
c2c9dd2544b8
make lazy loading of map preview a little bit less of a hack
sheepluva
parents:
9735
diff
changeset
|
165 |
bool m_previewEnabled; |
9744 | 166 |
bool m_missionsViewSetup; |
167 |
bool m_staticViewSetup; |
|
11757
6874644a2d00
in non-local games, don't include DLC-themes/maps/missions during random selection. thanks to unC0Rr for helping me realize that I was stupid in a different way than I thought :P
sheepluva
parents:
11046
diff
changeset
|
168 |
bool m_withoutDLC; |
13246
0c98d3b249f7
Online room: Display error image in preview when host selects a map you don't have
Wuzzy <Wuzzy2@mail.ru>
parents:
11809
diff
changeset
|
169 |
bool m_missingMap; |
331 | 170 |
|
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
171 |
void intSetSeed(const QString & seed); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
172 |
void intSetMap(const QString & map); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
173 |
void intSetMapgen(MapGenerator m); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
174 |
void intSetTemplateFilter(int); |
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
175 |
void intSetMazeSize(int size); |
10480 | 176 |
void intSetFeatureSize(int size); |
13249
d2b58cf339fe
Show error icon when selected theme is missing
Wuzzy <Wuzzy2@mail.ru>
parents:
13246
diff
changeset
|
177 |
void setMissingTheme(const QString & name); |
8377 | 178 |
void mapChanged(const QModelIndex & map, int type, const QModelIndex & old = QModelIndex()); |
13260
2c0779260e8a
Partially fix wrong preview when joining host room with missing map
Wuzzy <Wuzzy2@mail.ru>
parents:
13254
diff
changeset
|
179 |
void setImage(const QPixmap & newImage); |
13254
1381ce67a781
Tweak map preview background colors
Wuzzy <Wuzzy2@mail.ru>
parents:
13253
diff
changeset
|
180 |
void setImage(const QPixmap & newImage, const QLinearGradient & linearGrad, bool showHHLimit); |
1381ce67a781
Tweak map preview background colors
Wuzzy <Wuzzy2@mail.ru>
parents:
13253
diff
changeset
|
181 |
void addInfoToPreview(const QPixmap & image); |
1381ce67a781
Tweak map preview background colors
Wuzzy <Wuzzy2@mail.ru>
parents:
13253
diff
changeset
|
182 |
void addInfoToPreview(const QPixmap & image, const QLinearGradient & linearGrad, bool drawHHLimit); |
8377 | 183 |
void setMapInfo(MapModel::MapInfo mapInfo); |
184 |
void changeMapType(MapModel::MapType type, const QModelIndex & newMap = QModelIndex()); |
|
11809
f412d539284e
Add various “What's This?” texts to multiplayer, net and team editor frontend pages
Wuzzy <almikes@aol.com>
parents:
11785
diff
changeset
|
185 |
void updateHelpTexts(MapModel::MapType type); |
6616
f77bb02b669f
astyle -C -S -L -N --style=allman --recursive "QTfrontend/*.cpp" "QTfrontend/*.h"
nemo
parents:
6157
diff
changeset
|
186 |
void updatePreview(); |
8393
85bd6c7b2641
Can now change theme for static and mission maps.
dag10 <gottlieb.drew@gmail.com>
parents:
8377
diff
changeset
|
187 |
void updateThemeButtonSize(); |
13261
01ac67500f50
Fix initial map preview being broken when joining room, part 2
Wuzzy <Wuzzy2@mail.ru>
parents:
13260
diff
changeset
|
188 |
void setupMissionMapsView(const QString & initialMap = QString()); |
01ac67500f50
Fix initial map preview being broken when joining room, part 2
Wuzzy <Wuzzy2@mail.ru>
parents:
13260
diff
changeset
|
189 |
void setupStaticMapsView(const QString & initialMap = QString()); |
13265
8a5feb0edce5
QTfrontent: Print map and style name in red, if missing. And update map label after delegation
Wuzzy <Wuzzy2@mail.ru>
parents:
13261
diff
changeset
|
190 |
void setMapNameLabel(QString mapName, bool validMap); |
6938
217ed62e872c
MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents:
6937
diff
changeset
|
191 |
|
217ed62e872c
MapModel, various cleanups. TODO/FIXME: QComboBox separator not working with custom models
sheepluva
parents:
6937
diff
changeset
|
192 |
MapModel::MapInfo m_mapInfo; |
8475
f605bc59c603
Initial theme selection is now random. Theme prompt now has a search input and no longer uses FlowLayout. (Resolves issue 520)
dag10
parents:
8467
diff
changeset
|
193 |
int m_themeID; |
10472
8d04cebedb16
Partially hook up feature size so horrorcat has something to test.
nemo
parents:
10471
diff
changeset
|
194 |
int m_prevMapFeatureSize; |
8d04cebedb16
Partially hook up feature size so horrorcat has something to test.
nemo
parents:
10471
diff
changeset
|
195 |
int m_mapFeatureSize; |
6940
211aca8c1f4f
decouple current theme from map theme (fixes theme confusion bugs of last commit)
sheepluva
parents:
6938
diff
changeset
|
196 |
QString m_theme; |
6960
822f8269e13f
map, theme & style selection won't be lost on data updata now (except the selected map/theme/style is deleted ofc). enabling F5 key to reload data :>
sheepluva
parents:
6952
diff
changeset
|
197 |
QString m_curMap; |
7017
19a434fc91fc
visually indicate when map preview generation is in progress.
sheepluva
parents:
7008
diff
changeset
|
198 |
|
13254
1381ce67a781
Tweak map preview background colors
Wuzzy <Wuzzy2@mail.ru>
parents:
13253
diff
changeset
|
199 |
QLinearGradient linearGradNormal; ///< for preview background |
1381ce67a781
Tweak map preview background colors
Wuzzy <Wuzzy2@mail.ru>
parents:
13253
diff
changeset
|
200 |
QLinearGradient linearGradLoading; ///< for preview background while loading/generating map |
1381ce67a781
Tweak map preview background colors
Wuzzy <Wuzzy2@mail.ru>
parents:
13253
diff
changeset
|
201 |
QLinearGradient linearGradNoPreview; ///< for preview background when map preview image is missing |
1381ce67a781
Tweak map preview background colors
Wuzzy <Wuzzy2@mail.ru>
parents:
13253
diff
changeset
|
202 |
QLinearGradient linearGradMapError; ///< for preview background when map is missing |
7017
19a434fc91fc
visually indicate when map preview generation is in progress.
sheepluva
parents:
7008
diff
changeset
|
203 |
QSize m_previewSize; |
164 | 204 |
}; |
205 |
||
206 |
#endif // _HWMAP_CONTAINER_INCLUDED |