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

#include <powersupplycontrolpanel.h>

Inheritance diagram for PowerSupplyControlPanel:
Inheritance graph

Public Member Functions

 PowerSupplyControlPanel (QWidget *parent)
 
virtual ~PowerSupplyControlPanel ()
 
void append (EpicsPowerSupply *hvps)
 

Private Attributes

QGridLayout * m_GridLayout
 
QList< EpicsPowerSupply * > m_PowerSupplyList
 

Detailed Description

Definition at line 12 of file powersupplycontrolpanel.h.

Constructor & Destructor Documentation

PowerSupplyControlPanel::PowerSupplyControlPanel ( QWidget *  parent)

Definition at line 8 of file powersupplycontrolpanel.cpp.

References m_GridLayout.

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 }
PowerSupplyControlPanel::~PowerSupplyControlPanel ( )
virtual

Definition at line 23 of file powersupplycontrolpanel.cpp.

24 {
25 }

Member Function Documentation

void PowerSupplyControlPanel::append ( EpicsPowerSupply hvps)

Definition at line 27 of file powersupplycontrolpanel.cpp.

References EpicsPowerSupply::enabled(), m_GridLayout, m_PowerSupplyList, EpicsObject::pvName(), and EpicsPowerSupply::voltage().

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 }
QString pvName()
Definition: epicsobject.cpp:30
EpicsDouble * voltage()
EpicsInteger * enabled()
QList< EpicsPowerSupply * > m_PowerSupplyList

Member Data Documentation

QGridLayout* PowerSupplyControlPanel::m_GridLayout
private

Definition at line 23 of file powersupplycontrolpanel.h.

Referenced by append(), and PowerSupplyControlPanel().

QList<EpicsPowerSupply*> PowerSupplyControlPanel::m_PowerSupplyList
private

Definition at line 24 of file powersupplycontrolpanel.h.

Referenced by append().


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