qmca  0.0.20
Public Slots | Public Member Functions | Private Attributes | List of all members
MCAPlotCurve Class Reference

#include <mcaplotcurve.h>

Inheritance diagram for MCAPlotCurve:
Inheritance graph

Public Slots

void arrayValueChanged ()
 

Public Member Functions

 MCAPlotCurve (QObject *parent, const QString &title, MCAController *ctrl, QwtPlot *plot, EpicsMCA *mca)
 
virtual ~MCAPlotCurve ()
 

Private Attributes

MCAControllerm_Controller
 
QwtPlot * m_Plot
 
EpicsMCAm_MCA
 

Detailed Description

Definition at line 11 of file mcaplotcurve.h.

Constructor & Destructor Documentation

MCAPlotCurve::MCAPlotCurve ( QObject *  parent,
const QString &  title,
MCAController ctrl,
QwtPlot *  plot,
EpicsMCA mca 
)

Definition at line 7 of file mcaplotcurve.cpp.

References arrayValueChanged(), and m_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 }
MCAController * m_Controller
Definition: mcaplotcurve.h:23
EpicsMCA * m_MCA
Definition: mcaplotcurve.h:25
QwtPlot * m_Plot
Definition: mcaplotcurve.h:24
void arrayValueChanged()
MCAPlotCurve::~MCAPlotCurve ( )
virtual

Definition at line 17 of file mcaplotcurve.cpp.

18 {
19 }

Member Function Documentation

void MCAPlotCurve::arrayValueChanged ( )
slot

Definition at line 21 of file mcaplotcurve.cpp.

References EpicsObject::count(), m_Controller, m_MCA, MCAController::replot(), and EpicsArray::value().

Referenced by MCAPlotCurve().

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 
33 }
MCAController * m_Controller
Definition: mcaplotcurve.h:23
EpicsMCA * m_MCA
Definition: mcaplotcurve.h:25
QVector< double > value()
Definition: epicsarray.cpp:90

Member Data Documentation

MCAController* MCAPlotCurve::m_Controller
private

Definition at line 23 of file mcaplotcurve.h.

Referenced by arrayValueChanged().

EpicsMCA* MCAPlotCurve::m_MCA
private

Definition at line 25 of file mcaplotcurve.h.

Referenced by arrayValueChanged(), and MCAPlotCurve().

QwtPlot* MCAPlotCurve::m_Plot
private

Definition at line 24 of file mcaplotcurve.h.


The documentation for this class was generated from the following files: