Iconize more groupboxes
authorunc0rr
Tue, 12 Aug 2008 09:37:44 +0000
changeset 1194 32e854874df2
parent 1193 2911384169b4
child 1195 a9d237442958
Iconize more groupboxes
QTfrontend/hedgewars.qrc
QTfrontend/main.cpp
QTfrontend/pages.cpp
QTfrontend/pages.h
QTfrontend/res/teamicon.png
QTfrontend/res/weaponsicon.png
--- a/QTfrontend/hedgewars.qrc	Tue Aug 12 09:26:44 2008 +0000
+++ b/QTfrontend/hedgewars.qrc	Tue Aug 12 09:37:44 2008 +0000
@@ -31,5 +31,7 @@
     <file>res/unchecked.png</file>
     <file>res/graphicsicon.png</file>
     <file>res/Save.png</file>
+    <file>res/weaponsicon.png</file>
+    <file>res/teamicon.png</file>
 </qresource>
 </RCC>
--- a/QTfrontend/main.cpp	Tue Aug 12 09:26:44 2008 +0000
+++ b/QTfrontend/main.cpp	Tue Aug 12 09:37:44 2008 +0000
@@ -181,9 +181,9 @@
 				"color: orange;"
 				"font: bold 14px;"
 				"padding: 3px;"
-				"margin-top: 60px;"
-				"margin-left: 16px;"
-				"padding-top: 6px;"
+				"margin-top: 56px;"
+				"margin-left: 12px;"
+				"padding-top: 10px;"
 				"}"
 			"QGroupBox::title{"
 				"subcontrol-origin: margin;"
--- a/QTfrontend/pages.cpp	Tue Aug 12 09:26:44 2008 +0000
+++ b/QTfrontend/pages.cpp	Tue Aug 12 09:37:44 2008 +0000
@@ -270,16 +270,17 @@
 	pageLayout->setRowStretch(3, 100);
 	pageLayout->setRowStretch(4, 0);
 
-	groupBox = new QGroupBox(this);
-	groupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
-	groupBox->setTitle(QGroupBox::tr("Teams"));
-	pageLayout->addWidget(groupBox, 0, 0, 1, 3);
+	teamsBox = new IconedGroupBox(this);
+	teamsBox->setIcon(QIcon(":/res/teamicon.png"));
+	teamsBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
+	teamsBox->setTitle(QGroupBox::tr("Teams"));
+	pageLayout->addWidget(teamsBox, 0, 0, 1, 3);
 
-	QGridLayout * GBTlayout = new QGridLayout(groupBox);
+	QGridLayout * GBTlayout = new QGridLayout(teamsBox);
 
 	BtnNewTeam = addButton(tr("New team"), GBTlayout, 0, 0);
 
-	CBTeamName = new QComboBox(groupBox);
+	CBTeamName = new QComboBox(teamsBox);
 	GBTlayout->addWidget(CBTeamName, 0, 1);
 
 	BtnEditTeam = addButton(tr("Edit team"), GBTlayout, 0, 2);
@@ -339,7 +340,8 @@
 
 	BtnBack = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
 
-	QGroupBox* groupWeapons = new QGroupBox(this);
+	IconedGroupBox* groupWeapons = new IconedGroupBox(this);
+	groupWeapons->setIcon(QIcon(":/res/weaponsicon.png"));
 	groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
 	groupWeapons->setTitle(QGroupBox::tr("Weapons"));
 	pageLayout->addWidget(groupWeapons, 1, 0, 1, 3);
--- a/QTfrontend/pages.h	Tue Aug 12 09:26:44 2008 +0000
+++ b/QTfrontend/pages.h	Tue Aug 12 09:37:44 2008 +0000
@@ -188,7 +188,7 @@
 	QComboBox* WeaponsName;
 
 	QPushButton *BtnBack;
-	QGroupBox *groupBox;
+	IconedGroupBox *teamsBox;
 	QPushButton *BtnNewTeam;
 	QPushButton *BtnEditTeam;
 	QComboBox *CBTeamName;
Binary file QTfrontend/res/teamicon.png has changed
Binary file QTfrontend/res/weaponsicon.png has changed