QTfrontend/gamecfgwidget.h
author Palewolf
Sat, 25 Dec 2010 20:47:29 +0100
changeset 4678 50716b795a4e
parent 4560 5d6c7f88db73
child 4936 d65d438acd23
permissions -rw-r--r--
Capture the flag (Blizzard) Map
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     1
/*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 703
diff changeset
     2
 * Hedgewars, a free turn based strategy game
3236
4ab3917d7d44 Update (c) lines to 2010 as unc0rr requested - they all had varying values so I just took the first year mentioned, then tacked on -2010
nemo
parents: 3133
diff changeset
     3
 * Copyright (c) 2006-2010 Andrey Korotaev <unC0Rr@gmail.com>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     4
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     8
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    12
 * GNU General Public License for more details.
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    13
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    14
 * You should have received a copy of the GNU General Public License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    15
 * along with this program; if not, write to the Free Software
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    17
 */
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    18
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    19
#ifndef GAMECONFIGWIDGET_H
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    20
#define GAMECONFIGWIDGET_H
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    21
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    22
#include <QWidget>
318
46a43b02bbb3 Game config commands are generated by GameCFGWidget
unc0rr
parents: 312
diff changeset
    23
#include <QStringList>
1217
d6d91eec00f2 Remake gamecfgwidget
unc0rr
parents: 1066
diff changeset
    24
#include <QGroupBox>
1783
169ebeefd7ab Custom spinbox for bonus boxes factor
unc0rr
parents: 1782
diff changeset
    25
#include <QSpinBox>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    26
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    27
#include "mapContainer.h"
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    28
311
b8905423f19f - Limit list of teams in game with 200 px
unc0rr
parents: 249
diff changeset
    29
class QCheckBox;
b8905423f19f - Limit list of teams in game with 200 px
unc0rr
parents: 249
diff changeset
    30
class QVBoxLayout;
b8905423f19f - Limit list of teams in game with 200 px
unc0rr
parents: 249
diff changeset
    31
class QLabel;
1887
d68939b3f7f0 - Share model between test table and widgets
unc0rr
parents: 1885
diff changeset
    32
class QTableView;
311
b8905423f19f - Limit list of teams in game with 200 px
unc0rr
parents: 249
diff changeset
    33
1217
d6d91eec00f2 Remake gamecfgwidget
unc0rr
parents: 1066
diff changeset
    34
class GameCFGWidget : public QGroupBox
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    35
{
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    36
    Q_OBJECT
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    37
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    38
public:
4560
5d6c7f88db73 - Some work on drawMap widget and scene to allow undo, clear, save and load operations
unc0rr
parents: 4525
diff changeset
    39
    GameCFGWidget(QWidget* parent);
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    40
    quint32 getGameFlags() const;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    41
    quint32 getInitHealth() const;
4494
9585435e20f7 Pass hardcoded drawn map from frontend into engine \o/
unc0rr
parents: 4416
diff changeset
    42
    QByteArray getFullConfig() const;
4513
1dd97c710f5a added general scripts to multiplayer and added option for scripts to allow user set schemes or weapon sets.
Henek
parents: 4511
diff changeset
    43
    QComboBox * Scripts;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    44
    QComboBox * GameSchemes;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    45
    QComboBox * WeaponsName;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    46
    HWMapContainer* pMapContainer;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    47
    QTableView * tv;
4406
beb4de0af990 Increase teams to 8 to match the 8 colours, fix issue #108, reenable rope length modifier
nemo
parents: 4337
diff changeset
    48
    QVariant schemeData(int column) const;
696
d6f32ed6edc8 working multiplayer weapons combo
displacer
parents: 486
diff changeset
    49
320
1ee7f087195a - HWMapContainer sets and stores the theme
unc0rr
parents: 318
diff changeset
    50
public slots:
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    51
    void setParam(const QString & param, const QStringList & value);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    52
    void fullNetConfig();
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    53
    void resendSchemeData();
325
17c860483407 New signals and slot for GameCFGWidget
unc0rr
parents: 320
diff changeset
    54
17c860483407 New signals and slot for GameCFGWidget
unc0rr
parents: 320
diff changeset
    55
signals:
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    56
    void paramChanged(const QString & param, const QStringList & value);
4410
f9e38ce1e813 a Henek-koda production: nicer game config screen, fixed scheme-weapon lock, added scheme editing to config page and some minor stuff
Henek
parents: 4406
diff changeset
    57
    void goToSchemes(int);
4416
29d2d1548387 adding a combobox to weapon editor as scheme editor, added a few notices for deleting and some buttons in this area.
Henek
parents: 4410
diff changeset
    58
    void goToWeapons(int);
4511
df827e70ae63 Pretension to switch to draw map page
unc0rr
parents: 4494
diff changeset
    59
    void goToDrawMap();
1531
f404233b6d9b - Less crossclass dependancies
unc0rr
parents: 1530
diff changeset
    60
f404233b6d9b - Less crossclass dependancies
unc0rr
parents: 1530
diff changeset
    61
private slots:
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    62
    void ammoChanged(int index);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    63
    void mapChanged(const QString &);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    64
    void templateFilterChanged(int);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    65
    void seedChanged(const QString &);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    66
    void themeChanged(const QString &);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    67
    void schemeChanged(int);
4513
1dd97c710f5a added general scripts to multiplayer and added option for scripts to allow user set schemes or weapon sets.
Henek
parents: 4511
diff changeset
    68
    void scriptChanged(int);
4410
f9e38ce1e813 a Henek-koda production: nicer game config screen, fixed scheme-weapon lock, added scheme editing to config page and some minor stuff
Henek
parents: 4406
diff changeset
    69
    void jumpToSchemes();
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    70
    void jumpToWeapons();
3133
1ab5f18f4df8 prg's maze generator
nemo
parents: 2948
diff changeset
    71
    void mapgenChanged(MapGenerator m);
1ab5f18f4df8 prg's maze generator
nemo
parents: 2948
diff changeset
    72
    void maze_sizeChanged(int s);
4525
0a81be113e21 Try to send drawn map data to net server
unc0rr
parents: 4513
diff changeset
    73
    void onDrawnMapChanged(const QByteArray & data);
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    74
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    75
private:
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    76
    QGridLayout mainLayout;
4337
85e02b1a8e8f merge 0.9.14.1 to trunk
nemo
parents: 4324
diff changeset
    77
    QCheckBox * bindEntries;
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    78
    QString curNetAmmoName;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    79
    QString curNetAmmo;
1873
815a3ff1fe4b Start refactoring some things. Frontend becomes temporarily unusable for network game
unc0rr
parents: 1802
diff changeset
    80
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2080
diff changeset
    81
    void setNetAmmo(const QString& name, const QString& ammo);
1890
de5cfe3beb22 Scheme options work now
unc0rr
parents: 1887
diff changeset
    82
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    83
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    84
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    85
#endif // GAMECONFIGWIDGET_H