qmca  0.0.20
amplifiercontrolpanel.cpp
Go to the documentation of this file.
2 #include "epicsamplifier.h"
3 #include <QGridLayout>
4 #include <QLabel>
5 #include <QPushButton>
6 #include "epicsdoubleinput.h"
7 #include "epicsdoublelineedit.h"
9 
11  : QFrame(parent),
12  m_GridLayout(NULL)
13 {
14  QFont f;
15  f.setPointSize(8);
16  setFont(f);
17  setContentsMargins(2,2,2,2);
18 
19  m_GridLayout = new QGridLayout(this);
20 
21  m_GridLayout -> addWidget(new QLabel(tr("Name"), this), 0,0,1,1);
22  m_GridLayout -> addWidget(new QLabel(tr("CGain"), this), 0,1,1,1);
23  m_GridLayout -> addWidget(new QLabel(tr("FGain"), this), 0,2,1,1);
24 }
25 
27 {
28 }
29 
31 {
32  int row = m_AmplifierList.count()+1;
33  m_AmplifierList.append(amp);
34 
35  QLabel *ampLabel = new QLabel(amp->pvName());
37  EpicsDoubleLineEdit *ampFGain = new EpicsDoubleLineEdit(amp->fineGain());
38 
39  m_GridLayout -> addWidget(ampLabel, row, 0, 1, 1);
40  m_GridLayout -> addWidget(ampCGain, row, 1, 1, 1);
41  m_GridLayout -> addWidget(ampFGain, row, 2, 1, 1);
42 }
QList< EpicsAmplifier * > m_AmplifierList
QString pvName()
Definition: epicsobject.cpp:30
EpicsDouble * fineGain()
void append(EpicsAmplifier *amp)
AmplifierControlPanel(QWidget *parent)
EpicsEnumeration * coarseGain()