REIXSXESMCPDataSourcePre2013::REIXSXESMCPDataSourcePre2013(const QString &name, AMProcessVariable *imagePV, AMProcessVariable *resolutionXPV, AMProcessVariable *resolutionYPV, QObject *parent)
	: QObject(parent), AMDataSource(name) {

	setDescription("XES Detector Image");
	isConnected_ = false;

	axes_ << AMAxisInfo("x", 0, "x - energy axis", "pixels");
	axes_ << AMAxisInfo("y", 0, "y - vertical axis", "pixels");
	pixelsX_ = pixelsY_ = 0;

	axes_[0].isUniform = true;
	axes_[1].isUniform = true;

	imagePV_ = imagePV;
	resolutionXPV_ = resolutionXPV;
	resolutionYPV_ = resolutionYPV;


	// establish connections to see when the image changes
	connect(imagePV_, SIGNAL(valueChanged()), this, SLOT(onImageValuesChanged()));

	// establish connections to see when the PVs connect and we get all the information we need...
	connect(imagePV_, SIGNAL(connected(bool)), this, SLOT(onConnectionStateChanged()));
	connect(resolutionXPV_, SIGNAL(valueChanged()), this, SLOT(onConnectionStateChanged()));
	connect(resolutionXPV_, SIGNAL(disconnected()), this, SLOT(onConnectionStateChanged()));
	connect(resolutionYPV_, SIGNAL(valueChanged()), this, SLOT(onConnectionStateChanged()));
	connect(resolutionYPV_, SIGNAL(disconnected()), this, SLOT(onConnectionStateChanged()));

	// check just in case all of these PVs are already connected...
	onConnectionStateChanged();

}
Example #2
0
VLongPollClient::VLongPollClient(VConnection *connection) :
		QObject(connection), m_connection(connection)
{
	connect(m_connection, SIGNAL(connectionStateChanged(VConnectionState)),
			this, SLOT(onConnectionStateChanged(VConnectionState)));
}