- Start work on team select widget
authorunc0rr
Thu, 07 Aug 2008 18:26:52 +0000
changeset 1171 ab9932feda49
parent 1170 bd0f414e395a
child 1172 8542fc1ff5cf
- Start work on team select widget - Customize QListWidget view (chat, demos list)
QTfrontend/main.cpp
QTfrontend/teamselhelper.cpp
QTfrontend/teamselhelper.h
--- a/QTfrontend/main.cpp	Thu Aug 07 18:25:51 2008 +0000
+++ b/QTfrontend/main.cpp	Thu Aug 07 18:26:52 2008 +0000
@@ -70,6 +70,7 @@
 				"background-origin: margin;"
 				"background-position: top left;"
 				"background-color: #00351d;"
+				"color: orange;"
 				"}"
 				"QPushButton:hover{"
 				"border-color: yellow;"
@@ -91,6 +92,19 @@
 				"border-color: yellow;"
 				"}"
 
+			"QListWidget{"
+				"border: solid;"
+				"border-width: 4px;"
+				"border-radius: 12px;"
+				"border-color: orange;"
+				"background-color: #0d0544;"
+				"color: orange;"
+				"font: bold 14px;"
+				"}"
+			"QListWidget:hover{"
+				"border-color: yellow;"
+				"}"
+
 			"QSpinBox{"
 				"border: solid;"
 				"border-width: 4px;"
--- a/QTfrontend/teamselhelper.cpp	Thu Aug 07 18:25:51 2008 +0000
+++ b/QTfrontend/teamselhelper.cpp	Thu Aug 07 18:26:52 2008 +0000
@@ -46,20 +46,17 @@
   QPalette newPalette = palette();
   newPalette.setColor(QPalette::Button, palette().color(backgroundRole()));
 
-  // team fort
-  butt=new QPushButton(difficultyIcon, "", this);
-  butt->setFlat(true);
-  butt->setGeometry(0, 0, 30, 30);
-  butt->setMaximumWidth(30);
-  butt->setPalette(newPalette);
-  mainLayout.addWidget(butt);
-  butt->setIconSize(butt->size());
-
-  // team name
-  bText=new QPushButton(team.TeamName, this);
-  bText->setPalette(newPalette);
-  bText->setFlat(true);
-  mainLayout.addWidget(bText);
+	butt = new QPushButton(difficultyIcon, team.TeamName, this);
+	butt->setFlat(true);
+	butt->setPalette(newPalette);
+	mainLayout.addWidget(butt);
+	butt->setStyleSheet("QPushButton{"
+			"icon-size: 36px;"
+			"text-align: left;"
+			"background-color: #0d0544;"
+			"color: orange;"
+			"font: bold;"
+		"}");
 
   if(m_isPlaying) {
     // team color
@@ -76,14 +73,14 @@
   }
 
   QObject::connect(butt, SIGNAL(clicked()), this, SLOT(activateTeam()));
-  QObject::connect(bText, SIGNAL(clicked()), this, SLOT(activateTeam()));
+  //QObject::connect(bText, SIGNAL(clicked()), this, SLOT(activateTeam()));
 }
 
 void TeamShowWidget::setNonInteractive()
 {
   if(m_team.isNetTeam()) {
     disconnect(butt, SIGNAL(clicked()));
-    disconnect(bText, SIGNAL(clicked()));
+   // disconnect(bText, SIGNAL(clicked()));
   }
   disconnect(colorButt, SIGNAL(clicked()), this, SLOT(changeTeamColor()));
   phhoger->setNonInteractive();
--- a/QTfrontend/teamselhelper.h	Thu Aug 07 18:25:51 2008 +0000
+++ b/QTfrontend/teamselhelper.h	Thu Aug 07 18:26:52 2008 +0000
@@ -68,7 +68,7 @@
  CHedgehogerWidget* phhoger;
  QPushButton* colorButt;
  QPushButton* butt;
- QPushButton* bText;
+// QPushButton* bText;
 
  signals:
  void teamStatusChanged(HWTeam team);