FindPathsFromXtoY::FindPathsFromXtoY(Maze& mazeT, Cell* start, Cell* finalC) { this -> mazeTable = mazeT; this -> startCell = start; this -> finalCell = finalC; fillMoves(); vectorIndex = 0; findAllThePaths(mazeT,start,finalC); }
void PokeEdit::toggleHackmons() { fillMoves(); ui->levelSettings->fillAbilities(); ui->levelSettings->updateAll(); ui->evbox->changeMaximumEv(hackMons); if (!PokeEdit::hackMons) { poke().runCheck(); ui->evbox->updateAll(); } }
PokeEdit::PokeEdit(TeamBuilderWidget *master, PokeTeam *poke, QAbstractItemModel *pokeModel, QAbstractItemModel *itemsModel, QAbstractItemModel *natureModel) : ui(new Ui::PokeEdit), pokemonModel(pokeModel), m_poke(poke), master(master) { ui->setupUi(this); ui->itemSprite->raise(); ui->item->setModel(itemsModel); ui->nature->setModel(natureModel); ui->levelSettings->setPoke(poke); ui->evbox->setPoke(poke); ui->ivbox->setPoke(poke); if (0) { master->getDock(EVDock)->setWidget(ui->evbox); master->getDock(IVDock)->setWidget(ui->ivbox); master->getDock(LevelDock)->setWidget(ui->levelSettings); master->getDock(MoveDock)->setWidget(ui->moveContainer); } else { QCloseDockWidget *hi = new QCloseDockWidget(tr("Advanced"), this); hi->setObjectName("AdvancedTab"); hi->setWidget(ui->ivbox); hi->setFeatures(QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable); ui->horizontalMove->addWidget(hi); if (advancedWindowClosed) { hi->close(); } connect(hi, SIGNAL(closed()), SIGNAL(closeAdvanced())); // QDockWidget *hi2 = new QDockWidget(tr("Level"), this); // hi2->setWidget(ui->levelSettings); // hi2->setFeatures(QDockWidget::DockWidgetClosable|QDockWidget::DockWidgetMovable); // ui->horizontalPoke->addWidget(hi2); } QSortFilterProxyModel *pokeFilter = new QSortFilterProxyModel(this); pokeFilter->setFilterRegExp("."); pokeFilter->setSourceModel(pokemonModel); QCompleter *completer = new QCompleter(pokeFilter, ui->nickname); completer->setCompletionColumn(1); completer->setCompletionRole(Qt::DisplayRole); completer->setCaseSensitivity(Qt::CaseInsensitive); completer->setCompletionMode(QCompleter::PopupCompletion); ui->nickname->setCompleter(completer); connect(completer, SIGNAL(activated(QString)), SLOT(setNum(QString))); /* 20 characters for the name. Longest name: Vivillon-Archipelago = 20 characters */ ui->nickname->setValidator(new QNickValidator(ui->nickname, 20)); fillMoves(); connect(ui->levelSettings, SIGNAL(levelUpdated()), this, SLOT(updateStats())); connect(ui->levelSettings, SIGNAL(levelUpdated()), ui->ivbox, SLOT(updateStats())); connect(ui->levelSettings, SIGNAL(genderUpdated()), this, SLOT(updatePicture())); connect(ui->levelSettings, SIGNAL(genderUpdated()), this, SLOT(updateGender())); connect(ui->ivbox, SIGNAL(genderUpdated()), SLOT(updateGender())); connect(ui->ivbox, SIGNAL(genderUpdated()), ui->levelSettings, SLOT(updateGender())); connect(ui->ivbox, SIGNAL(shinyUpdated()), SLOT(updatePicture())); connect(ui->happiness, SIGNAL(valueChanged(int)), this, SLOT(changeHappiness(int))); connect(ui->nature, SIGNAL(currentIndexChanged(int)), this, SLOT(changeNature(int))); connect(ui->item, SIGNAL(currentIndexChanged(QString)), this, SLOT(changeItem(QString))); connect(ui->evbox, SIGNAL(natureChanged(int)), this, SLOT(setNature(int))); connect(ui->evbox, SIGNAL(natureBoostChanged()), ui->ivbox, SLOT(updateStats())); connect(ui->ivbox, SIGNAL(statsUpdated()), ui->evbox, SLOT(updateEVs())); updateAll(); }
FindPathsFromXtoY::FindPathsFromXtoY() { fillMoves(); vectorIndex = 0; }