void VCSlider::slotModeChanged(Doc::Mode mode) { if (mode == Doc::Operate) { m_topLabel->setEnabled(true); if (m_slider) m_slider->setEnabled(true); if (m_knob) m_knob->setEnabled(true); m_bottomLabel->setEnabled(true); m_tapButton->setEnabled(true); m_cngButton->setEnabled(true); if (sliderMode() == Playback) { /* Follow playback function running/stopped status in case the function is started from another control. */ Function* function = m_doc->function(playbackFunction()); if (function != NULL) { connect(function, SIGNAL(running(quint32)), this, SLOT(slotPlaybackFunctionRunning(quint32))); connect(function, SIGNAL(stopped(quint32)), this, SLOT(slotPlaybackFunctionStopped(quint32))); connect(function, SIGNAL(intensityChanged(qreal)), this, SLOT(slotPlaybackFunctionIntensityChanged(qreal))); } } } else { m_topLabel->setEnabled(false); if (m_slider) m_slider->setEnabled(false); if (m_knob) m_knob->setEnabled(false); m_bottomLabel->setEnabled(false); m_tapButton->setEnabled(false); m_cngButton->setEnabled(false); if (sliderMode() == Playback) { /* Stop following playback function running/stopped status in case the function is changed in Design mode to another. */ Function* function = m_doc->function(playbackFunction()); if (function != NULL) { disconnect(function, SIGNAL(running(quint32)), this, SLOT(slotPlaybackFunctionRunning(quint32))); disconnect(function, SIGNAL(stopped(quint32)), this, SLOT(slotPlaybackFunctionStopped(quint32))); disconnect(function, SIGNAL(intensityChanged(qreal)), this, SLOT(slotPlaybackFunctionIntensityChanged(qreal))); } } } VCWidget::slotModeChanged(mode); }
void QAbstractLight::setIntensity(float value) { Q_D(QAbstractLight); if (intensity() != value) { d->m_shaderData->setProperty("intensity", value); emit intensityChanged(value); } }
void KeyLightPropertyGroup::listChangedProperties(QList<QString>& out) { if (colorChanged()) { out << "keyLight-color"; } if (intensityChanged()) { out << "keyLight-intensity"; } if (directionChanged()) { out << "keyLight-direction"; } if (ambientIntensityChanged()) { out << "keyLight-ambientIntensity"; } if (ambientURLChanged()) { out << "keyLight-ambientURL"; } }
void Function::adjustIntensity(qreal fraction) { m_intensity = CLAMP(fraction, 0.0, 1.0); emit intensityChanged(m_intensity); }
void Exercise::setIntensity(Intensity intensity) { emit intensityChanged(currentIntensity); }