"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:
RickyRister 2024-12-12 05:03:42 -08:00 committed by GitHub
parent 315cbc0925
commit e9b78c1c59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 130 additions and 23 deletions

View 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