QTfrontend/ui_hwform.cpp
changeset 84 0f6669da2fcb
child 85 44d9045b26ff
equal deleted inserted replaced
83:207c85fbef51 84:0f6669da2fcb
       
     1 #include "ui_hwform.h"
       
     2 #include <QVBoxLayout>
       
     3 #include <QGridLayout>
       
     4 
       
     5 void Ui_HWForm::setupUi(QMainWindow *HWForm)
       
     6 {
       
     7 	SetupFonts();
       
     8 
       
     9 	HWForm->setObjectName(QString::fromUtf8("HWForm"));
       
    10 	HWForm->resize(QSize(640, 450).expandedTo(HWForm->minimumSizeHint()));
       
    11 	HWForm->setMinimumSize(QSize(620, 430));
       
    12 
       
    13 	centralWidget = new QWidget(HWForm);
       
    14 	centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
       
    15 
       
    16 	SetupPages(centralWidget);
       
    17 
       
    18 	HWForm->setCentralWidget(centralWidget);
       
    19 	retranslateUi(HWForm);
       
    20 	QObject::connect(BtnExit, SIGNAL(clicked()), HWForm, SLOT(close()));
       
    21 
       
    22 	Pages->setCurrentIndex(0);
       
    23 	CBFort->setCurrentIndex(-1);
       
    24 	CBGrave->setCurrentIndex(-1);
       
    25 	BindsBox->setCurrentIndex(0);
       
    26 
       
    27 
       
    28 	QMetaObject::connectSlotsByName(HWForm);
       
    29 }
       
    30 
       
    31 void Ui_HWForm::SetupFonts()
       
    32 {
       
    33 	font14 = new QFont();
       
    34 	font14->setFamily(QString::fromUtf8("MS Shell Dlg"));
       
    35 	font14->setPointSize(14);
       
    36 	font14->setBold(false);
       
    37 	font14->setItalic(false);
       
    38 	font14->setUnderline(false);
       
    39 	font14->setWeight(50);
       
    40 	font14->setStrikeOut(false);
       
    41 }
       
    42 
       
    43 void Ui_HWForm::SetupPages(QWidget *Parent)
       
    44 {
       
    45 	Pages =	new QStackedLayout(Parent);
       
    46 
       
    47 	pageLG = new QWidget();
       
    48 	SetupPageLocalGame(pageLG);
       
    49 	Pages->addWidget(pageLG);
       
    50 
       
    51 	pageET = new QWidget();
       
    52 	SetupPageEditTeam(pageET);
       
    53 	Pages->addWidget(pageET);
       
    54 
       
    55 	pageOpt = new QWidget();
       
    56 	SetupPageOptions(pageOpt);
       
    57 	Pages->addWidget(pageOpt);
       
    58 
       
    59 	pageMP = new QWidget();
       
    60 	SetupPageMultiplayer(pageMP);
       
    61 	Pages->addWidget(pageMP);
       
    62 
       
    63 	pagePDemo =	new QWidget();
       
    64 	SetupPagePlayDemo(pagePDemo);
       
    65 	Pages->addWidget(pagePDemo);
       
    66 
       
    67 	pageNet = new QWidget();
       
    68 	SetupPageNet(pageNet);
       
    69 	Pages->addWidget(pageNet);
       
    70 
       
    71 	pageNetChat	= new QWidget();
       
    72 	SetupPageNetChat(pageNetChat);
       
    73 	Pages->addWidget(pageNetChat);
       
    74 
       
    75 	pageNetGame	= new QWidget();
       
    76 	SetupPageNetGame(pageNetGame);
       
    77 	Pages->addWidget(pageNetGame);
       
    78 
       
    79 	pageMain = new QWidget();
       
    80 	SetupPageMain(pageMain);
       
    81 	Pages->addWidget(pageMain);
       
    82 }
       
    83 
       
    84 void Ui_HWForm::SetupPageLocalGame(QWidget *Parent)
       
    85 {
       
    86 	BtnSimpleGame = new	QPushButton(Parent);
       
    87 	BtnSimpleGame->setGeometry(QRect(330, 380, 161, 41));
       
    88 	BtnSimpleGame->setFont(*font14);
       
    89 	BtnSimpleGame->setCheckable(false);
       
    90 	BtnSimpleGame->setChecked(false);
       
    91 	BtnSPBack =	new QPushButton(Parent);
       
    92 	BtnSPBack->setGeometry(QRect(120, 380, 161,	41));
       
    93 	BtnSPBack->setFont(*font14);
       
    94 	BtnSPBack->setCheckable(false);
       
    95 	BtnSPBack->setChecked(false);
       
    96 
       
    97 }
       
    98 
       
    99 void Ui_HWForm::SetupPageEditTeam(QWidget *Parent)
       
   100 {
       
   101 	GBoxHedgehogs = new	QGroupBox(Parent);
       
   102 	GBoxHedgehogs->setGeometry(QRect(20, 70, 161, 261));
       
   103 	GBoxTeam = new QGroupBox(Parent);
       
   104 	GBoxTeam->setGeometry(QRect(20, 10,	161, 51));
       
   105 	GBoxFort = new QGroupBox(Parent);
       
   106 	GBoxFort->setGeometry(QRect(420, 110, 181, 221));
       
   107 	CBFort = new QComboBox(GBoxFort);
       
   108 	CBFort->setGeometry(QRect(10, 20, 161, 21));
       
   109 	CBFort->setMaxCount(65535);
       
   110 	FortPreview	= new QLabel(GBoxFort);
       
   111 	FortPreview->setGeometry(QRect(10, 50, 161,	161));
       
   112 	FortPreview->setPixmap(QPixmap());
       
   113 	FortPreview->setScaledContents(true);
       
   114 	GBoxGrave =	new QGroupBox(Parent);
       
   115 	GBoxGrave->setGeometry(QRect(420, 10, 181, 91));
       
   116 	CBGrave = new QComboBox(GBoxGrave);
       
   117 	CBGrave->setGeometry(QRect(10, 20, 161, 21));
       
   118 	CBGrave->setMaxCount(65535);
       
   119 	GravePreview = new QLabel(GBoxGrave);
       
   120 	GravePreview->setGeometry(QRect(80,	50, 32,	32));
       
   121 	GravePreview->setScaledContents(true);
       
   122 	GBoxBinds =	new QGroupBox(Parent);
       
   123 	GBoxBinds->setGeometry(QRect(200, 10, 201, 431));
       
   124 	BindsBox = new QToolBox(GBoxBinds);
       
   125 	BindsBox->setGeometry(QRect(10, 20,	181, 401));
       
   126 	BindsBox->setLineWidth(0);
       
   127 	page_A = new QWidget();
       
   128 	page_A->setGeometry(QRect(0, 0, 96,	26));
       
   129 	BindsBox->addItem(page_A, QApplication::translate("HWForm",	"Actions", 0, QApplication::UnicodeUTF8));
       
   130 	page_W = new QWidget();
       
   131 	page_W->setObjectName(QString::fromUtf8("page_W"));
       
   132 	BindsBox->addItem(page_W, QApplication::translate("HWForm",	"Weapons", 0, QApplication::UnicodeUTF8));
       
   133 	page_WP = new QWidget();
       
   134 	page_WP->setObjectName(QString::fromUtf8("page_WP"));
       
   135 	BindsBox->addItem(page_WP, QApplication::translate("HWForm", "Weapon properties", 0, QApplication::UnicodeUTF8));
       
   136 	page_O = new QWidget();
       
   137 	page_O->setObjectName(QString::fromUtf8("page_O"));
       
   138 	page_O->setGeometry(QRect(0, 0, 96,	26));
       
   139 	BindsBox->addItem(page_O, QApplication::translate("HWForm",	"Other", 0, QApplication::UnicodeUTF8));
       
   140 	BtnTeamDiscard = new QPushButton(pageET);
       
   141 	BtnTeamDiscard->setGeometry(QRect(440, 380,	161, 41));
       
   142 	BtnTeamDiscard->setFont(*font14);
       
   143 	BtnTeamDiscard->setCheckable(false);
       
   144 	BtnTeamDiscard->setChecked(false);
       
   145 	BtnTeamSave	= new QPushButton(Parent);
       
   146 	BtnTeamSave->setGeometry(QRect(20, 380, 161, 41));
       
   147 	BtnTeamSave->setFont(*font14);
       
   148 	BtnTeamSave->setCheckable(false);
       
   149 	BtnTeamSave->setChecked(false);
       
   150 }
       
   151 
       
   152 void Ui_HWForm::SetupPageOptions(QWidget *Parent)
       
   153 {
       
   154 	groupBox = new QGroupBox(Parent);
       
   155 	groupBox->setGeometry(QRect(20, 10,	591, 71));
       
   156 	BtnNewTeam = new QPushButton(groupBox);
       
   157 	BtnNewTeam->setGeometry(QRect(10, 20, 160, 40));
       
   158 	BtnNewTeam->setFont(*font14);
       
   159 	BtnEditTeam	= new QPushButton(groupBox);
       
   160 	BtnEditTeam->setGeometry(QRect(400,	20, 160, 40));
       
   161 	BtnEditTeam->setFont(*font14);
       
   162 	CBTeamName = new QComboBox(groupBox);
       
   163 	CBTeamName->setGeometry(QRect(200, 30, 171,	22));
       
   164 	CBResolution = new QComboBox(Parent);
       
   165 	CBResolution->setGeometry(QRect(20,	120, 151, 22));
       
   166 	CBEnableSound = new	QCheckBox(Parent);
       
   167 	CBEnableSound->setGeometry(QRect(20, 180, 101, 18));
       
   168 	CBFullscreen = new QCheckBox(Parent);
       
   169 	CBFullscreen->setGeometry(QRect(20,	160, 101, 18));
       
   170 	label = new	QLabel(Parent);
       
   171 	label->setGeometry(QRect(10, 233, 47, 13));
       
   172 	editNetNick	= new QLineEdit(Parent);
       
   173 	editNetNick->setGeometry(QRect(60, 230, 113, 20));
       
   174 	editNetNick->setMaxLength(30);
       
   175 	BtnSaveOptions = new QPushButton(Parent);
       
   176 	BtnSaveOptions->setGeometry(QRect(20, 380, 161, 41));
       
   177 	BtnSaveOptions->setFont(*font14);
       
   178 	BtnSaveOptions->setCheckable(false);
       
   179 	BtnSaveOptions->setChecked(false);
       
   180 	BtnSetupBack = new QPushButton(Parent);
       
   181 	BtnSetupBack->setGeometry(QRect(440, 380, 161, 41));
       
   182 	BtnSetupBack->setFont(*font14);
       
   183 	BtnSetupBack->setCheckable(false);
       
   184 	BtnSetupBack->setChecked(false);
       
   185 }
       
   186 
       
   187 void Ui_HWForm::SetupPageMultiplayer(QWidget *Parent)
       
   188 {
       
   189 	BtnMPBack = new	QPushButton(Parent);
       
   190 	BtnMPBack->setGeometry(QRect(240, 340, 161, 41));
       
   191 	BtnMPBack->setFont(*font14);
       
   192 	BtnMPBack->setCheckable(false);
       
   193 	BtnMPBack->setChecked(false);
       
   194 	listWidget = new QListWidget(Parent);
       
   195 	listWidget->setGeometry(QRect(160, 50, 221, 211));
       
   196 	listWidget->setModelColumn(0);
       
   197 }
       
   198 
       
   199 void Ui_HWForm::SetupPagePlayDemo(QWidget *Parent)
       
   200 {
       
   201 	BtnPlayDemo	= new QPushButton(Parent);
       
   202 	BtnPlayDemo->setGeometry(QRect(240,	330, 161, 41));
       
   203 	BtnPlayDemo->setFont(*font14);
       
   204 	BtnPlayDemo->setCheckable(false);
       
   205 	BtnPlayDemo->setChecked(false);
       
   206 	DemosList =	new QListWidget(Parent);
       
   207 	DemosList->setGeometry(QRect(170, 10, 311, 311));
       
   208 	BtnDemosBack = new QPushButton(Parent);
       
   209 	BtnDemosBack->setGeometry(QRect(240, 380, 161, 41));
       
   210 	BtnDemosBack->setFont(*font14);
       
   211 	BtnDemosBack->setCheckable(false);
       
   212 	BtnDemosBack->setChecked(false);
       
   213 }
       
   214 
       
   215 void Ui_HWForm::SetupPageNet(QWidget *Parent)
       
   216 {
       
   217 	BtnNetConnect = new	QPushButton(Parent);
       
   218 	BtnNetConnect->setGeometry(QRect(250, 140, 161, 41));
       
   219 	BtnNetConnect->setFont(*font14);
       
   220 	BtnNetConnect->setCheckable(false);
       
   221 	BtnNetConnect->setChecked(false);
       
   222 	BtnNetBack = new QPushButton(Parent);
       
   223 	BtnNetBack->setGeometry(QRect(250, 390, 161, 41));
       
   224 	BtnNetBack->setFont(*font14);
       
   225 	BtnNetBack->setCheckable(false);
       
   226 	BtnNetBack->setChecked(false);
       
   227 }
       
   228 
       
   229 void Ui_HWForm::SetupPageNetChat(QWidget *Parent)
       
   230 {
       
   231 	BtnNetChatDisconnect = new QPushButton(Parent);
       
   232 	BtnNetChatDisconnect->setGeometry(QRect(460, 390, 161, 41));
       
   233 	BtnNetChatDisconnect->setFont(*font14);
       
   234 	BtnNetChatDisconnect->setCheckable(false);
       
   235 	BtnNetChatDisconnect->setChecked(false);
       
   236 	ChannelsList = new QListWidget(Parent);
       
   237 	ChannelsList->setGeometry(QRect(20,	10, 201, 331));
       
   238 	BtnNetChatJoin = new QPushButton(Parent);
       
   239 	BtnNetChatJoin->setGeometry(QRect(460, 290,	161, 41));
       
   240 	BtnNetChatJoin->setFont(*font14);
       
   241 	BtnNetChatJoin->setCheckable(false);
       
   242 	BtnNetChatJoin->setChecked(false);
       
   243 	BtnNetChatCreate = new QPushButton(Parent);
       
   244 	BtnNetChatCreate->setGeometry(QRect(460, 340, 161, 41));
       
   245 	BtnNetChatCreate->setFont(*font14);
       
   246 	BtnNetChatCreate->setCheckable(false);
       
   247 	BtnNetChatCreate->setChecked(false);
       
   248 }
       
   249 
       
   250 void Ui_HWForm::SetupPageNetGame(QWidget *Parent)
       
   251 {
       
   252 	BtnNetCFGBack = new	QPushButton(Parent);
       
   253 	BtnNetCFGBack->setGeometry(QRect(260, 390, 161, 41));
       
   254 	BtnNetCFGBack->setFont(*font14);
       
   255 	BtnNetCFGBack->setCheckable(false);
       
   256 	BtnNetCFGBack->setChecked(false);
       
   257 	BtnNetCFGAddTeam = new QPushButton(Parent);
       
   258 	BtnNetCFGAddTeam->setGeometry(QRect(260, 290, 161, 41));
       
   259 	BtnNetCFGAddTeam->setFont(*font14);
       
   260 	BtnNetCFGAddTeam->setCheckable(false);
       
   261 	BtnNetCFGAddTeam->setChecked(false);
       
   262 	BtnNetCFGGo	= new QPushButton(Parent);
       
   263 	BtnNetCFGGo->setGeometry(QRect(260,	340, 161, 41));
       
   264 	BtnNetCFGGo->setFont(*font14);
       
   265 	BtnNetCFGGo->setCheckable(false);
       
   266 	BtnNetCFGGo->setChecked(false);
       
   267 	listNetTeams = new QListWidget(Parent);
       
   268 	listNetTeams->setGeometry(QRect(270, 30, 120, 80));
       
   269 }
       
   270 
       
   271 void Ui_HWForm::SetupPageMain(QWidget *Parent)
       
   272 {
       
   273 	QGridLayout * PageMainLayout = new QGridLayout(Parent);
       
   274 	PageMainLayout->setMargin(15);
       
   275 	BtnSinglePlayer = new QPushButton(Parent);
       
   276 	BtnSinglePlayer->setFont(*font14);
       
   277 	PageMainLayout->addWidget(BtnSinglePlayer, 0, 0);
       
   278 	BtnMultiplayer = new QPushButton(Parent);
       
   279 	BtnMultiplayer->setFont(*font14);
       
   280 	PageMainLayout->addWidget(BtnMultiplayer, 0, 1);
       
   281 	BtnNet = new QPushButton(Parent);
       
   282 	BtnNet->setFont(*font14);
       
   283 	PageMainLayout->addWidget(BtnNet, 1, 0);
       
   284 	BtnSetup = new QPushButton(Parent);
       
   285 	BtnSetup->setFont(*font14);
       
   286 	PageMainLayout->addWidget(BtnSetup, 1, 1);
       
   287 	BtnDemos = new QPushButton(Parent);
       
   288 	BtnDemos->setFont(*font14);
       
   289 	PageMainLayout->addWidget(BtnDemos, 2, 0);
       
   290 	BtnExit = new QPushButton(Parent);
       
   291 	BtnExit->setFont(*font14);
       
   292 	PageMainLayout->addWidget(BtnExit, 2, 1);
       
   293 }
       
   294 
       
   295 void Ui_HWForm::retranslateUi(QMainWindow *HWForm)
       
   296 {
       
   297 	HWForm->setWindowTitle(QApplication::translate("HWForm", "-= by unC0Rr =-",	0, QApplication::UnicodeUTF8));
       
   298 	BtnSimpleGame->setText(QApplication::translate("HWForm", "Simple Game", 0, QApplication::UnicodeUTF8));
       
   299 	BtnSPBack->setText(QApplication::translate("HWForm", "Back", 0, QApplication::UnicodeUTF8));
       
   300 	GBoxHedgehogs->setTitle(QApplication::translate("HWForm", "Team Members", 0, QApplication::UnicodeUTF8));
       
   301 	GBoxTeam->setTitle(QApplication::translate("HWForm", "Team", 0, QApplication::UnicodeUTF8));
       
   302 	GBoxFort->setTitle(QApplication::translate("HWForm", "Fort", 0, QApplication::UnicodeUTF8));
       
   303 	FortPreview->setText(QApplication::translate("HWForm", "", 0, QApplication::UnicodeUTF8));
       
   304 	GBoxGrave->setTitle(QApplication::translate("HWForm", "Grave", 0, QApplication::UnicodeUTF8));
       
   305 	GravePreview->setText(QApplication::translate("HWForm", "",	0, QApplication::UnicodeUTF8));
       
   306 	GBoxBinds->setTitle(QApplication::translate("HWForm", "Key binds", 0, QApplication::UnicodeUTF8));
       
   307 	BindsBox->setItemText(BindsBox->indexOf(page_A), QApplication::translate("HWForm", "Actions", 0, QApplication::UnicodeUTF8));
       
   308 	BindsBox->setItemText(BindsBox->indexOf(page_W), QApplication::translate("HWForm", "Weapons", 0, QApplication::UnicodeUTF8));
       
   309 	BindsBox->setItemText(BindsBox->indexOf(page_WP), QApplication::translate("HWForm",	"Weapon	properties", 0,	QApplication::UnicodeUTF8));
       
   310 	BindsBox->setItemText(BindsBox->indexOf(page_O), QApplication::translate("HWForm", "Other",	0, QApplication::UnicodeUTF8));
       
   311 	BtnTeamDiscard->setText(QApplication::translate("HWForm", "Discard", 0, QApplication::UnicodeUTF8));
       
   312 	BtnTeamSave->setText(QApplication::translate("HWForm", "Save", 0, QApplication::UnicodeUTF8));
       
   313 	groupBox->setTitle(QApplication::translate("HWForm", "Teams", 0, QApplication::UnicodeUTF8));
       
   314 	BtnNewTeam->setText(QApplication::translate("HWForm", "New team", 0, QApplication::UnicodeUTF8));
       
   315 	BtnEditTeam->setText(QApplication::translate("HWForm", "Edit team",	0, QApplication::UnicodeUTF8));
       
   316 	CBResolution->addItem(QApplication::translate("HWForm", "640x480", 0, QApplication::UnicodeUTF8));
       
   317 	CBResolution->addItem(QApplication::translate("HWForm", "800x600", 0, QApplication::UnicodeUTF8));
       
   318 	CBResolution->addItem(QApplication::translate("HWForm", "1024x768",	0, QApplication::UnicodeUTF8));
       
   319 	CBResolution->addItem(QApplication::translate("HWForm", "1280x1024", 0, QApplication::UnicodeUTF8));
       
   320 	CBEnableSound->setText(QApplication::translate("HWForm", "Enable sound", 0,	QApplication::UnicodeUTF8));
       
   321 	CBFullscreen->setText(QApplication::translate("HWForm", "Fullscreen", 0, QApplication::UnicodeUTF8));
       
   322 	label->setText(QApplication::translate("HWForm", "Net nick", 0, QApplication::UnicodeUTF8));
       
   323 	editNetNick->setText(QApplication::translate("HWForm", "unnamed", 0, QApplication::UnicodeUTF8));
       
   324 	BtnSaveOptions->setText(QApplication::translate("HWForm", "Save", 0, QApplication::UnicodeUTF8));
       
   325 	BtnSetupBack->setText(QApplication::translate("HWForm", "Back", 0, QApplication::UnicodeUTF8));
       
   326 	BtnMPBack->setText(QApplication::translate("HWForm", "Back", 0, QApplication::UnicodeUTF8));
       
   327 	BtnPlayDemo->setText(QApplication::translate("HWForm", "Play demo",	0, QApplication::UnicodeUTF8));
       
   328 	BtnDemosBack->setText(QApplication::translate("HWForm", "Back", 0, QApplication::UnicodeUTF8));
       
   329 	BtnNetConnect->setText(QApplication::translate("HWForm", "Connect",	0, QApplication::UnicodeUTF8));
       
   330 	BtnNetBack->setText(QApplication::translate("HWForm", "Back", 0, QApplication::UnicodeUTF8));
       
   331 	BtnNetChatDisconnect->setText(QApplication::translate("HWForm", "Disconnect", 0, QApplication::UnicodeUTF8));
       
   332 	BtnNetChatJoin->setText(QApplication::translate("HWForm", "Join", 0, QApplication::UnicodeUTF8));
       
   333 	BtnNetChatCreate->setText(QApplication::translate("HWForm",	"Create", 0, QApplication::UnicodeUTF8));
       
   334 	BtnNetCFGBack->setText(QApplication::translate("HWForm", "Back", 0,	QApplication::UnicodeUTF8));
       
   335 	BtnNetCFGAddTeam->setText(QApplication::translate("HWForm",	"Add Team", 0, QApplication::UnicodeUTF8));
       
   336 	BtnNetCFGGo->setText(QApplication::translate("HWForm", "Go!", 0, QApplication::UnicodeUTF8));
       
   337 	BtnSinglePlayer->setText(QApplication::translate("HWForm", "Single Player",	0, QApplication::UnicodeUTF8));
       
   338 	BtnMultiplayer->setText(QApplication::translate("HWForm", "Multiplayer", 0,	QApplication::UnicodeUTF8));
       
   339 	BtnSetup->setText(QApplication::translate("HWForm",	"Setup", 0, QApplication::UnicodeUTF8));
       
   340 	BtnExit->setText(QApplication::translate("HWForm", "Exit", 0, QApplication::UnicodeUTF8));
       
   341 	BtnDemos->setText(QApplication::translate("HWForm",	"Demos", 0, QApplication::UnicodeUTF8));
       
   342 	BtnNet->setText(QApplication::translate("HWForm", "Net game", 0, QApplication::UnicodeUTF8));
       
   343 	Q_UNUSED(HWForm);
       
   344 }