CFEL - ASG Software Suite  2.5.0
CASS
zero_d_viewer_data.cpp
Go to the documentation of this file.
1 // Copyright (C) 2014 Lutz Foucar
2 
3 /**
4  * @file zero_d_viewer_data.cpp contains the wrapper of the data for the 0d viewer
5  *
6  * @author Lutz Foucar
7  */
8 
9 #include <QtGlobal>
10 #include <QtCore/QDebug>
11 
12 #if QT_VERSION >= 0x050000
13 #include <QtWidgets/QLabel>
14 #else
15 #include <QtGui/QLabel>
16 #endif
17 
18 #include "zero_d_viewer_data.h"
19 
20 #include "result.hpp"
21 
22 using namespace jocassview;
23 using namespace cass;
24 
26  : _value(valuedisplay)
27 {
28 
29 }
30 
32 {
33 
34 }
35 
37 {
38 // qDebug()<<QString::fromStdString(result->name());
39  if (!result)
40  return;
41  _result = result;
42 // qDebug()<<"set 0d viewer data"<<QString::fromStdString(result->name());
43  _value->setText(QString::number(_result->getValue()));
44 }
45 
47 {
48  return _result;
49 }
50 
ZeroDViewerData(QLabel *valuedisplay)
constructor
virtual Data::result_t::shared_pointer result()
retrieve the result
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
Definition: result.hpp:323
Data::result_t::shared_pointer _result
the cass data container
QLabel * _value
pointer to the lable that displays the value
result classes
contains the wrapper of the data for the 0d viewer
number(long n, int base=10)
virtual void setResult(Data::result_t::shared_pointer result)
set the result
virtual ~ZeroDViewerData()
virtual destructor