equal
deleted
inserted
replaced
96 //pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter); |
96 //pageLayout->setAlignment(BtnInfo, Qt::AlignHCenter); |
97 |
97 |
98 BtnExit = addButton(":/res/Exit.png", pageLayout, 4, 0, 1, 1, true); |
98 BtnExit = addButton(":/res/Exit.png", pageLayout, 4, 0, 1, 1, true); |
99 } |
99 } |
100 |
100 |
101 PageEditTeam::PageEditTeam(QWidget* parent, SDLInteraction & sdli) : |
101 PageEditTeam::PageEditTeam(QWidget* parent, SDLInteraction * sdli) : |
102 AbstractPage(parent) |
102 AbstractPage(parent) |
103 { |
103 { |
|
104 mySdli = sdli; |
104 QGridLayout * pageLayout = new QGridLayout(this); |
105 QGridLayout * pageLayout = new QGridLayout(this); |
105 QTabWidget * tbw = new QTabWidget(this); |
106 QTabWidget * tbw = new QTabWidget(this); |
106 QWidget * page1 = new QWidget(this); |
107 QWidget * page1 = new QWidget(this); |
107 QWidget * page2 = new QWidget(this); |
108 QWidget * page2 = new QWidget(this); |
108 tbw->addTab(page1, tr("General")); |
109 tbw->addTab(page1, tr("General")); |
194 CBVoicepack->addItems(list); |
195 CBVoicepack->addItems(list); |
195 } |
196 } |
196 hbox->addWidget(CBVoicepack, 100); |
197 hbox->addWidget(CBVoicepack, 100); |
197 BtnTestSound = addButton(":/res/PlaySound.png", hbox, 1, true); |
198 BtnTestSound = addButton(":/res/PlaySound.png", hbox, 1, true); |
198 hbox->setStretchFactor(BtnTestSound, 1); |
199 hbox->setStretchFactor(BtnTestSound, 1); |
199 connect(BtnTestSound, SIGNAL(clicked()), this, SLOT(testSound(sdli))); |
200 connect(BtnTestSound, SIGNAL(clicked()), this, SLOT(testSound())); |
200 GBTLayout->addLayout(hbox); |
201 GBTLayout->addLayout(hbox); |
201 } |
202 } |
202 |
203 |
203 GBoxFort = new QGroupBox(this); |
204 GBoxFort = new QGroupBox(this); |
204 GBoxFort->setTitle(QGroupBox::tr("Fort")); |
205 GBoxFort->setTitle(QGroupBox::tr("Fort")); |
285 { |
286 { |
286 QPixmap pix(datadir->absolutePath() + "/Forts/" + fortname + "L.png"); |
287 QPixmap pix(datadir->absolutePath() + "/Forts/" + fortname + "L.png"); |
287 FortPreview->setPixmap(pix); |
288 FortPreview->setPixmap(pix); |
288 } |
289 } |
289 |
290 |
290 void PageEditTeam::testSound(SDLInteraction &sdli) |
291 void PageEditTeam::testSound() |
291 { |
292 { |
292 Mix_Music *sound; |
293 Mix_Music *sound; |
293 QDir tmpdir; |
294 QDir tmpdir; |
294 sdli.SDLMusicInit(); |
295 mySdli->SDLMusicInit(); |
295 |
296 |
296 tmpdir.cd(datadir->absolutePath()); |
297 tmpdir.cd(datadir->absolutePath()); |
297 tmpdir.cd("Sounds/voices"); |
298 tmpdir.cd("Sounds/voices"); |
298 tmpdir.cd(CBVoicepack->currentText()); |
299 tmpdir.cd(CBVoicepack->currentText()); |
299 QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files); |
300 QStringList list = tmpdir.entryList(QStringList() << "Illgetyou.ogg" << "Incoming.ogg" << "Stupid.ogg" << "Coward.ogg" << "Firstblood.ogg", QDir::Files); |