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

#include <amplifiercontrolpanel.h>

Inheritance diagram for AmplifierControlPanel:
Inheritance graph

Public Member Functions

 AmplifierControlPanel (QWidget *parent)
 
virtual ~AmplifierControlPanel ()
 
void append (EpicsAmplifier *amp)
 

Private Attributes

QGridLayout * m_GridLayout
 
QList< EpicsAmplifier * > m_AmplifierList
 

Detailed Description

Definition at line 12 of file amplifiercontrolpanel.h.

Constructor & Destructor Documentation

AmplifierControlPanel::AmplifierControlPanel ( QWidget *  parent)

Definition at line 10 of file amplifiercontrolpanel.cpp.

References m_GridLayout.

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

Definition at line 26 of file amplifiercontrolpanel.cpp.

27 {
28 }

Member Function Documentation

void AmplifierControlPanel::append ( EpicsAmplifier amp)

Definition at line 30 of file amplifiercontrolpanel.cpp.

References EpicsAmplifier::coarseGain(), EpicsAmplifier::fineGain(), m_AmplifierList, m_GridLayout, and EpicsObject::pvName().

Referenced by MCAController::addArgument().

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()
EpicsEnumeration * coarseGain()

Member Data Documentation

QList<EpicsAmplifier*> AmplifierControlPanel::m_AmplifierList
private

Definition at line 24 of file amplifiercontrolpanel.h.

Referenced by append().

QGridLayout* AmplifierControlPanel::m_GridLayout
private

Definition at line 23 of file amplifiercontrolpanel.h.

Referenced by AmplifierControlPanel(), and append().


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