QTfrontend/hwform.h
author unc0rr
Thu, 05 Oct 2006 16:33:18 +0000
changeset 183 57c2ef19f719
parent 133 c79cb5e5b24a
child 184 f97a7a3dc8f6
permissions -rw-r--r--
Relicense to GPL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
     1
/*
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
     2
 * Hedgewars, a worms-like game
128
223522298250 Update file headers & delete unneeded files
unc0rr
parents: 87
diff changeset
     3
 * Copyright (c) 2005, 2006 Andrey Korotaev <unC0Rr@gmail.com>
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
     4
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
     8
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    12
 * GNU General Public License for more details.
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    13
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    14
 * You should have received a copy of the GNU General Public License
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    15
 * along with this program; if not, write to the Free Software
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    17
 */
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    18
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    19
#ifndef HWFORM_H
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    20
#define HWFORM_H
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    21
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    22
#include <QLabel>
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    23
#include <QLineEdit>
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    24
#include <QDir>
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents: 32
diff changeset
    25
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    26
#include "ui_hwform.h"
50
9ab4067dabec TeamSelect widget alpha added
displacer
parents: 32
diff changeset
    27
87
ff213e443336 Convert all pages to classes
unc0rr
parents: 85
diff changeset
    28
class HWGame;
ff213e443336 Convert all pages to classes
unc0rr
parents: 85
diff changeset
    29
class HWTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents: 85
diff changeset
    30
class HWNet;
85
44d9045b26ff New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents: 84
diff changeset
    31
class GameUIConfig;
84
0f6669da2fcb Start rewrite ui
unc0rr
parents: 60
diff changeset
    32
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    33
class HWForm : public QMainWindow
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    34
{
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    35
	Q_OBJECT
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    36
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    37
public:
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    38
	HWForm(QWidget *parent = 0);
87
ff213e443336 Convert all pages to classes
unc0rr
parents: 85
diff changeset
    39
	Ui_HWForm ui;
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    40
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    41
private slots:
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    42
	void GoToMain();
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    43
	void GoToSinglePlayer();
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    44
	void GoToSetup();
25
27aa8030322b - Get rid of old frontend
unc0rr
parents: 21
diff changeset
    45
	void GoToMultiplayer();
26
e32fa14529f8 Frontend lets define more binds
unc0rr
parents: 25
diff changeset
    46
	void GoToDemos();
28
59f7db859b8a - clear demos list before adding items
unc0rr
parents: 26
diff changeset
    47
	void GoToNet();
59f7db859b8a - clear demos list before adding items
unc0rr
parents: 26
diff changeset
    48
	void GoToNetChat();
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    49
	void NewTeam();
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    50
	void EditTeam();
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    51
	void TeamSave();
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    52
	void TeamDiscard();
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    53
	void SimpleGame();
26
e32fa14529f8 Frontend lets define more binds
unc0rr
parents: 25
diff changeset
    54
	void PlayDemo();
28
59f7db859b8a - clear demos list before adding items
unc0rr
parents: 26
diff changeset
    55
	void NetConnect();
59f7db859b8a - clear demos list before adding items
unc0rr
parents: 26
diff changeset
    56
	void NetDisconnect();
31
99888245a4e8 Now net game is near available, but exception occurs...
unc0rr
parents: 28
diff changeset
    57
	void NetJoin();
99888245a4e8 Now net game is near available, but exception occurs...
unc0rr
parents: 28
diff changeset
    58
	void NetCreate();
28
59f7db859b8a - clear demos list before adding items
unc0rr
parents: 26
diff changeset
    59
	void AddGame(const QString & chan);
31
99888245a4e8 Now net game is near available, but exception occurs...
unc0rr
parents: 28
diff changeset
    60
	void NetAddTeam();
99888245a4e8 Now net game is near available, but exception occurs...
unc0rr
parents: 28
diff changeset
    61
	void NetGameEnter();
99888245a4e8 Now net game is near available, but exception occurs...
unc0rr
parents: 28
diff changeset
    62
	void NetStartGame();
32
78bff13b11c0 With this patch the game doesn't crash when gaming by net
unc0rr
parents: 31
diff changeset
    63
	void ChangeInNetTeams(const QStringList & teams);
133
c79cb5e5b24a - Multiplayer game start button
unc0rr
parents: 128
diff changeset
    64
	void StartMPGame();
26
e32fa14529f8 Frontend lets define more binds
unc0rr
parents: 25
diff changeset
    65
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    66
private:
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    67
	HWGame * game;
21
dff476dcaaa3 - Many improvements to frontend
unc0rr
parents: 20
diff changeset
    68
	HWTeam * tmpTeam;
28
59f7db859b8a - clear demos list before adding items
unc0rr
parents: 26
diff changeset
    69
	HWNet * hwnet;
85
44d9045b26ff New GameCFGWidget. Now it's possible to set forts mode from ui
unc0rr
parents: 84
diff changeset
    70
	GameUIConfig * config;
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    71
};
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    72
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    73
#define ID_PAGE_SINGLEPLAYER 0
26
e32fa14529f8 Frontend lets define more binds
unc0rr
parents: 25
diff changeset
    74
#define ID_PAGE_SETUP_TEAM 1
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    75
#define ID_PAGE_SETUP 2
25
27aa8030322b - Get rid of old frontend
unc0rr
parents: 21
diff changeset
    76
#define ID_PAGE_MULTIPLAYER 3
26
e32fa14529f8 Frontend lets define more binds
unc0rr
parents: 25
diff changeset
    77
#define ID_PAGE_DEMOS 4
28
59f7db859b8a - clear demos list before adding items
unc0rr
parents: 26
diff changeset
    78
#define ID_PAGE_NET 5
59f7db859b8a - clear demos list before adding items
unc0rr
parents: 26
diff changeset
    79
#define ID_PAGE_NETCHAT 6
31
99888245a4e8 Now net game is near available, but exception occurs...
unc0rr
parents: 28
diff changeset
    80
#define ID_PAGE_NETCFG 7
99888245a4e8 Now net game is near available, but exception occurs...
unc0rr
parents: 28
diff changeset
    81
#define ID_PAGE_MAIN 8
20
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    82
ccd2c45f043d frontend rewrite for QT4
unc0rr
parents:
diff changeset
    83
#endif