Commit 00959aa2 authored by Claudio Scafuri's avatar Claudio Scafuri 💬
Browse files

#14846, new xps-srv interface

parent 075cebb2
bin/
.qmake.stash
......@@ -12,21 +12,20 @@ SpectrumMultiplierPushButton::SpectrumMultiplierPushButton(QWidget *parent) : TP
QList<TVariant> SpectrumMultiplierPushButton::execute(QVariant v)
{
QList<TVariant > tvret;
std::vector<double> input;
bool ok;
double val = d_proxy->getData().toDouble(&ok) * d_factor;
if(ok)
{
input.push_back(val);
QString tp = realTargets();
QString cmd = tp.split("->").last();
std::string dev = tp.split("->").first().toStdString();
try
{
Tango::DeviceProxy *devp = new Tango::DeviceProxy(dev);
Tango::DeviceProxy devp(dev);
DeviceData din;
din << input;
devp->command_inout(qstoc(cmd), din);
din << val;
devp.command_inout(qstoc(cmd), din);
setToolTip(QString("Correctly imparted command \"%1(x%2)\" on "
"%3.\nPlease update this implementation when QTango 4.2.1 is available").
arg(cmd).arg(d_factor).arg(QDateTime::currentDateTime().toString()));
......
......@@ -45,31 +45,29 @@ xps::xps(QWidget *parent) : QWidget(parent)
/* need to setup readers group because the attributes are spectra
*/
/* 1. Position */
ReadersGroup *positionRG = new ReadersGroup(this);
positionRG->addReader(ui.tlPosition, 0);
positionRG->setSource("$1/position");
/* 2. Acceleration */
ReadersGroup *accelerationRG = new ReadersGroup(this);
accelerationRG->addReader(ui.tlAcceleration, 0);
accelerationRG->setSource("$1/acceleration");
//ReadersGroup *accelerationRG = new ReadersGroup(this);
//accelerationRG->addReader(ui.tlAcceleration, 0);
//accelerationRG->setSource("$1/acceleration");
/* 3. Speed */
ReadersGroup *speedRG = new ReadersGroup(this);
speedRG->addReader(ui.tlSpeed, 0);
speedRG->setSource("$1/speed");
//ReadersGroup *speedRG = new ReadersGroup(this);
//speedRG->addReader(ui.tlSpeed, 0);
//speedRG->setSource("$1/speed");
/* Expert */
ReadersGroup *speedRGExpert = new ReadersGroup(this);
speedRGExpert->addReader(ui.tlSpeedExpert, 0);
speedRGExpert->setSource("$1/speed");
//ReadersGroup *speedRGExpert = new ReadersGroup(this);
//speedRGExpert->addReader(ui.tlSpeedExpert, 0);
//speedRGExpert->setSource("$1/speed");
/* There are 2 spectrum buttons to configure: one in the Normal tab and
* one in the expert tab.
* setObjectNameList has been configured inside the designer.
*/
ui.tSpectrumButtonPosition->setTargets("$1/position");
ui.tSpectrumButtonSpeed->setTargets("$1/speed");
//ui.tSpectrumButtonSpeed->setTargets("$1/speed");
}
......
This diff is collapsed.
......@@ -11,10 +11,6 @@ HEADERS += src/xps.h \
FORMS = src/xps.ui
TARGET = bin/xps
inst.files = $${TARGET}
inst.path = $${INSTALL_ROOT}/fermi/panels/bin
INSTALLS += inst
TARGET = bin/xps-gui
QMAKE_POST_LINK = $(STRIP) $(TARGET)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment