mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-13 22:12:15 -07:00
* move message_log_widget to game * move files * update headers * fix cmakelists * oracle fixes * split implementation out to cpp * fix recursive import * fix main file * format
This commit is contained in:
parent
f484c98152
commit
17dcaf9afa
337 changed files with 728 additions and 721 deletions
65
cockatrice/src/game/dialogs/dlg_create_token.h
Normal file
65
cockatrice/src/game/dialogs/dlg_create_token.h
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
#ifndef DLG_CREATETOKEN_H
|
||||
#define DLG_CREATETOKEN_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QModelIndex>
|
||||
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class QComboBox;
|
||||
class QCheckBox;
|
||||
class QPushButton;
|
||||
class QRadioButton;
|
||||
class QCloseEvent;
|
||||
class QTreeView;
|
||||
class DeckList;
|
||||
class CardDatabaseModel;
|
||||
class TokenDisplayModel;
|
||||
class CardInfoPictureWidget;
|
||||
|
||||
struct TokenInfo
|
||||
{
|
||||
QString name;
|
||||
QString color;
|
||||
QString pt;
|
||||
QString annotation;
|
||||
bool destroy = true;
|
||||
bool faceDown = false;
|
||||
QString providerId;
|
||||
};
|
||||
|
||||
class DlgCreateToken : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DlgCreateToken(const QStringList &_predefinedTokens, QWidget *parent = nullptr);
|
||||
TokenInfo getTokenInfo() const;
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event) override;
|
||||
private slots:
|
||||
void faceDownCheckBoxToggled(bool checked);
|
||||
void tokenSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous);
|
||||
void updateSearch(const QString &search);
|
||||
void actChooseTokenFromAll(bool checked);
|
||||
void actChooseTokenFromDeck(bool checked);
|
||||
void actOk();
|
||||
void actReject();
|
||||
|
||||
private:
|
||||
CardDatabaseModel *cardDatabaseModel;
|
||||
TokenDisplayModel *cardDatabaseDisplayModel;
|
||||
QStringList predefinedTokens;
|
||||
QLabel *nameLabel, *colorLabel, *ptLabel, *annotationLabel;
|
||||
QComboBox *colorEdit;
|
||||
QLineEdit *nameEdit, *ptEdit, *annotationEdit;
|
||||
QCheckBox *destroyCheckBox;
|
||||
QCheckBox *faceDownCheckBox;
|
||||
QRadioButton *chooseTokenFromAllRadioButton, *chooseTokenFromDeckRadioButton;
|
||||
CardInfoPictureWidget *pic;
|
||||
QTreeView *chooseTokenView;
|
||||
|
||||
void updateSearchFieldWithoutUpdatingFilter(const QString &newValue) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue