void Preferences::readSettings() { /* Load protocol version & team number */ setProtocol (Settings::get ("Protocol", 0).toInt()); setTeamNumber (Settings::get ("Team", 0).toInt()); m_teamNumber->setValue (Settings::get ("Team", 0).toInt()); m_protocols->setCurrentIndex (Settings::get ("Protocol", 0).toInt()); /* Load the practice timings into the UI */ loadPracticeValues(); }
void Preferences::readSettings() { /* Load saved values in widgets */ m_teamNumber->setValue (Settings::get ("Team", 0).toInt()); m_protocols->setCurrentIndex (Settings::get ("Protocol", 0).toInt()); /* Redundant but safer, configure DS again directly */ setProtocol (m_protocols->currentIndex()); setTeamNumber (m_teamNumber->value()); /* Load the practice timings into the UI */ loadPracticeValues(); }
BasePlayer::BasePlayer(Sint32 number, const std::string& nname, Sint32 teamNumber, PlayerType type) { init(); assert(number>=0); assert(number<Team::MAX_COUNT); assert(teamNumber>=0); assert(teamNumber<Team::MAX_COUNT); assert(nname.size()); setNumber(number); setTeamNumber(teamNumber); name=nname; this->type=type; };