summaryrefslogtreecommitdiff
path: root/muse2/awl/sigspinbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'muse2/awl/sigspinbox.cpp')
-rw-r--r--muse2/awl/sigspinbox.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/muse2/awl/sigspinbox.cpp b/muse2/awl/sigspinbox.cpp
new file mode 100644
index 00000000..3f1bf1f4
--- /dev/null
+++ b/muse2/awl/sigspinbox.cpp
@@ -0,0 +1,24 @@
+#include "sigspinbox.h"
+#include <QKeyEvent>
+#include <stdio.h>
+
+SigSpinBox::SigSpinBox(QWidget *parent) :
+ QSpinBox(parent)
+{
+}
+void SigSpinBox::keyPressEvent(QKeyEvent*ev)
+{
+ switch (ev->key()) {
+ case Qt::Key_Return:
+ emit returnPressed();
+ break;
+ case Qt::Key_Left:
+ case Qt::Key_Right:
+ case Qt::Key_Slash:
+ emit moveFocus();
+ break;
+ default:
+ break;
+ }
+ QSpinBox::keyPressEvent(ev);
+}