MNE-CPP  beta 0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
numericwidget.cpp
Go to the documentation of this file.
1 //=============================================================================================================
36 //*************************************************************************************************************
37 //=============================================================================================================
38 // INCLUDES
39 //=============================================================================================================
40 
41 #include "numericwidget.h"
43 
44 
45 //*************************************************************************************************************
46 //=============================================================================================================
47 // USED NAMESPACES
48 //=============================================================================================================
49 
50 using namespace XDISPLIB;
51 using namespace XMEASLIB;
52 
53 
54 //*************************************************************************************************************
55 //=============================================================================================================
56 // DEFINE MEMBER METHODS
57 //=============================================================================================================
58 
59 NumericWidget::NumericWidget(QSharedPointer<Numeric> pNumeric, QWidget* parent)
60 : MeasurementWidget(parent)
61 , m_pNumeric(pNumeric)
62 
63 {
64  ui.setupUi(this);
65 }
66 
67 
68 //*************************************************************************************************************
69 
71 {
72 
73 }
74 
75 
76 //*************************************************************************************************************
77 
79 {
80  ui.m_qLcdNumber_Value->display(m_pNumeric->getValue());
81 }
82 
83 
84 //*************************************************************************************************************
85 
87 {
88  ui.m_qLabel_Caption->setText(m_pNumeric->getName());
89  ui.m_qLabel_Unit->setText(m_pNumeric->getUnit());
90 }
The MeasurementWidget class is the base class of all measurement widgets.
virtual void update(Subject *pSubject)
Contains the declaration of the NumericWidget class.
The Subject class provides the base class of every subject of the observer design pattern...
NumericWidget(QSharedPointer< Numeric > pNumeric, QWidget *parent=0)
Contains the declaration of the Numeric class.