QTfrontend/pages.cpp
changeset 1238 914bd2a9a249
parent 1236 f9110fd03754
child 1239 4901abe4c3b0
equal deleted inserted replaced
1237:7f3105a15d5d 1238:914bd2a9a249
    48 #include "netwwwwidget.h"
    48 #include "netwwwwidget.h"
    49 #include "chatwidget.h"
    49 #include "chatwidget.h"
    50 #include "playrecordpage.h"
    50 #include "playrecordpage.h"
    51 #include "selectWeapon.h"
    51 #include "selectWeapon.h"
    52 #include "igbox.h"
    52 #include "igbox.h"
       
    53 #include "hats.h"
    53 
    54 
    54 PageMain::PageMain(QWidget* parent) : 
    55 PageMain::PageMain(QWidget* parent) : 
    55   AbstractPage(parent)
    56   AbstractPage(parent)
    56 {
    57 {
    57 	QGridLayout * pageLayout = new QGridLayout(this);
    58 	QGridLayout * pageLayout = new QGridLayout(this);
    88 PageEditTeam::PageEditTeam(QWidget* parent) :
    89 PageEditTeam::PageEditTeam(QWidget* parent) :
    89   AbstractPage(parent)
    90   AbstractPage(parent)
    90 {
    91 {
    91 	QGridLayout * pageLayout = new QGridLayout(this);
    92 	QGridLayout * pageLayout = new QGridLayout(this);
    92 	pageLayout->setColumnStretch(0, 1);
    93 	pageLayout->setColumnStretch(0, 1);
    93 	pageLayout->setColumnMinimumWidth(0, 150);
    94 	pageLayout->setColumnMinimumWidth(0, 180);
    94 	pageLayout->setColumnStretch(1, 100);
    95 	pageLayout->setColumnStretch(1, 100);
    95 	pageLayout->setColumnMinimumWidth(1, 210);
    96 	pageLayout->setColumnMinimumWidth(1, 210);
    96 	pageLayout->setColumnStretch(2, 75);
    97 	pageLayout->setColumnStretch(2, 75);
    97 	pageLayout->setColumnMinimumWidth(2, 110);
    98 	pageLayout->setColumnMinimumWidth(2, 110);
    98 	pageLayout->setColumnStretch(3, 75);
    99 	pageLayout->setColumnStretch(3, 75);
   110 
   111 
   111 	GBoxHedgehogs = new QGroupBox(this);
   112 	GBoxHedgehogs = new QGroupBox(this);
   112 	GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members"));
   113 	GBoxHedgehogs->setTitle(QGroupBox::tr("Team Members"));
   113 	GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
   114 	GBoxHedgehogs->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
   114 	QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs);
   115 	QGridLayout * GBHLayout = new QGridLayout(GBoxHedgehogs);
       
   116 	
       
   117 	HatsModel * hatsModel = new HatsModel(GBoxHedgehogs);
   115 	for(int i = 0; i < 8; i++)
   118 	for(int i = 0; i < 8; i++)
   116 	{
   119 	{
   117 		HHNameEdit[i] = new QLineEdit(GBoxHedgehogs);
   120 		HHNameEdit[i] = new QLineEdit(GBoxHedgehogs);
   118 		HHNameEdit[i]->setGeometry(QRect(10, 20 + i * 30, 141, 20));
       
   119 		HHNameEdit[i]->setMaxLength(64);
   121 		HHNameEdit[i]->setMaxLength(64);
   120 		GBHLayout->addWidget(HHNameEdit[i]);
   122 		HHNameEdit[i]->setMinimumWidth(120);
       
   123 		GBHLayout->addWidget(HHNameEdit[i], i, 0);
       
   124 		
       
   125 		HHHats[i] = new QComboBox(GBoxHedgehogs);
       
   126 		HHHats[i]->setModel(hatsModel);
       
   127 		GBHLayout->addWidget(HHHats[i], i, 1);
   121 	}
   128 	}
   122 	pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1);
   129 	pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1);
   123 
   130 
   124 	BtnTeamDiscard = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
   131 	BtnTeamDiscard = addButton(":/res/Exit.png", pageLayout, 4, 0, true);
   125 
   132