int DisplayWidget::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: sceneChecked(); break; case 1: physicsChecked(); break; case 2: tilesChecked(); break; case 3: currentModeChanged((*reinterpret_cast< QString(*)>(_a[1]))); break; default: ; } _id -= 4; } return _id; }
void ModeManager::currentTabChanged(int index) { // Tab index changes to -1 when there is no tab left. if (index >= 0) { IMode *mode = d->m_modes.at(index); // FIXME: This hardcoded context update is required for the Debug and Edit modes, since // they use the editor widget, which is already a context widget so the main window won't // go further up the parent tree to find the mode context. ICore::updateAdditionalContexts(d->m_addedContexts, mode->context()); d->m_addedContexts = mode->context(); IMode *oldMode = 0; if (d->m_oldCurrent >= 0) oldMode = d->m_modes.at(d->m_oldCurrent); d->m_oldCurrent = index; emit currentModeChanged(mode ? mode->id() : Id(), oldMode ? oldMode->id() : Id()); } }
void DatabaseWidget::emitCurrentModeChanged() { Q_EMIT currentModeChanged(currentMode()); }