mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-13 22:12:15 -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
|
|
@ -17,19 +17,24 @@ class CardDatabaseModel;
|
|||
class TokenDisplayModel;
|
||||
class CardInfoPictureWidget;
|
||||
|
||||
struct TokenInfo
|
||||
{
|
||||
QString name;
|
||||
QString color;
|
||||
QString pt;
|
||||
QString annotation;
|
||||
bool destroy = true;
|
||||
};
|
||||
|
||||
class DlgCreateToken : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgCreateToken(const QStringList &_predefinedTokens, QWidget *parent = nullptr);
|
||||
QString getName() const;
|
||||
QString getColor() const;
|
||||
QString getPT() const;
|
||||
QString getAnnotation() const;
|
||||
bool getDestroy() const;
|
||||
TokenInfo getTokenInfo() const;
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
private slots:
|
||||
void tokenSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void updateSearch(const QString &search);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue