Example #1
0
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: noteOn((*reinterpret_cast< const int(*)>(_a[1]))); break;
        case 1: noteOff((*reinterpret_cast< const int(*)>(_a[1]))); break;
        case 2: pauseActive((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: setChannelChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 4: setVelocityChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 5: setBase_octaveChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 6: setTransposeChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 7: setEditEnable((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 8: editChord((*reinterpret_cast< QPoint(*)>(_a[1]))); break;
        case 9: on_actionOpenMidi_triggered(); break;
        case 10: on_actionOpen_triggered(); break;
        case 11: on_actionPlayMidi_triggered(); break;
        case 12: on_btn_9_clicked(); break;
        case 13: on_btn_8_clicked(); break;
        case 14: on_btn_7_clicked(); break;
        case 15: on_btn_6_clicked(); break;
        case 16: on_btn_5_clicked(); break;
        case 17: on_btn_4_clicked(); break;
        case 18: on_btn_3_clicked(); break;
        case 19: on_btn_2_clicked(); break;
        case 20: on_btn_1_clicked(); break;
        case 21: on_btn_0_clicked(); break;
        case 22: on_chordAnalyse_triggered(); break;
        case 23: on_redoAction_triggered(); break;
        case 24: on_undoAction_triggered(); break;
        case 25: on_actionSave_triggered(); break;
        case 26: on_actionMIDI_controller_triggered((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 27: saveStaff(); break;
        case 28: loadStaff((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 29: processFinished((*reinterpret_cast< int(*)>(_a[1])),(*reinterpret_cast< QProcess::ExitStatus(*)>(_a[2]))); break;
        default: ;
        }
        _id -= 30;
    }
    return _id;
}
Example #2
0
void CalcInterface::keyReleaseEvent(QKeyEvent *event)
{

    switch (event->key())
    {
    case Qt::Key_0:
        emit on_btn_0_clicked();
        break;
    case Qt::Key_1:
        emit on_btn_1_clicked();
        break;
    case Qt::Key_2:
        emit on_btn_2_clicked();
        break;
    case Qt::Key_3:
        emit on_btn_3_clicked();
        break;
    case Qt::Key_4:
        emit on_btn_4_clicked();
        break;
    case Qt::Key_5:
        emit on_btn_5_clicked();
        break;
    case Qt::Key_6:
        emit on_btn_6_clicked();
        break;
    case Qt::Key_7:
        emit on_btn_7_clicked();
        break;
    case Qt::Key_8:
        emit on_btn_8_clicked();
        break;
    case Qt::Key_9:
        emit on_btn_9_clicked();
        break;
    case Qt::Key_Plus:
        emit on_btn_plus_clicked();
        break;
    case Qt::Key_Minus:
        emit on_btn_minus_clicked();
        break;
    case Qt::Key_Slash:
        emit on_btn_div_clicked();
        break;
    case Qt::Key_Asterisk:
        emit on_btn_mul_clicked();
        break;
    case Qt::Key_Enter:
        emit on_btn_eq_clicked();
        break;
    case Qt::Key_Backspace:
        emit on_btn_backspace_clicked();
        break;
    case Qt::Key_Comma:
    case Qt::Key_Period:
        emit on_btn_dot_clicked();
        break;
    case Qt::Key_Escape:
        emit on_btn_c_clicked();
        break;
    case Qt::Key_I:
        emit on_btn_re_im_clicked();
        break;
    default:
        //QMessageBox box;
        //box.about(0, "key", "Result: " + QString::number( event->key()));
        ;
    }
}