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

#include <a2dconvertercontrolpanel.h>

Inheritance diagram for A2DConverterControlPanel:
Inheritance graph

Public Member Functions

 A2DConverterControlPanel (QWidget *parent)
 
virtual ~A2DConverterControlPanel ()
 
void append (EpicsA2DConverter *conv)
 

Private Attributes

QGridLayout * m_GridLayout
 
QList< EpicsA2DConverter * > m_A2DConverterList
 

Detailed Description

Definition at line 12 of file a2dconvertercontrolpanel.h.

Constructor & Destructor Documentation

A2DConverterControlPanel::A2DConverterControlPanel ( QWidget *  parent)

Definition at line 11 of file a2dconvertercontrolpanel.cpp.

References m_GridLayout.

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

Definition at line 26 of file a2dconvertercontrolpanel.cpp.

27 {
28 }

Member Function Documentation

void A2DConverterControlPanel::append ( EpicsA2DConverter conv)

Definition at line 30 of file a2dconvertercontrolpanel.cpp.

References EpicsA2DConverter::gain(), EpicsA2DConverter::lowerLevelDiscrim(), m_A2DConverterList, m_GridLayout, EpicsA2DConverter::offset(), EpicsObject::pvName(), EpicsA2DConverter::range(), and EpicsA2DConverter::upperLevelDiscrim().

Referenced by MCAController::addArgument().

31 {
32  int row = m_A2DConverterList.count()+0;
33  m_A2DConverterList.append(conv);
34 
35 // QLabel *convLabel = new QLabel(conv->pvName());
36 // EpicsEnumerationComboBox *convGain = new EpicsEnumerationComboBox(conv->gain());
37 
38 // m_GridLayout -> addWidget(convLabel, row, 0, 1, 1);
39 // m_GridLayout -> addWidget(convGain, row, 1, 1, 1);
40 
41  QGroupBox *box = new QGroupBox(conv->pvName());
42 
43  QGridLayout *layout = new QGridLayout(box);
44 
45  QLabel *gainLabel = new QLabel("Gain");
46  QLabel *rangeLabel = new QLabel("Range");
47  QLabel *offsetLabel = new QLabel("Offset");
48  QLabel *lldLabel = new QLabel("LLD");
49  QLabel *uldLabel = new QLabel("ULD");
50 
51  layout -> addWidget(gainLabel, 0, 0, 1, 1);
52  layout -> addWidget(rangeLabel, 1, 0, 1, 1);
53  layout -> addWidget(offsetLabel, 2, 0, 1, 1);
54  layout -> addWidget(lldLabel, 3, 0, 1, 1);
55  layout -> addWidget(uldLabel, 4, 0, 1, 1);
56 
57  layout -> addWidget(new EpicsEnumerationComboBox(conv->gain()), 0, 1, 1, 1);
58  layout -> addWidget(new EpicsEnumerationComboBox(conv->range()), 1, 1, 1, 1);
59  layout -> addWidget(new EpicsIntegerInput(conv->offset()), 2, 1, 1, 1);
60  layout -> addWidget(new EpicsDoubleInput(conv->lowerLevelDiscrim()), 3, 1, 1, 1);
61  layout -> addWidget(new EpicsDoubleInput(conv->upperLevelDiscrim()), 4, 1, 1, 1);
62 
63  m_GridLayout -> addWidget(box, row, 0, 1, 1);
64 }
EpicsDouble * upperLevelDiscrim()
EpicsDouble * lowerLevelDiscrim()
QString pvName()
Definition: epicsobject.cpp:30
EpicsEnumeration * gain()
EpicsEnumeration * range()
QList< EpicsA2DConverter * > m_A2DConverterList
EpicsInteger * offset()

Member Data Documentation

QList<EpicsA2DConverter*> A2DConverterControlPanel::m_A2DConverterList
private

Definition at line 24 of file a2dconvertercontrolpanel.h.

Referenced by append().

QGridLayout* A2DConverterControlPanel::m_GridLayout
private

Definition at line 23 of file a2dconvertercontrolpanel.h.

Referenced by A2DConverterControlPanel(), and append().


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