Exemple #1
0
void MPSimpleBoard::dataIn(QDataStream &s)
{
	if ( s.atEnd() ) return; // no data

	IO_Flag f;
	s >> f;
	switch ( f.value() ) {
	 case IO_Flag::Init:      initFlag(s);    break;
	 case IO_Flag::Play:      playFlag(s);    break;
	 case IO_Flag::Pause:     pauseFlag();    break;
	 case IO_Flag::GameOver:  gameOverFlag(); break;
	 case IO_Flag::Stop:      stopFlag();     break;
	}
}
Exemple #2
0
int Controller::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QToolBox::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: channelChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 1: velocityChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: base_octaveChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: transposeChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 4: enableEdit((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 5: durationChanged((*reinterpret_cast< QAction*(*)>(_a[1]))); break;
        case 6: pauseFlag((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 7: dotEnable((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 8: setCurrentChannel((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 9: setCurrentVelocity((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 10: setCurrentBase_octave((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 11: setCurrentTranspose((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 12: setCurrentSpeed((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 13: setCurrentMeter((*reinterpret_cast< Meter(*)>(_a[1]))); break;
        case 14: setCurrentKey((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 15: on_btn_note_dot_clicked((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 16: on_btn_run_clicked(); break;
        case 17: on_slider_speed_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 18: on_slider_meter_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 19: on_slider_key_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 20: on_slider_transpose_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 21: on_slider_base_octave_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 22: on_slider_channel_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 23: on_slider_velocity_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 24: durationCheck((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 25: pauseCheck((*reinterpret_cast< int(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 26;
    }
    return _id;
}