# HG changeset patch # User nemo # Date 1255755425 0 # Node ID effafd586a4e0523f334e8c7e693f9a1301f8675 # Parent 51d3f4b6293a95281e8016a2d5e25532d694328b pass in sdli diff -r 51d3f4b6293a -r effafd586a4e QTfrontend/pages.cpp --- a/QTfrontend/pages.cpp Sat Oct 17 01:28:49 2009 +0000 +++ b/QTfrontend/pages.cpp Sat Oct 17 04:57:05 2009 +0000 @@ -98,9 +98,10 @@ BtnExit = addButton(":/res/Exit.png", pageLayout, 4, 0, 1, 1, true); } -PageEditTeam::PageEditTeam(QWidget* parent, SDLInteraction & sdli) : +PageEditTeam::PageEditTeam(QWidget* parent, SDLInteraction * sdli) : AbstractPage(parent) { + mySdli = sdli; QGridLayout * pageLayout = new QGridLayout(this); QTabWidget * tbw = new QTabWidget(this); QWidget * page1 = new QWidget(this); @@ -196,7 +197,7 @@ hbox->addWidget(CBVoicepack, 100); BtnTestSound = addButton(":/res/PlaySound.png", hbox, 1, true); hbox->setStretchFactor(BtnTestSound, 1); - connect(BtnTestSound, SIGNAL(clicked()), this, SLOT(testSound(sdli))); + connect(BtnTestSound, SIGNAL(clicked()), this, SLOT(testSound())); GBTLayout->addLayout(hbox); } @@ -287,11 +288,11 @@ FortPreview->setPixmap(pix); } -void PageEditTeam::testSound(SDLInteraction &sdli) +void PageEditTeam::testSound() { Mix_Music *sound; QDir tmpdir; - sdli.SDLMusicInit(); + mySdli->SDLMusicInit(); tmpdir.cd(datadir->absolutePath()); tmpdir.cd("Sounds/voices"); diff -r 51d3f4b6293a -r effafd586a4e QTfrontend/pages.h --- a/QTfrontend/pages.h Sat Oct 17 01:28:49 2009 +0000 +++ b/QTfrontend/pages.h Sat Oct 17 04:57:05 2009 +0000 @@ -148,7 +148,7 @@ Q_OBJECT public: - PageEditTeam(QWidget* parent, SDLInteraction & sdli); + PageEditTeam(QWidget* parent, SDLInteraction * sdli); QSignalMapper* signalMapper; QGroupBox *GBoxHedgehogs; QGroupBox *GBoxTeam; @@ -170,11 +170,14 @@ QComboBox * CBBind[BINDS_NUMBER]; QPushButton * randTeamButton; +private: + SDLInteraction * mySdli; + public slots: void CBFort_activated(const QString & gravename); private slots: - void testSound(SDLInteraction & sdli); + void testSound(); }; class PageMultiplayer : public AbstractPage diff -r 51d3f4b6293a -r effafd586a4e QTfrontend/ui_hwform.cpp --- a/QTfrontend/ui_hwform.cpp Sat Oct 17 01:28:49 2009 +0000 +++ b/QTfrontend/ui_hwform.cpp Sat Oct 17 04:57:05 2009 +0000 @@ -57,7 +57,7 @@ { Pages = new QStackedLayout(Parent); - pageEditTeam = new PageEditTeam(Parent, HWForm->sdli); + pageEditTeam = new PageEditTeam(Parent, &HWForm->sdli); Pages->addWidget(pageEditTeam); pageOptions = new PageOptions();