void MainWindow::setSpellOverview(const Spell &spell) { ui->listOverview->clear(); ui->listOverview->addItem("Id: " + QString::number(spell.getId())); ui->listOverview->addItem("Name: " + spell.getName()); ui->listOverview->addItem("Rank: " + spell.getRank()); ui->listOverview->addItem("Description: " + spell.getDescription()); ui->listOverview->addItem("Tooltip: " + spell.getTooltip()); ui->listOverview->addItem("School: " + spell.getSchool()); ui->listOverview->addItem("Range: from " + QString::number(spell.getMinRange()) + " to " + QString::number(spell.getMaxRange())); ui->listOverview->addItem("Dispel: " + spell.getDispel()); ui->listOverview->addItem("Mechanic: " + spell.getMechanic()); }
void Spell::copy(const Spell& otherSpell) { setDescription(otherSpell.getDescription()); setType(otherSpell.getType()); setMagicPowerCost(otherSpell.getMagicPowerCost()); }