Start remaking multiplayer page
authorunc0rr
Thu, 14 Aug 2008 13:34:44 +0000
changeset 1209 7f6cb1d7be2a
parent 1208 9f4704f3c6ea
child 1210 bfed1b89bc85
Start remaking multiplayer page
QTfrontend/igbox.cpp
QTfrontend/main.cpp
QTfrontend/mapContainer.cpp
QTfrontend/mapContainer.h
hedgewars.kdevelop
--- a/QTfrontend/igbox.cpp	Wed Aug 13 22:35:27 2008 +0000
+++ b/QTfrontend/igbox.cpp	Thu Aug 14 13:34:44 2008 +0000
@@ -31,6 +31,20 @@
 void IconedGroupBox::setIcon(const QIcon & icon)
 {
 	this->icon = icon;
+	setStyleSheet(
+		"IconedGroupBox{"
+			"margin-top: 46px;"
+			"margin-left: 12px;"
+			"padding-top: 22px;"
+			"}"
+		"IconedGroupBox::title{"
+			"subcontrol-origin: margin;"
+			"subcontrol-position: top left;"
+			"padding-left: 82px;"
+			"padding-top: 26px;"
+			"text-align: left;"
+			"}"
+	);
 }
 
 void IconedGroupBox::paintEvent(QPaintEvent * event)
--- a/QTfrontend/main.cpp	Wed Aug 13 22:35:27 2008 +0000
+++ b/QTfrontend/main.cpp	Thu Aug 14 13:34:44 2008 +0000
@@ -182,16 +182,6 @@
 				"color: orange;"
 				"font: bold 14px;"
 				"padding: 12px;"
-				"margin-top: 46px;"
-				"margin-left: 12px;"
-				"padding-top: 22px;"
-				"}"
-			"IconedGroupBox::title{"
-				"subcontrol-origin: margin;"
-				"subcontrol-position: top left;"
-				"padding-left: 82px;"
-				"padding-top: 26px;"
-				"text-align: left;"
 				"}"
 			".QGroupBox{"
 				"background-image: url(\":/res/panelbg.png\");"
@@ -205,7 +195,7 @@
 				"padding: 6px;"
 				"color: orange;"
 				"font: bold 14px;"
-				"margin-top: 24px;"
+				//"margin-top: 24px;"
 				"}"
 			".QGroupBox::title{"
 				"subcontrol-origin: margin;"
--- a/QTfrontend/mapContainer.cpp	Wed Aug 13 22:35:27 2008 +0000
+++ b/QTfrontend/mapContainer.cpp	Thu Aug 14 13:34:44 2008 +0000
@@ -25,9 +25,13 @@
 #include <QColor>
 #include <QTextStream>
 #include <QApplication>
+#include <QLabel>
+#include <QListWidget>
+#include <QVBoxLayout>
 
 #include "hwconsts.h"
 #include "mapContainer.h"
+#include "igbox.h"
 
 HWMapContainer::HWMapContainer(QWidget * parent) :
   QWidget(parent), mainLayout(this)
@@ -38,16 +42,17 @@
                 QApplication::style()->pixelMetric(QStyle::PM_LayoutRightMargin),
                 QApplication::style()->pixelMetric(QStyle::PM_LayoutBottomMargin));
 #endif
-  imageButt=new QPushButton(this);
+  imageButt = new QPushButton(this);
   imageButt->setObjectName("imageButt");
   imageButt->setFixedSize(256 + 8, 128 + 8);
   imageButt->setFlat(true);
   imageButt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);//QSizePolicy::Minimum, QSizePolicy::Minimum);
-  mainLayout.addWidget(imageButt);
+  mainLayout.addWidget(imageButt, 0, 0, 1, 2);
   connect(imageButt, SIGNAL(clicked()), this, SLOT(setRandomSeed()));
   setRandomSeed();
 
-  chooseMap=new QComboBox(this);
+  chooseMap = new QComboBox(this);
+  chooseMap->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
   QDir tmpdir;
   tmpdir.cd(datadir->absolutePath());
   tmpdir.cd("Maps");
@@ -56,8 +61,22 @@
   mapList.push_front(QComboBox::tr("generated map..."));
   chooseMap->addItems(mapList);
   connect(chooseMap, SIGNAL(activated(int)), this, SLOT(mapChanged(int)));
+  mainLayout.addWidget(chooseMap, 1, 1);
 
-  mainLayout.addWidget(chooseMap);
+  QLabel * lblMap = new QLabel(tr("Map"), this);
+  mainLayout.addWidget(lblMap, 1, 0);
+
+	gbThemes = new IconedGroupBox(this);
+	gbThemes->setTitle(tr("Themes"));
+	gbThemes->setStyleSheet("padding: 0px;");
+	mainLayout.addWidget(gbThemes, 0, 2, 2, 1);
+	QVBoxLayout * gbTLayout = new QVBoxLayout(gbThemes);
+	lwThemes = new QListWidget(this);
+	lwThemes->setFixedWidth(100);
+	gbTLayout->addWidget(lwThemes);
+	lwThemes->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum);
+	
+
   mainLayout.setSizeConstraint(QLayout::SetFixedSize);//SetMinimumSize
 }
 
--- a/QTfrontend/mapContainer.h	Wed Aug 13 22:35:27 2008 +0000
+++ b/QTfrontend/mapContainer.h	Thu Aug 14 13:34:44 2008 +0000
@@ -22,10 +22,12 @@
 #include "hwmap.h"
 
 #include <QWidget>
-#include <QVBoxLayout>
+#include <QGridLayout>
 #include <QComboBox>
 
 class QPushButton;
+class IconedGroupBox;
+class QListWidget;
 
 class MapFileErrorException
 {
@@ -62,9 +64,11 @@
   virtual void resizeEvent ( QResizeEvent * event );
 
  private:
-  QVBoxLayout mainLayout;
+  QGridLayout mainLayout;
   QPushButton* imageButt;
   QComboBox* chooseMap;
+  IconedGroupBox* gbThemes;
+  QListWidget* lwThemes;
   HWMap* pMap;
   QString m_seed;
   QString theme;
--- a/hedgewars.kdevelop	Wed Aug 13 22:35:27 2008 +0000
+++ b/hedgewars.kdevelop	Thu Aug 14 13:34:44 2008 +0000
@@ -19,20 +19,20 @@
     <projectname>hedgewars</projectname>
     <projectdirectory>.</projectdirectory>
     <absoluteprojectpath>false</absoluteprojectpath>
-    <description/>
+    <description></description>
     <versioncontrol>kdevsubversion</versioncontrol>
-    <defaultencoding/>
+    <defaultencoding></defaultencoding>
   </general>
   <kdevcustomproject>
     <run>
       <directoryradio>executable</directoryradio>
       <customdirectory>/</customdirectory>
       <mainprogram>bin/hedgewars</mainprogram>
-      <programargs/>
+      <programargs>-style plastique</programargs>
       <terminal>false</terminal>
       <autocompile>true</autocompile>
       <envvars/>
-      <globaldebugarguments/>
+      <globaldebugarguments></globaldebugarguments>
       <globalcwd>/usr/home/unC0Rr/Sources/Hedgewars/Hedgewars-FF/trunk</globalcwd>
       <useglobalprogram>false</useglobalprogram>
       <autoinstall>false</autoinstall>
@@ -55,16 +55,16 @@
     </general>
     <build>
       <buildtool>make</buildtool>
-      <builddir/>
+      <builddir></builddir>
     </build>
     <make>
       <abortonerror>true</abortonerror>
       <numberofjobs>4</numberofjobs>
       <prio>0</prio>
       <dontact>false</dontact>
-      <makebin/>
-      <defaulttarget/>
-      <makeoptions/>
+      <makebin></makebin>
+      <defaulttarget></defaulttarget>
+      <makeoptions></makeoptions>
       <selectedenvironment>default</selectedenvironment>
       <environments>
         <default/>
@@ -72,9 +72,9 @@
     </make>
     <other>
       <prio>0</prio>
-      <otherbin/>
-      <defaulttarget/>
-      <otheroptions/>
+      <otherbin></otherbin>
+      <defaulttarget></defaulttarget>
+      <otheroptions></otheroptions>
       <selectedenvironment>default</selectedenvironment>
       <environments>
         <default/>
@@ -83,12 +83,12 @@
   </kdevcustomproject>
   <kdevdebugger>
     <general>
-      <dbgshell/>
+      <dbgshell></dbgshell>
       <programargs/>
-      <gdbpath/>
-      <configGdbScript/>
-      <runShellScript/>
-      <runGdbScript/>
+      <gdbpath></gdbpath>
+      <configGdbScript></configGdbScript>
+      <runShellScript></runShellScript>
+      <runGdbScript></runGdbScript>
       <breakonloadinglibs>true</breakonloadinglibs>
       <separatetty>false</separatetty>
       <floatingtoolbar>false</floatingtoolbar>
@@ -194,7 +194,7 @@
       <includeTypedefs>false</includeTypedefs>
     </codecompletion>
     <creategettersetter>
-      <prefixGet/>
+      <prefixGet></prefixGet>
       <prefixSet>set</prefixSet>
       <prefixVariable>m_,_</prefixVariable>
       <parameterName>theValue</parameterName>
@@ -213,7 +213,7 @@
       <hidenonlocation>false</hidenonlocation>
     </groups>
     <tree>
-      <hidepatterns></hidepatterns>
+      <hidepatterns/>
       <hidenonprojectfiles>true</hidenonprojectfiles>
       <showvcsfields>false</showvcsfields>
     </tree>