58 pageLayout->setMargin(25); |
58 pageLayout->setMargin(25); |
59 pageLayout->setColumnStretch(0, 1); |
59 pageLayout->setColumnStretch(0, 1); |
60 pageLayout->setColumnStretch(1, 2); |
60 pageLayout->setColumnStretch(1, 2); |
61 pageLayout->setColumnStretch(2, 1); |
61 pageLayout->setColumnStretch(2, 1); |
62 |
62 |
63 BtnSinglePlayer = addButton(QPushButton::tr("Single Player"), pageLayout, 0, 1); |
63 BtnSinglePlayer = addButton(tr("Single Player"), pageLayout, 0, 1); |
64 BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
64 BtnSinglePlayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
65 |
65 |
66 BtnMultiplayer = addButton(tr("Multiplayer"), pageLayout, 1, 1); |
66 BtnMultiplayer = addButton(tr("Multiplayer"), pageLayout, 1, 1); |
67 BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
67 BtnMultiplayer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
68 |
68 |
69 BtnNet = addButton("Net game", pageLayout, 2, 1); |
69 BtnNet = addButton(tr("Net game"), pageLayout, 2, 1); |
70 BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
70 BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
71 |
71 |
72 BtnLoad = addButton("Saved games", pageLayout, 3, 1); |
72 BtnLoad = addButton(tr("Saved games"), pageLayout, 3, 1); |
73 BtnLoad->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
73 BtnLoad->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
74 |
74 |
75 BtnDemos = addButton("Demos", pageLayout, 4, 1); |
75 BtnDemos = addButton(tr("Demos"), pageLayout, 4, 1); |
76 BtnDemos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
76 BtnDemos->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
77 |
77 |
78 BtnSetup = addButton("Setup", pageLayout, 5, 1); |
78 BtnSetup = addButton(tr("Setup"), pageLayout, 5, 1); |
79 BtnSetup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
79 BtnSetup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
80 |
80 |
81 BtnInfo = addButton("About", pageLayout, 6, 1); |
81 BtnInfo = addButton(tr("About"), pageLayout, 6, 1); |
82 BtnInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
82 BtnInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
83 |
83 |
84 BtnExit = addButton("Exit", pageLayout, 7, 1); |
84 BtnExit = addButton(tr("Exit"), pageLayout, 7, 1); |
85 BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
85 BtnExit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
86 } |
86 } |
87 |
87 |
88 PageSimpleGame::PageSimpleGame(QWidget* parent) : |
88 PageSimpleGame::PageSimpleGame(QWidget* parent) : |
89 AbstractPage(parent) |
89 AbstractPage(parent) |
92 QHBoxLayout * topLayout = new QHBoxLayout(); |
92 QHBoxLayout * topLayout = new QHBoxLayout(); |
93 QHBoxLayout * bottomLayout = new QHBoxLayout(); |
93 QHBoxLayout * bottomLayout = new QHBoxLayout(); |
94 pageLayout->addLayout(topLayout, 100); |
94 pageLayout->addLayout(topLayout, 100); |
95 pageLayout->addLayout(bottomLayout, 0); |
95 pageLayout->addLayout(bottomLayout, 0); |
96 |
96 |
97 BtnBack = addButton("Back", bottomLayout, 100); |
97 BtnBack = addButton(tr("Back"), bottomLayout, 100); |
98 bottomLayout->addStretch(100); |
98 bottomLayout->addStretch(100); |
99 |
99 |
100 BtnSimpleGame = addButton("Simple Game", bottomLayout, 100); |
100 BtnSimpleGame = addButton(tr("Simple Game"), bottomLayout, 100); |
101 |
101 |
102 gameCFG = new GameCFGWidget(this); |
102 gameCFG = new GameCFGWidget(this); |
103 topLayout->addStretch(100); |
103 topLayout->addStretch(100); |
104 topLayout->addWidget(gameCFG); |
104 topLayout->addWidget(gameCFG); |
105 topLayout->addStretch(100); |
105 topLayout->addStretch(100); |
139 HHNameEdit[i]->setMaxLength(15); |
139 HHNameEdit[i]->setMaxLength(15); |
140 GBHLayout->addWidget(HHNameEdit[i]); |
140 GBHLayout->addWidget(HHNameEdit[i]); |
141 } |
141 } |
142 pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1); |
142 pageLayout->addWidget(GBoxHedgehogs, 1, 0, 2, 1); |
143 |
143 |
144 BtnTeamDiscard = addButton("Discard", pageLayout, 4, 0); |
144 BtnTeamDiscard = addButton(tr("Discard"), pageLayout, 4, 0); |
145 |
145 |
146 GBoxBinds = new QGroupBox(this); |
146 GBoxBinds = new QGroupBox(this); |
147 GBoxBinds->setTitle(QGroupBox::tr("Key binds")); |
147 GBoxBinds->setTitle(QGroupBox::tr("Key binds")); |
148 QGridLayout * GBBLayout = new QGridLayout(GBoxBinds); |
148 QGridLayout * GBBLayout = new QGridLayout(GBoxBinds); |
149 BindsBox = new QToolBox(GBoxBinds); |
149 BindsBox = new QToolBox(GBoxBinds); |
224 FortPreview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
224 FortPreview->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); |
225 FortPreview->setPixmap(QPixmap()); |
225 FortPreview->setPixmap(QPixmap()); |
226 GBFLayout->addWidget(FortPreview, 1, 0); |
226 GBFLayout->addWidget(FortPreview, 1, 0); |
227 pageLayout->addWidget(GBoxFort, 2, 2, 1, 2); |
227 pageLayout->addWidget(GBoxFort, 2, 2, 1, 2); |
228 |
228 |
229 BtnTeamSave = addButton("Save", pageLayout, 4, 2, 1, 2); |
229 BtnTeamSave = addButton(tr("Save"), pageLayout, 4, 2, 1, 2); |
230 |
230 |
231 QDir tmpdir; |
231 QDir tmpdir; |
232 tmpdir.cd(datadir->absolutePath()); |
232 tmpdir.cd(datadir->absolutePath()); |
233 tmpdir.cd("Forts"); |
233 tmpdir.cd("Forts"); |
234 tmpdir.setFilter(QDir::Files); |
234 tmpdir.setFilter(QDir::Files); |
267 PageMultiplayer::PageMultiplayer(QWidget* parent) : |
267 PageMultiplayer::PageMultiplayer(QWidget* parent) : |
268 AbstractPage(parent) |
268 AbstractPage(parent) |
269 { |
269 { |
270 QGridLayout * pageLayout = new QGridLayout(this); |
270 QGridLayout * pageLayout = new QGridLayout(this); |
271 |
271 |
272 BtnBack = addButton("Back", pageLayout, 1, 0); |
272 BtnBack = addButton(tr("Back"), pageLayout, 1, 0); |
273 |
273 |
274 gameCFG = new GameCFGWidget(this); |
274 gameCFG = new GameCFGWidget(this); |
275 pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
275 pageLayout->addWidget(gameCFG, 0, 0, 1, 2); |
276 |
276 |
277 teamsSelect = new TeamSelWidget(this); |
277 teamsSelect = new TeamSelWidget(this); |
278 pageLayout->addWidget(teamsSelect, 0, 2, 1, 2); |
278 pageLayout->addWidget(teamsSelect, 0, 2, 1, 2); |
279 |
279 |
280 BtnStartMPGame = addButton("Start", pageLayout, 1, 3); |
280 BtnStartMPGame = addButton(tr("Start"), pageLayout, 1, 3); |
281 } |
281 } |
282 |
282 |
283 PageOptions::PageOptions(QWidget* parent) : |
283 PageOptions::PageOptions(QWidget* parent) : |
284 AbstractPage(parent) |
284 AbstractPage(parent) |
285 { |
285 { |
298 groupBox->setTitle(QGroupBox::tr("Teams")); |
298 groupBox->setTitle(QGroupBox::tr("Teams")); |
299 pageLayout->addWidget(groupBox, 0, 0, 1, 3); |
299 pageLayout->addWidget(groupBox, 0, 0, 1, 3); |
300 |
300 |
301 QGridLayout * GBTlayout = new QGridLayout(groupBox); |
301 QGridLayout * GBTlayout = new QGridLayout(groupBox); |
302 |
302 |
303 BtnNewTeam = addButton("New team", GBTlayout, 0, 0); |
303 BtnNewTeam = addButton(tr("New team"), GBTlayout, 0, 0); |
304 |
304 |
305 CBTeamName = new QComboBox(groupBox); |
305 CBTeamName = new QComboBox(groupBox); |
306 GBTlayout->addWidget(CBTeamName, 0, 1); |
306 GBTlayout->addWidget(CBTeamName, 0, 1); |
307 |
307 |
308 BtnEditTeam = addButton("Edit team", GBTlayout, 0, 2); |
308 BtnEditTeam = addButton(tr("Edit team"), GBTlayout, 0, 2); |
309 |
309 |
310 AGGroupBox = new QGroupBox(this); |
310 AGGroupBox = new QGroupBox(this); |
311 AGGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
311 AGGroupBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
312 AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
312 AGGroupBox->setTitle(QGroupBox::tr("Audio/Graphic options")); |
313 pageLayout->addWidget(AGGroupBox, 2, 1); |
313 pageLayout->addWidget(AGGroupBox, 2, 1); |
347 GBAlayout->addWidget(CBAltDamage); |
347 GBAlayout->addWidget(CBAltDamage); |
348 |
348 |
349 fpsedit = new FPSEdit(AGGroupBox); |
349 fpsedit = new FPSEdit(AGGroupBox); |
350 GBAfpslayout->addWidget(fpsedit); |
350 GBAfpslayout->addWidget(fpsedit); |
351 |
351 |
352 BtnSaveOptions = addButton("Save", pageLayout, 4, 2); |
352 BtnSaveOptions = addButton(tr("Save"), pageLayout, 4, 2); |
353 |
353 |
354 BtnBack = addButton("Back", pageLayout, 4, 0); |
354 BtnBack = addButton(tr("Back"), pageLayout, 4, 0); |
355 |
355 |
356 QGroupBox* groupWeapons = new QGroupBox(this); |
356 QGroupBox* groupWeapons = new QGroupBox(this); |
357 groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
357 groupWeapons->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); |
358 groupWeapons->setTitle(QGroupBox::tr("Weapons")); |
358 groupWeapons->setTitle(QGroupBox::tr("Weapons")); |
359 pageLayout->addWidget(groupWeapons, 1, 0, 1, 3); |
359 pageLayout->addWidget(groupWeapons, 1, 0, 1, 3); |
360 QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons); |
360 QGridLayout * WeaponsLayout = new QGridLayout(groupWeapons); |
361 |
361 |
362 WeaponsButt = addButton("Weapons scheme", WeaponsLayout, 0, 0); |
362 WeaponsButt = addButton(tr("Weapons set"), WeaponsLayout, 0, 0); |
363 WeaponsName = new QComboBox(this); |
363 WeaponsName = new QComboBox(this); |
364 WeaponsLayout->addWidget(WeaponsName, 0, 1); |
364 WeaponsLayout->addWidget(WeaponsName, 0, 1); |
365 WeaponEdit = addButton("Edit", WeaponsLayout, 0, 2); |
365 WeaponEdit = addButton(tr("Edit"), WeaponsLayout, 0, 2); |
366 |
366 |
367 NNGroupBox = new QGroupBox(this); |
367 NNGroupBox = new QGroupBox(this); |
368 NNGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
368 NNGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); |
369 NNGroupBox->setTitle(QGroupBox::tr("Net options")); |
369 NNGroupBox->setTitle(QGroupBox::tr("Net options")); |
370 pageLayout->addWidget(NNGroupBox, 2, 2); |
370 pageLayout->addWidget(NNGroupBox, 2, 2); |
662 pageLayout->setMargin(25); |
662 pageLayout->setMargin(25); |
663 |
663 |
664 pWeapons=new SelWeaponWidget(20, this); |
664 pWeapons=new SelWeaponWidget(20, this); |
665 pageLayout->addWidget(pWeapons, 0, 0, 1, 4); |
665 pageLayout->addWidget(pWeapons, 0, 0, 1, 4); |
666 |
666 |
667 BtnBack = addButton("Back", pageLayout, 1, 0); |
667 BtnBack = addButton(tr("Back"), pageLayout, 1, 0); |
668 BtnDefault = addButton("Default", pageLayout, 1, 1); |
668 BtnDefault = addButton(tr("Default"), pageLayout, 1, 1); |
669 BtnDelete = addButton("Delete", pageLayout, 1, 2); |
669 BtnDelete = addButton(tr("Delete"), pageLayout, 1, 2); |
670 BtnSave = addButton("Save", pageLayout, 1, 3); |
670 BtnSave = addButton(tr("Save"), pageLayout, 1, 3); |
671 } |
671 } |
672 |
672 |
673 PageInGame::PageInGame(QWidget* parent) : |
673 PageInGame::PageInGame(QWidget* parent) : |
674 AbstractPage(parent) |
674 AbstractPage(parent) |
675 { |
675 { |