DPadPushButton::DPadPushButton(JoyDPad *dpad, bool displayNames, QWidget *parent) : FlashButtonWidget(displayNames, parent) { this->dpad = dpad; refreshLabel(); enableFlashes(); connect(dpad, SIGNAL(dpadNameChanged()), this, SLOT(refreshLabel())); }
JoyControlStickPushButton::JoyControlStickPushButton(JoyControlStick *stick, bool displayNames, QWidget *parent) : FlashButtonWidget(displayNames, parent) { this->stick = stick; refreshLabel(); connect(stick, SIGNAL(active(int, int)), this, SLOT(flash())); connect(stick, SIGNAL(released(int, int)), this, SLOT(unflash())); connect(stick, SIGNAL(stickNameChanged()), this, SLOT(refreshLabel())); }
JoyButtonWidget::JoyButtonWidget(JoyButton *button, QWidget *parent) : QPushButton(parent) { this->button = button; isflashing = false; refreshLabel(); connect(button, SIGNAL(clicked(int)), this, SLOT(flash())); connect(button, SIGNAL(released(int)), this, SLOT(unflash())); connect(button, SIGNAL(slotsChanged()), this, SLOT(refreshLabel())); }
void WRecordingDuration::setup(const QDomNode& node, const SkinContext& context) { WLabel::setup(node, context); connect(m_pRecordingManager, SIGNAL(durationRecorded(QString)), this, SLOT(refreshLabel(QString))); connect(m_pRecordingManager, SIGNAL(isRecording(bool)), this, SLOT(slotRecordingInactive(bool))); // When we're recording show text from "InactiveText" node QString inactiveText; if (context.hasNodeSelectString(node, "InactiveText", &inactiveText)) { m_inactiveText = inactiveText; } else { m_inactiveText = QString("--:--"); } // Set inactiveText here already because slotRecordingInactive // is refreshed first when we start recording setText(m_inactiveText); }
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(); }