bool QSpinWidget::qt_emit( int _id, QUObject* _o ) { switch ( _id - staticMetaObject()->signalOffset() ) { case 0: stepUpPressed(); break; case 1: stepDownPressed(); break; default: return QWidget::qt_emit(_id,_o); } return TRUE; }
int Q3SpinWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: stepUpPressed(); break; case 1: stepDownPressed(); break; case 2: stepUp(); break; case 3: stepDown(); break; case 4: timerDone(); break; case 5: timerDoneEx(); break; } _id -= 6; } return _id; }
void PosEdit::init() { ed = new PosEditor(this, "pos editor"); controls = new SpinBox(this); controls->setEditor(ed); setFocusProxy(ed); connect(controls, SIGNAL(stepUpPressed()), SLOT(stepUp())); connect(controls, SIGNAL(stepDownPressed()), SLOT(stepDown())); connect(this, SIGNAL(valueChanged(const Pos&)),SLOT(updateButtons())); overwrite = false; timerId = 0; typing = false; min = Pos(0); max = Pos(MAX_TICK); changed = false; adv = false; static Section s_midiSections[3] = { // measure, beat, tick { 0, 4, 1, 0 }, { 5, 2, 1, 0 }, { 8, 3, 0, 0 } }; static Section s_smpteSections[4] = { // minute second frame subframe { 0, 3, 0, 0 }, { 4, 2, 0, 0 }, { 7, 2, 0, 0 }, { 10, 2, 0, 0 } }; memcpy(midiSections, s_midiSections, sizeof(s_midiSections)); memcpy(smpteSections, s_smpteSections, sizeof(s_smpteSections)); _smpte = false; // show position in smpte format sec = midiSections; setSections(); setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed)); }
void QSpinWidget::stepUp() { emit stepUpPressed(); }