From ad507206af844ea5f9ca0b89726a92e159fc9c8c Mon Sep 17 00:00:00 2001 From: Robert Jonsson Date: Tue, 4 Oct 2011 18:58:03 +0000 Subject: fixes to SigEdit --- muse2/awl/sigspinbox.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 muse2/awl/sigspinbox.cpp (limited to 'muse2/awl/sigspinbox.cpp') 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 +#include + +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); +} -- cgit v1.2.3