qmca  0.0.20
a2dconvertercontrolpanel.cpp
Go to the documentation of this file.
2 #include "epicsa2dconverter.h"
3 #include <QGridLayout>
4 #include <QLabel>
5 #include <QPushButton>
6 #include <QGroupBox>
8 #include "epicsdoubleinput.h"
9 #include "epicsintegerinput.h"
10 
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 }
25 
27 {
28 }
29 
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()
void append(EpicsA2DConverter *conv)
QList< EpicsA2DConverter * > m_A2DConverterList
EpicsInteger * offset()