summaryrefslogtreecommitdiff
path: root/muse2/awl/sigspinbox.cpp
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2011-10-04 18:58:03 +0000
committerRobert Jonsson <spamatica@gmail.com>2011-10-04 18:58:03 +0000
commitad507206af844ea5f9ca0b89726a92e159fc9c8c (patch)
tree7ab0904cf67ba9000ca0e1c751ced32d068f7782 /muse2/awl/sigspinbox.cpp
parentf3313cc78e637ec9bc11efce5eb943434da93416 (diff)
fixes to SigEdit
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);
+}