void ActionRootState::setActionName(const QString &actionName) { if (m_actionName != actionName) { bool wasValid = valid(); m_actionName = actionName; updateActionState(); Q_EMIT actionNameChanged(); if (wasValid != valid()) Q_EMIT validChanged(); } }
JoyAxisWidget::JoyAxisWidget(JoyAxis *axis, bool displayNames, QWidget *parent) : FlashButtonWidget(displayNames, parent) { this->axis = axis; refreshLabel(); JoyAxisButton *nAxisButton = axis->getNAxisButton(); JoyAxisButton *pAxisButton = axis->getPAxisButton(); connect(axis, SIGNAL(active(int)), this, SLOT(flash()), Qt::QueuedConnection); connect(axis, SIGNAL(released(int)), this, SLOT(unflash()), Qt::QueuedConnection); connect(axis, SIGNAL(throttleChanged()), this, SLOT(refreshLabel())); connect(axis, SIGNAL(axisNameChanged()), this, SLOT(refreshLabel())); connect(nAxisButton, SIGNAL(slotsChanged()), this, SLOT(refreshLabel())); connect(nAxisButton, SIGNAL(actionNameChanged()), this, SLOT(refreshLabel())); connect(pAxisButton, SIGNAL(slotsChanged()), this, SLOT(refreshLabel())); connect(pAxisButton, SIGNAL(actionNameChanged()), this, SLOT(refreshLabel())); axis->establishPropertyUpdatedConnection(); nAxisButton->establishPropertyUpdatedConnections(); pAxisButton->establishPropertyUpdatedConnections(); }