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

#include <pulseanalysercontrolpanel.h>

Inheritance diagram for PulseAnalyserControlPanel:
Inheritance graph

Public Member Functions

 PulseAnalyserControlPanel (QWidget *parent)
 
virtual ~PulseAnalyserControlPanel ()
 
void append (EpicsPulseAnalyser *conv)
 

Private Attributes

QGridLayout * m_GridLayout
 
QList< EpicsPulseAnalyser * > m_PulseAnalyserList
 

Detailed Description

Definition at line 12 of file pulseanalysercontrolpanel.h.

Constructor & Destructor Documentation

PulseAnalyserControlPanel::PulseAnalyserControlPanel ( QWidget *  parent)

Definition at line 8 of file pulseanalysercontrolpanel.cpp.

References m_GridLayout.

9  : QFrame(parent),
10  m_GridLayout(NULL)
11 {
12  QFont f;
13  f.setPointSize(8);
14  setFont(f);
15  setContentsMargins(2,2,2,2);
16 
17  m_GridLayout = new QGridLayout(this);
18 
19  m_GridLayout -> addWidget(new QLabel(tr("Name"), this), 0,0,1,1);
20  m_GridLayout -> addWidget(new QLabel(tr("Lower"), this), 0,1,1,1);
21  m_GridLayout -> addWidget(new QLabel(tr("Upper"), this), 0,2,1,1);
22 }
PulseAnalyserControlPanel::~PulseAnalyserControlPanel ( )
virtual

Definition at line 24 of file pulseanalysercontrolpanel.cpp.

25 {
26 }

Member Function Documentation

void PulseAnalyserControlPanel::append ( EpicsPulseAnalyser conv)

Definition at line 28 of file pulseanalysercontrolpanel.cpp.

References EpicsPulseAnalyser::channelCount(), EpicsPulseAnalyser::lowerLevel(), m_GridLayout, m_PulseAnalyserList, EpicsObject::pvName(), and EpicsPulseAnalyser::upperLevel().

Referenced by MCAController::addArgument().

29 {
30  int nwin = conv->channelCount();
31 
32  for (int i=0; i<nwin; i++) {
33  int row = m_GridLayout->rowCount()+1;
34  m_PulseAnalyserList.append(conv);
35 
36  QLabel *convLabel =
37  new QLabel(QString("%1:%2").arg(conv->pvName()).arg(i));
38  EpicsDoubleLineEdit *convLower =
39  new EpicsDoubleLineEdit(conv->lowerLevel(i));
40  EpicsDoubleLineEdit *convUpper =
41  new EpicsDoubleLineEdit(conv->upperLevel(i));
42 
43  m_GridLayout -> addWidget(convLabel, row, 0, 1, 1);
44  m_GridLayout -> addWidget(convLower, row, 1, 1, 1);
45  m_GridLayout -> addWidget(convUpper, row, 2, 1, 1);
46  }
47 }
EpicsDouble * upperLevel(int chan)
EpicsDouble * lowerLevel(int chan)
QString pvName()
Definition: epicsobject.cpp:30
QList< EpicsPulseAnalyser * > m_PulseAnalyserList

Member Data Documentation

QGridLayout* PulseAnalyserControlPanel::m_GridLayout
private

Definition at line 23 of file pulseanalysercontrolpanel.h.

Referenced by append(), and PulseAnalyserControlPanel().

QList<EpicsPulseAnalyser*> PulseAnalyserControlPanel::m_PulseAnalyserList
private

Definition at line 24 of file pulseanalysercontrolpanel.h.

Referenced by append().


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