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

#include <epicsdoubleinput.h>

Inheritance diagram for EpicsDoubleInput:
Inheritance graph

Public Slots

void changeEpicsDouble ()
 
void setGraphicValue (dbr_gr_double val)
 

Public Member Functions

 EpicsDoubleInput (EpicsDouble *var, QWidget *parent=0)
 
virtual ~EpicsDoubleInput ()
 

Private Attributes

EpicsDoublem_EpicsDouble
 

Detailed Description

Definition at line 9 of file epicsdoubleinput.h.

Constructor & Destructor Documentation

EpicsDoubleInput::EpicsDoubleInput ( EpicsDouble var,
QWidget *  parent = 0 
)

Definition at line 9 of file epicsdoubleinput.cpp.

10  : QDoubleSpinBox(parent),
11  m_EpicsDouble(var)
12 {
13  qRegisterMetaType<dbr_gr_double>();
14 
15  connect(this, SIGNAL(editingFinished()), this, SLOT(changeEpicsDouble()));
16  connect(m_EpicsDouble, SIGNAL(valueChanged(double)), this, SLOT(setValue(double)));
17  connect(m_EpicsDouble, SIGNAL(valueGraphicChanged(dbr_gr_double)),
18  this, SLOT(setGraphicValue(dbr_gr_double)));
19 
20  printf("EpicsDoubleInput::EpicsDoubleInput (%s -> %g)\n",
21  qPrintable(m_EpicsDouble->pvName()),m_EpicsDouble->value());
22 
23  setValue(m_EpicsDouble->value());
24  setToolTip(m_EpicsDouble->toolTip());
25 }
void setGraphicValue(dbr_gr_double val)
double value()
QString pvName()
Definition: epicsobject.cpp:30
EpicsDouble * m_EpicsDouble
QString toolTip()
Definition: epicsobject.cpp:35
EpicsDoubleInput::~EpicsDoubleInput ( )
virtual

Definition at line 27 of file epicsdoubleinput.cpp.

28 {
29 }

Member Function Documentation

void EpicsDoubleInput::changeEpicsDouble ( )
slot

Definition at line 31 of file epicsdoubleinput.cpp.

References m_EpicsDouble.

32 {
33  m_EpicsDouble -> caput(value());
34 }
EpicsDouble * m_EpicsDouble
void EpicsDoubleInput::setGraphicValue ( dbr_gr_double  val)
slot

Definition at line 36 of file epicsdoubleinput.cpp.

37 {
38  double lowlim = val.lower_disp_limit;
39  double hilim = val.upper_disp_limit;
40 
41  setMinimum(lowlim);
42  setMaximum(hilim);
43 }

Member Data Documentation

EpicsDouble* EpicsDoubleInput::m_EpicsDouble
private

Definition at line 22 of file epicsdoubleinput.h.

Referenced by changeEpicsDouble().


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