void PageEditTeam::connectSignals() { connect(this, SIGNAL(pageLeave()), this, SLOT(saveTeam())); signalMapper1 = new QSignalMapper(this); signalMapper2 = new QSignalMapper(this); connect(signalMapper1, SIGNAL(mapped(int)), this, SLOT(fixHHname(int))); connect(signalMapper2, SIGNAL(mapped(int)), this, SLOT(setRandomHogName(int))); for(int i = 0; i < HEDGEHOGS_PER_TEAM; i++) { connect(HHNameEdit[i], SIGNAL(editingFinished()), signalMapper1, SLOT(map())); signalMapper1->setMapping(HHNameEdit[i], i); connect(btnRandomHogName[i], SIGNAL(clicked()), signalMapper2, SLOT(map())); signalMapper2->setMapping(btnRandomHogName[i], i); } connect(btnRandomTeam, SIGNAL(clicked()), this, SLOT(setRandomTeam())); connect(btnRandomNames, SIGNAL(clicked()), this, SLOT(setRandomHogNames())); connect(btnRandomHats, SIGNAL(clicked()), this, SLOT(setRandomHats())); connect(CBTeamLvl, SIGNAL(currentIndexChanged(const int)), this, SLOT(CBTeamLvl_activated(const int))); connect(btnRandomTeamName, SIGNAL(clicked()), this, SLOT(setRandomTeamName())); connect(btnRandomGrave, SIGNAL(clicked()), this, SLOT(setRandomGrave())); connect(btnRandomFlag, SIGNAL(clicked()), this, SLOT(setRandomFlag())); connect(btnRandomVoice, SIGNAL(clicked()), this, SLOT(setRandomVoice())); connect(btnRandomFort, SIGNAL(clicked()), this, SLOT(setRandomFort())); connect(btnTestSound, SIGNAL(clicked()), this, SLOT(testSound())); connect(CBFort, SIGNAL(currentIndexChanged(const int)), this, SLOT(CBFort_activated(const int))); }
void AbstractPage::triggerPageLeave() { emit pageLeave(); }