Permit use of up/down keys to increment/decrement counter value; Fix #3618 (#3646)

* Fix #3618

* clanfigy me softly

* fix unused var and params

* Frce the dialog being modal; ensure self deletion

* More qt-like behavior

* Restore dialogSemaphore logic
This commit is contained in:
ctrlaltca 2019-03-10 22:22:19 +01:00 committed by GitHub
parent 389f7fdc25
commit 0326f0d4c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 7 deletions

View file

@ -2,10 +2,13 @@
#define COUNTER_H
#include <QGraphicsItem>
#include <QInputDialog>
class Player;
class QMenu;
class QAction;
class QKeyEvent;
class QMenu;
class QString;
class AbstractCounter : public QObject, public QGraphicsItem
{
@ -74,4 +77,15 @@ public:
}
};
class AbstractCounterDialog : public QInputDialog
{
Q_OBJECT
public:
AbstractCounterDialog(const QString &name, const QString &value);
protected:
bool eventFilter(QObject *obj, QEvent *event);
void changeValue(int diff);
};
#endif