mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Refactor: move last token info into struct (#5808)
* add override * refactor token info into struct * correct default destroy value
This commit is contained in:
parent
0bd53d6dc7
commit
56bbd8a172
4 changed files with 45 additions and 56 deletions
|
|
@ -224,27 +224,11 @@ void DlgCreateToken::actReject()
|
|||
reject();
|
||||
}
|
||||
|
||||
QString DlgCreateToken::getName() const
|
||||
TokenInfo DlgCreateToken::getTokenInfo() const
|
||||
{
|
||||
return nameEdit->text();
|
||||
}
|
||||
|
||||
QString DlgCreateToken::getColor() const
|
||||
{
|
||||
return QString(colorEdit->itemData(colorEdit->currentIndex()).toChar());
|
||||
}
|
||||
|
||||
QString DlgCreateToken::getPT() const
|
||||
{
|
||||
return ptEdit->text();
|
||||
}
|
||||
|
||||
QString DlgCreateToken::getAnnotation() const
|
||||
{
|
||||
return annotationEdit->text();
|
||||
}
|
||||
|
||||
bool DlgCreateToken::getDestroy() const
|
||||
{
|
||||
return destroyCheckBox->isChecked();
|
||||
return {.name = nameEdit->text(),
|
||||
.color = colorEdit->itemData(colorEdit->currentIndex()).toString(),
|
||||
.pt = ptEdit->text(),
|
||||
.annotation = annotationEdit->text(),
|
||||
.destroy = destroyCheckBox->isChecked()};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue