mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-26 08:33:54 -07:00
"Play top cards until" action now has option for number of hits (#5229)
* create new dlg window * get thing to work * move validation into dlg * remove nodiscard I'll revert this if someone else complains
This commit is contained in:
parent
315cbc0925
commit
e9b78c1c59
5 changed files with 130 additions and 23 deletions
28
cockatrice/src/dialogs/dlg_move_top_cards_until.h
Normal file
28
cockatrice/src/dialogs/dlg_move_top_cards_until.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef DLG_MOVE_TOP_CARDS_UNTIL_H
|
||||
#define DLG_MOVE_TOP_CARDS_UNTIL_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QLabel>
|
||||
#include <QLineEdit>
|
||||
#include <QSpinBox>
|
||||
#include <QString>
|
||||
|
||||
class DlgMoveTopCardsUntil : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
QLabel *exprLabel, *numberOfHitsLabel;
|
||||
QLineEdit *exprEdit;
|
||||
QSpinBox *numberOfHitsEdit;
|
||||
QDialogButtonBox *buttonBox;
|
||||
|
||||
void validateAndAccept();
|
||||
|
||||
public:
|
||||
explicit DlgMoveTopCardsUntil(QWidget *parent = nullptr, QString expr = QString(), uint numberOfHits = 1);
|
||||
QString getExpr() const;
|
||||
uint getNumberOfHits() const;
|
||||
};
|
||||
|
||||
#endif // DLG_MOVE_TOP_CARDS_UNTIL_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue