summaryrefslogtreecommitdiff
path: root/muse2/awl/sigspinbox.cpp
blob: 3f1bf1f4d12d9a291765a734cc486df0551ad893 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
}