"About" page, not yet filled with content
authorunc0rr
Thu, 05 Oct 2006 18:44:14 +0000
changeset 187 96c3154efee5
parent 186 7157b34a24d6
child 188 a7c2a61524c2
"About" page, not yet filled with content
QTfrontend/CMakeLists.txt
QTfrontend/about.cpp
QTfrontend/about.h
QTfrontend/hedgewars.pro
QTfrontend/hwform.cpp
QTfrontend/hwform.h
QTfrontend/main.cpp.in
QTfrontend/pages.cpp
QTfrontend/pages.h
QTfrontend/ui_hwform.cpp
QTfrontend/ui_hwform.h
--- a/QTfrontend/CMakeLists.txt	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/CMakeLists.txt	Thu Oct 05 18:44:14 2006 +0000
@@ -29,7 +29,8 @@
 	hedgehogerWidget.cpp
 	hwmap.cpp
 	mapContainer.cpp
-	tcpBase.cpp)
+	tcpBase.cpp
+	about.cpp)
 
 if (WIN32)
 	set(hwfr_src ${hwfr_src} res/hedgewars.rc)
@@ -53,7 +54,8 @@
 	hedgehogerWidget.h
 	hwmap.h
 	mapContainer.h
-	tcpBase.h)
+	tcpBase.h
+	about.h)
 
 
 set(hwfr_rez
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/about.cpp	Thu Oct 05 18:44:14 2006 +0000
@@ -0,0 +1,25 @@
+/*
+ * Hedgewars, a worms-like game
+ * Copyright (c) 2006 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#include "about.h"
+
+About::About(QWidget * parent) :
+  QWidget(parent)
+{
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/QTfrontend/about.h	Thu Oct 05 18:44:14 2006 +0000
@@ -0,0 +1,33 @@
+/*
+ * Hedgewars, a worms-like game
+ * Copyright (c) 2006 Andrey Korotaev <unC0Rr@gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ */
+
+#ifndef _ABOUT_H
+#define _ABOUT_H
+
+#include <QWidget>
+
+
+class About : public QWidget
+{
+	Q_OBJECT
+
+public:
+	About(QWidget * parent = 0);
+};
+
+#endif // _ABOUT_H
--- a/QTfrontend/hedgewars.pro	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/hedgewars.pro	Thu Oct 05 18:44:14 2006 +0000
@@ -29,7 +29,8 @@
            hedgehogerWidget.h \
            hwmap.h \
            mapContainer.h \
-           tcpBase.h
+           tcpBase.h \
+           about.h
            
 SOURCES += game.cpp \
            main.cpp \
@@ -48,7 +49,8 @@
            hedgehogerWidget.cpp \
            hwmap.cpp \
            mapContainer.cpp \
-           tcpBase.cpp
+           tcpBase.cpp \
+           about.cpp
 
 TRANSLATIONS += translations/hedgewars_ru.ts
 
--- a/QTfrontend/hwform.cpp	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/hwform.cpp	Thu Oct 05 18:44:14 2006 +0000
@@ -61,6 +61,7 @@
 	connect(ui.pageMain->BtnMultiplayer,	SIGNAL(clicked()),	this, SLOT(GoToMultiplayer()));
 	connect(ui.pageMain->BtnDemos,	SIGNAL(clicked()),	this, SLOT(GoToDemos()));
 	connect(ui.pageMain->BtnNet,	SIGNAL(clicked()),	this, SLOT(GoToNet()));
+	connect(ui.pageMain->BtnInfo,	SIGNAL(clicked()),	this, SLOT(GoToInfo()));
 	connect(ui.pageMain->BtnExit, SIGNAL(clicked()), this, SLOT(close()));
 
 	connect(ui.pageLocalGame->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoToMain()));
@@ -91,6 +92,8 @@
 	connect(ui.pageNetChat->BtnJoin,	SIGNAL(clicked()),	this, SLOT(NetJoin()));
 	connect(ui.pageNetChat->BtnCreate,	SIGNAL(clicked()),	this, SLOT(NetCreate()));
 
+	connect(ui.pageInfo->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoToMain()));
+
 	ui.Pages->setCurrentIndex(ID_PAGE_MAIN);
 }
 
@@ -109,6 +112,11 @@
 	ui.Pages->setCurrentIndex(ID_PAGE_SETUP);
 }
 
+void HWForm::GoToInfo()
+{
+	ui.Pages->setCurrentIndex(ID_PAGE_INFO);
+}
+
 void HWForm::GoToMultiplayer()
 {
 	ui.pageMultiplayer->teamsSelect->resetPlayingTeams(config->GetTeamsList());
--- a/QTfrontend/hwform.h	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/hwform.h	Thu Oct 05 18:44:14 2006 +0000
@@ -46,6 +46,7 @@
 	void GoToDemos();
 	void GoToNet();
 	void GoToNetChat();
+	void GoToInfo();
 	void NewTeam();
 	void EditTeam();
 	void TeamSave();
@@ -64,20 +65,22 @@
 	void StartMPGame();
 
 private:
+	enum PageIDs {
+		ID_PAGE_SINGLEPLAYER	= 0,
+		ID_PAGE_SETUP_TEAM	= 1,
+		ID_PAGE_SETUP	= 2,
+		ID_PAGE_MULTIPLAYER	= 3,
+		ID_PAGE_DEMOS	= 4,
+		ID_PAGE_NET	= 5,
+		ID_PAGE_NETCHAT	= 6,
+		ID_PAGE_NETCFG	= 7,
+		ID_PAGE_INFO	= 8,
+		ID_PAGE_MAIN	= 9
+		};
 	HWGame * game;
 	HWTeam * tmpTeam;
 	HWNet * hwnet;
 	GameUIConfig * config;
 };
 
-#define ID_PAGE_SINGLEPLAYER 0
-#define ID_PAGE_SETUP_TEAM 1
-#define ID_PAGE_SETUP 2
-#define ID_PAGE_MULTIPLAYER 3
-#define ID_PAGE_DEMOS 4
-#define ID_PAGE_NET 5
-#define ID_PAGE_NETCHAT 6
-#define ID_PAGE_NETCFG 7
-#define ID_PAGE_MAIN 8
-
 #endif
--- a/QTfrontend/main.cpp.in	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/main.cpp.in	Thu Oct 05 18:44:14 2006 +0000
@@ -2,33 +2,18 @@
  * Hedgewars, a worms-like game
  * Copyright (c) 2005, 2006 Andrey Korotaev <unC0Rr@gmail.com>
  *
- * Distributed under the terms of the BSD-modified licence:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * with the Software without restriction, including without limitation the
- * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
- * sell copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License
  *
- * 1. Redistributions of source code must retain the above copyright notice,
- *    this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
 #include <QApplication>
--- a/QTfrontend/pages.cpp	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/pages.cpp	Thu Oct 05 18:44:14 2006 +0000
@@ -35,6 +35,7 @@
 #include "gamecfgwidget.h"
 #include "SquareLabel.h"
 #include "mapContainer.h"
+#include "about.h"
 
 PageMain::PageMain(QWidget* parent) : QWidget(parent)
 {
@@ -75,11 +76,17 @@
 	BtnSetup->setText(QPushButton::tr("Setup"));
 	pageLayout->addWidget(BtnSetup, 5, 1);
 
+	BtnInfo = new QPushButton(this);
+	BtnInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+	BtnInfo->setFont(*font14);
+	BtnInfo->setText(QPushButton::tr("About"));
+	pageLayout->addWidget(BtnInfo, 6, 1);
+
 	BtnExit = new QPushButton(parent);
 	BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 	BtnExit->setFont(*font14);
 	BtnExit->setText(QPushButton::tr("Exit"));
-	pageLayout->addWidget(BtnExit, 6, 1);
+	pageLayout->addWidget(BtnExit, 7, 1);
 }
 
 PageLocalGame::PageLocalGame(QWidget* parent) : QWidget(parent)
@@ -244,7 +251,7 @@
 	BtnBack->setFont(*font14);
 	BtnBack->setText(QPushButton::tr("Back"));
 	pageLayout->addWidget(BtnBack, 1, 0);
-	
+
 	//HWMapContainer* pMapContainer=new HWMapContainer(this);
 	//pageLayout->addWidget(pMapContainer, 1, 1);
 
@@ -411,7 +418,6 @@
 	pageLayout->addWidget(BtnCreate, 1, 2);
 }
 
-
 PageNetGame::PageNetGame(QWidget* parent) : QWidget(parent)
 {
 	QFont * font14 = new QFont("MS Shell Dlg", 14);
@@ -438,3 +444,20 @@
 	listNetTeams = new QListWidget(this);
 	pageLayout->addWidget(listNetTeams, 0, 1);
 }
+
+PageInfo::PageInfo(QWidget* parent) : QWidget(parent)
+{
+	QFont * font14 = new QFont("MS Shell Dlg", 14);
+	QGridLayout * pageLayout = new QGridLayout(this);
+	pageLayout->setColumnStretch(0, 1);
+	pageLayout->setColumnStretch(1, 1);
+	pageLayout->setColumnStretch(2, 1);
+
+	BtnBack = new QPushButton(this);
+	BtnBack->setFont(*font14);
+	BtnBack->setText(QPushButton::tr("Back"));
+	pageLayout->addWidget(BtnBack, 1, 0);
+
+	about = new About(this);
+	pageLayout->addWidget(about, 0, 0, 1, 3);
+}
--- a/QTfrontend/pages.h	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/pages.h	Thu Oct 05 18:44:14 2006 +0000
@@ -35,6 +35,7 @@
 class QListWidget;
 class QCheckBox;
 class SquareLabel;
+class About;
 
 class PageMain : public QWidget
 {
@@ -48,6 +49,7 @@
 	QPushButton *BtnNet;
 	QPushButton *BtnSetup;
 	QPushButton *BtnDemos;
+	QPushButton *BtnInfo;
 	QPushButton *BtnExit;
 };
 
@@ -183,4 +185,15 @@
 	QListWidget *listNetTeams;
 };
 
+class PageInfo : public QWidget
+{
+	Q_OBJECT
+
+public:
+	PageInfo(QWidget* parent = 0);
+
+	QPushButton *BtnBack;
+	About *about;
+};
+
 #endif // PAGES_H
--- a/QTfrontend/ui_hwform.cpp	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/ui_hwform.cpp	Thu Oct 05 18:44:14 2006 +0000
@@ -28,10 +28,7 @@
 	HWForm->setObjectName(QString::fromUtf8("HWForm"));
 	HWForm->resize(QSize(620, 430).expandedTo(HWForm->minimumSizeHint()));
 	HWForm->setMinimumSize(QSize(620, 430));
-	HWForm->setWindowTitle(QMainWindow::tr("-= by unC0Rr =-"));
-	centralWidget = new QWidget(HWForm);
-	centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
-
+	HWForm->setWindowTitle(QMainWindow::tr("Hedgewars"));
 	centralWidget = new QWidget(HWForm);
 	centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
 
@@ -77,6 +74,9 @@
 	pageNetGame	= new PageNetGame();
 	Pages->addWidget(pageNetGame);
 
+	pageInfo = new PageInfo();
+	Pages->addWidget(pageInfo);
+
 	pageMain = new PageMain();
 	Pages->addWidget(pageMain);
 }
--- a/QTfrontend/ui_hwform.h	Thu Oct 05 18:36:04 2006 +0000
+++ b/QTfrontend/ui_hwform.h	Thu Oct 05 18:44:14 2006 +0000
@@ -45,6 +45,7 @@
 class PageNet;
 class PageNetChat;
 class PageNetGame;
+class PageInfo;
 
 class Ui_HWForm
 {
@@ -60,6 +61,7 @@
 	PageNet *pageNet;
 	PageNetChat *pageNetChat;
 	PageNetGame *pageNetGame;
+	PageInfo *pageInfo;
 
 	QStackedLayout *Pages;
 	QFont *font14;