qmca  0.0.20
pulseanalysercontrolpanel.cpp
Go to the documentation of this file.
2 #include "epicspulseanalyser.h"
3 #include <QGridLayout>
4 #include <QLabel>
5 #include <QPushButton>
6 #include "epicsdoublelineedit.h"
7 
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 }
23 
25 {
26 }
27 
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
void append(EpicsPulseAnalyser *conv)