qmca
0.0.20
Main Page
Classes
Files
File List
File Members
qmca
mcaplotcurve.cpp
Go to the documentation of this file.
1
#include "
mcaplotcurve.h
"
2
#include "
mcacontroller.h
"
3
#include "
epicsmca.h
"
4
#include <QObject>
5
#include <qwt_plot_curve.h>
6
7
MCAPlotCurve::MCAPlotCurve
(QObject *parent,
const
QString &title,
MCAController
*ctrl, QwtPlot *plot,
EpicsMCA
* mca)
8
: QObject(parent),
9
QwtPlotCurve(title),
10
m_Controller(ctrl),
11
m_Plot(plot),
12
m_MCA(mca)
13
{
14
connect(
m_MCA
, SIGNAL(valueChanged()),
this
, SLOT(
arrayValueChanged
()));
15
}
16
17
MCAPlotCurve::~MCAPlotCurve
()
18
{
19
}
20
21
void
MCAPlotCurve::arrayValueChanged
()
22
{
23
int
sz =
m_MCA
->
count
();
24
QVector<double> xv(sz);
25
26
for
(
int
i=0; i<sz; i++) {
27
xv[i]=i;
28
}
29
30
setSamples(xv.data(),
m_MCA
->
value
().data(),
m_MCA
->
count
());
31
32
m_Controller
->
replot
();
33
}
EpicsObject::count
int count()
Definition:
epicsobject.cpp:40
mcaplotcurve.h
MCAPlotCurve::m_Controller
MCAController * m_Controller
Definition:
mcaplotcurve.h:23
MCAController::replot
void replot()
Definition:
mcacontroller.cpp:183
MCAPlotCurve::m_MCA
EpicsMCA * m_MCA
Definition:
mcaplotcurve.h:25
MCAPlotCurve::~MCAPlotCurve
virtual ~MCAPlotCurve()
Definition:
mcaplotcurve.cpp:17
EpicsArray::value
QVector< double > value()
Definition:
epicsarray.cpp:90
MCAPlotCurve::MCAPlotCurve
MCAPlotCurve(QObject *parent, const QString &title, MCAController *ctrl, QwtPlot *plot, EpicsMCA *mca)
Definition:
mcaplotcurve.cpp:7
MCAPlotCurve::arrayValueChanged
void arrayValueChanged()
Definition:
mcaplotcurve.cpp:21
EpicsMCA
Definition:
epicsmca.h:9
MCAController
Definition:
mcacontroller.h:32
mcacontroller.h
epicsmca.h
Generated by
1.8.6