예제 #1
0
	//--------------------------------------------------------------------------
	void Scanner::cancel()
	{
		if (isScanning())
		{
			qDebug() << "Terminating scan process";
			process->terminate();
		}
	}
예제 #2
0
void CLSSIS3820Scaler::onTriggerSourceTriggered(AMDetectorDefinitions::ReadMode readMode){
	if(!isConnected() || isScanning())
		return;

	readModeForTriggerSource_ = readMode;
	if(isContinuous()){
		if(readModeForTriggerSource_ == readModeFromSettings())
			connect(this, SIGNAL(continuousChanged(bool)), this, SLOT(triggerScalerAcquisition(bool)));
		else
			connect(this, SIGNAL(continuousChanged(bool)), this, SLOT(ensureCorrectReadModeForTriggerSource()));
		setContinuous(false);
	}
예제 #3
0
	//--------------------------------------------------------------------------
	void Scanner::scan(const QString& filename)
	{
		// Only one scan at a time
		if ( ! isScanning())
		{
			// Re-read settings
			QString command = settings->value(SCAN_COMMAND_KEY,
				DEFAULT_SCAN_COMMAND).toString();
			qDebug() << "Scan command: " << command;

			QString device = settings->value(SCANNER_DEVICE_KEY,
				DEFAULT_SCANNER_DEVICE).toString();
			qDebug() << "Scanner: " << device;

			QString cmd = command.replace("%device%", device);
			qDebug() << "Command: " << cmd;

			process->setStandardOutputFile(filename);
			process->start(cmd);
		}
	}
void SessionDispatcher::handler_scan_process(QString msg) {
    emit isScanning(msg);
}