qmca  0.0.20
powersupplycontrolpanel.cpp
Go to the documentation of this file.
2 #include "epicspowersupply.h"
3 #include <QGridLayout>
4 #include <QLabel>
5 #include "epicsdoublelineedit.h"
6 #include "epicsintegercheckbox.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  m_GridLayout -> addWidget(new QLabel("Name", this), 0,0,1,1);
19  m_GridLayout -> addWidget(new QLabel("Setting", this), 0,1,1,1);
20  m_GridLayout -> addWidget(new QLabel("On?", this), 0,2,1,1);
21 }
22 
24 {
25 }
26 
28 {
29  int row = m_PowerSupplyList.count()+1;
30 
31  m_PowerSupplyList.append(hvps);
32 
33  QLabel *hvpsLabel = new QLabel(hvps->pvName());
34  EpicsDoubleLineEdit *hvpsVoltage = new EpicsDoubleLineEdit(hvps->voltage());
35  EpicsIntegerCheckBox *hvpsSwitch = new EpicsIntegerCheckBox(hvps->enabled());
36 
37  m_GridLayout -> addWidget(hvpsLabel, row, 0,1,1);
38  m_GridLayout -> addWidget(hvpsVoltage, row, 1,1,1);
39  m_GridLayout -> addWidget(hvpsSwitch, row, 2,1,1);
40 }
PowerSupplyControlPanel(QWidget *parent)
QString pvName()
Definition: epicsobject.cpp:30
EpicsDouble * voltage()
void append(EpicsPowerSupply *hvps)
EpicsInteger * enabled()
QList< EpicsPowerSupply * > m_PowerSupplyList