CLSIonChamber::CLSIonChamber(const QString &name, const QString &description, const QString &countsPV, const QString &voltagePV, const QString &sensitivityName, const QString &sensitivityUnits, QObject *parent) : AMIonChamber(name, description, parent) { connected_ = false; counts_ = new AMReadOnlyPVControl(name+" counts", countsPV, this); voltage_ = new AMReadOnlyPVControl(name+" voltage", voltagePV, this); sensitivity_ = new CLSSR570(sensitivityName, sensitivityUnits, this); connect(counts_, SIGNAL(valueChanged(double)), this, SIGNAL(countsChanged())); connect(counts_, SIGNAL(valueChanged(double)), this, SIGNAL(countsChanged(double))); connect(voltage_, SIGNAL(valueChanged(double)), this, SIGNAL(voltageChanged())); connect(voltage_, SIGNAL(valueChanged(double)), this, SIGNAL(voltageChanged(double))); connect(counts_, SIGNAL(valueChanged(double)), this, SIGNAL(readingsChanged())); connect(voltage_, SIGNAL(valueChanged(double)), this, SIGNAL(readingsChanged())); connect(sensitivity_, SIGNAL(sensitivityChanged()), this, SIGNAL(sensitivityChanged())); connect(sensitivity_, SIGNAL(valueChanged(int)), this, SIGNAL(sensitivityValueChanged(int))); connect(sensitivity_, SIGNAL(valueIndexChanged(int)), this, SIGNAL(sensitivityValueIndexChanged(int))); connect(sensitivity_, SIGNAL(unitsChanged(QString)), this, SIGNAL(sensitivityUnitsChanged(QString))); connect(sensitivity_, SIGNAL(minimumSensitivity(bool)), this, SIGNAL(minimumSensitivity(bool))); connect(sensitivity_, SIGNAL(maximumSensitivity(bool)), this, SIGNAL(maximumSensitivity(bool))); connect(counts_, SIGNAL(connected(bool)), this, SLOT(onConnectedChanged())); connect(voltage_, SIGNAL(connected(bool)), this, SLOT(onConnectedChanged())); connect(sensitivity_, SIGNAL(connected(bool)), this, SLOT(onConnectedChanged())); }
void QNoiseGate::setSensitivy(double sensitivity) { QMutexLocker mutexLocker(&_mutex); _sensitivity = sensitivity; emit sensitivityChanged(_sensitivity); emit sensitivityChanged((int)_sensitivity); }
CLSSIS3820Scaler::CLSSIS3820Scaler(const QString &baseName, QObject *parent) : QObject(parent) { connectedOnce_ = false; switchingReadModes_ = false; triggerSourceTriggered_ = false; triggerChannelMapper_ = new QSignalMapper(this); triggerSource_ = new AMDetectorTriggerSource(QString("%1TriggerSource").arg(baseName), this); connect(triggerSource_, SIGNAL(triggered(AMDetectorDefinitions::ReadMode)), this, SLOT(onTriggerSourceTriggered(AMDetectorDefinitions::ReadMode))); dwellTimeSource_ = new AMDetectorDwellTimeSource(QString("%1DwellTimeSource").arg(baseName), this); connect(dwellTimeSource_, SIGNAL(setDwellTime(double)), this, SLOT(onDwellTimeSourceSetDwellTime(double))); synchronizedDwellKey_ = QString("%1:startScan NPP NMS").arg(baseName); CLSSIS3820ScalerChannel *tmpChannel; for (int x = 0; x < 32; x++) { tmpChannel = new CLSSIS3820ScalerChannel(baseName, x, this); scalerChannels_.append(tmpChannel); connect(tmpChannel, SIGNAL(connected(bool)), this, SLOT(onConnectedChanged())); connect(tmpChannel, SIGNAL(sensitivityChanged()), this, SIGNAL(sensitivityChanged())); connect(tmpChannel, SIGNAL(readingChanged(int)), triggerChannelMapper_, SLOT(map())); } startToggle_ = new AMPVControl("Start/Scanning", baseName+":startScan", baseName+":startScan", QString(), this, 0.1); dwellTime_ = new AMPVControl("DwellTime", baseName+":delay", baseName+":delay", QString(), this, 1); scanPerBuffer_ = new AMPVControl("ScanPerBuffer", baseName+":nscan", baseName+":nscan", QString(), this, 0.5); totalScans_ = new AMPVControl("TotalScans", baseName+":scanCount", baseName+":scanCount", QString(), this, 0.5); continuousToggle_ = new CLSSIS3820ScalerModeControl("Mode", QString(), this, "SIS3820 Scaler Mode Control"); continuousToggle_->setScanCountControl(totalScans_); continuousToggle_->setNumberOfScansPerBufferControl(scanPerBuffer_); continuousToggle_->setStartScanControl(startToggle_); reading_ = new AMReadOnlyPVControl("Reading", baseName+":scan", this); dwellTime_->setAttemptMoveWhenWithinTolerance(false); allControls_ = new AMControlSet(this); allControls_->addControl(startToggle_); allControls_->addControl(continuousToggle_); allControls_->addControl(dwellTime_); allControls_->addControl(scanPerBuffer_); allControls_->addControl(totalScans_); allControls_->addControl(reading_); connect(startToggle_, SIGNAL(valueChanged(double)), this, SLOT(onScanningToggleChanged())); connect(continuousToggle_, SIGNAL(valueChanged(double)), this, SLOT(onContinuousToggleChanged())); connect(dwellTime_, SIGNAL(valueChanged(double)), this, SLOT(onDwellTimeChanged(double))); connect(scanPerBuffer_, SIGNAL(valueChanged(double)), this, SLOT(onScanPerBufferChanged(double))); connect(totalScans_, SIGNAL(valueChanged(double)), this, SLOT(onTotalScansChanged(double))); /* connect(reading_, SIGNAL(valueChanged(double)), this, SIGNAL(readingChanged())); */ connect(reading_, SIGNAL(valueChanged(double)), this, SLOT(onReadingChanged(double))); connect(allControls_, SIGNAL(connected(bool)), this, SLOT(onConnectedChanged())); }
void QMouseDevice::setSensitivity(float value) { Q_D(QMouseDevice); if (qFuzzyCompare(value, d->m_sensitivity)) return; d->m_sensitivity = value; emit sensitivityChanged(value); }
CLSBasicScalerChannelDetector::CLSBasicScalerChannelDetector(const QString &name, const QString &description, CLSSIS3820Scaler *scaler, int channelIndex, QObject *parent) : AMDetector(name, description, parent) { scaler_ = scaler; channelIndex_ = channelIndex; connect(scaler_, SIGNAL(connectedChanged(bool)), this, SLOT(onScalerConnected(bool))); connect(scaler_, SIGNAL(scanningChanged(bool)), this, SLOT(onScalerScanningChanged(bool))); connect( scaler_, SIGNAL(sensitivityChanged()), this, SLOT(onScalerSensitivityChanged()) ); connect( scaler_, SIGNAL(dwellTimeChanged(double)), this, SLOT(onScalerDwellTimeChanged()) ); }
/*! Sets the sensitivity of the 3D mouse to wrist movements to \a value, which is clamped to the range 1/64 to 64. The default value of 1 indicates the normal state where events are reported without any adjustment. The \a value is multiplied by incoming axis values to generate the components of the QMouse3DEvent. A \a value of 4 indicates that the mouse is four times more sensitive than normal, and a \a value of 1/4 (0.25) indicates that the mouse is four times less sensitive than normal. \sa sensitivity(), sensitivityChanged() */ void QMouse3DEventProvider::setSensitivity(qreal value) { Q_D(QMouse3DEventProvider); // Clamp the value to the range 1/64 to 64. value = qMin(qMax(value, qreal(1.0f / 64.0f)), qreal(64.0f)); if (d->sensitivity != value) { d->sensitivity = value; d->devices->updateSensitivity(this, d->sensitivity); emit sensitivityChanged(); } }