Commit e448bd0c authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

fixed Get commands and x combo made editable to work with qt 5.11

parent cc5bf85f
......@@ -39,6 +39,7 @@ I0mapmon::I0mapmon(CumbiaPool *cumbia_pool, QWidget *parent) :
m_cb_model = new CheckableComboBoxModel(ui->qucby);
connect(m_cb_model, SIGNAL(itemChecked(QString,bool)), this, SLOT(onWlenSelectionChanged(QString, bool)));
ui->qucblambda->setEditable(true);
ui->qucblambda->setModel(m_cb_model);
// continue setup
......@@ -141,11 +142,11 @@ void I0mapmon::m_setup_x_list() {
// "LDM Photodiode (Beamline Transmission)" pos/diagnostics/pico_pos.01 None GetId
ui->qucbx->insertItem(ui->qucbx->count(), "PM2a Ni Photocurrent (a.u.)");
ui->qucbx->setItemData(ui->qucbx->count() - 1, "pos/diagnostics/photo_current_pos.01->GetArea3", Qt::UserRole + 1);
ui->qucbx->setItemData(ui->qucbx->count() - 1, "pos/diagnostics/photo_current_pos.01->GetArea3(0,%1)", Qt::UserRole + 1);
ui->qucbx->insertItem(ui->qucbx->count(), "PM2a Ca Photocurrent (a.u.)");
ui->qucbx->setItemData(ui->qucbx->count() - 1, "pos/diagnostics/photo_current_pos.01->GetArea2", Qt::UserRole + 1);
ui->qucbx->setItemData(ui->qucbx->count() - 1, "pos/diagnostics/photo_current_pos.01->GetArea2(0,%1)", Qt::UserRole + 1);
ui->qucbx->insertItem(ui->qucbx->count(), "PM2a OLD Photocurrent");
ui->qucbx->setItemData(ui->qucbx->count() - 1, "srv-tf-srf:20000/ec-tf-esa-01/v1720/1000000->GetArea4", Qt::UserRole + 1);
ui->qucbx->setItemData(ui->qucbx->count() - 1, "srv-tf-srf:20000/ec-tf-esa-01/v1720/1000000->GetArea4(0,%1)", Qt::UserRole + 1);
ui->qucbx->insertItem(ui->qucbx->count(), "PRESTO Intensity");
ui->qucbx->setItemData(ui->qucbx->count() - 1, "pos/pesp/ccd-pesp_pos.01/Intensity", Qt::UserRole + 1);
ui->qucbx->insertItem(ui->qucbx->count(), "DPI Photodiode (Beamline Transmission)");
......
......@@ -13,6 +13,7 @@
#include <QtDebug>
#ifdef QUMBIA_TANGO_CONTROLS_VERSION
#include <QRegularExpression>
#include <cutreader.h>
#endif
......@@ -56,6 +57,7 @@ void I0MMonPlot::onDataReady(const QList<CuData> &dl) {
for(size_t i = 0; i < v.size(); i++)
sum += v[i];
x = sum / m_numsamples;
printf("x (%f) averaged across %ld samples\n", v.size());
}
else
x = xd["value"].toDouble();
......@@ -126,7 +128,9 @@ void I0MMonPlot::setSources(const QString &x, const QString &y, const QList<int>
addCurve(y);
m_curvenames = QStringList() << y;
if(m_multiread_plu_i ) {
m_multiread_plu_i->insertSource(x, 0);
QString xsrc;
x.contains(QRegularExpression("\\(\\d,%\\d\\)")) ? xsrc = QString(x).arg(nsamples) : xsrc = x;
m_multiread_plu_i->insertSource(xsrc, 0);
m_multiread_plu_i->insertSource(y, 1);
}
}
......
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