CFEL - ASG Software Suite  2.5.0
CASS
zero_d_viewer.h
Go to the documentation of this file.
1 // Copyright (C) 2013 Lutz Foucar
2 
3 /**
4  * @file zero_d_viewer.h contains the viewer for 0d data
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _ZERODVIEWER_
10 #define _ZERODVIEWER_
11 
12 #include "data_viewer.h"
13 
14 class QLabel;
15 
16 namespace jocassview
17 {
18 class ZeroDViewerData;
19 
20 /** a viewer that displays 0d data
21  *
22  * @author Stephan Kassemeyer
23  * @author Lutz Foucar
24  */
25 class ZeroDViewer : public DataViewer
26 {
27  Q_OBJECT
28 
29 public:
30  /** constructor
31  *
32  * @param title the title of this viewer
33  * @param parent The parent of this
34  */
35  ZeroDViewer(QString title, QWidget *parent=0);
36 
37  /** destructor */
38  virtual ~ZeroDViewer();
39 
40  /** retrieve the displayed data
41  *
42  * @return The histogram that contains the displayed data
43  */
45 
46  /** retrieve the type of the data viewer
47  *
48  * @return the type as name
49  */
50  QString type() const;
51 
52  /** overload printing
53  *
54  * just create an error message saying that a 0d value can't be plottet
55  */
56  virtual void print()const;
57 
58  /** overlaod saving
59  *
60  * @param filename the filename to save this to
61  */
62  void saveData(const QString &filename);
63 
64  /** suffixes for the data of this viewer
65  *
66  * @return suffixes for the data of this viewer
67  */
68  virtual QStringList dataFileSuffixes() const;
69 
70 
71 private:
72  /** the label that displays the value */
74 
75  /** pointer to the 0d data wrapper */
77 
78 };
79 }//end namespace jocassview
80 
81 #endif
base class for viewers
Definition: data_viewer.h:37
contains the base class for all data viewers
ZeroDViewerData * _data
pointer to the 0d data wrapper
Definition: zero_d_viewer.h:76
void saveData(const QString &filename)
overlaod saving
a viewer that displays 0d data
Definition: zero_d_viewer.h:25
virtual QStringList dataFileSuffixes() const
suffixes for the data of this viewer
QString type() const
retrieve the type of the data viewer
QLabel * _value
the label that displays the value
Definition: zero_d_viewer.h:73
virtual void print() const
overload printing
ZeroDViewer(QString title, QWidget *parent=0)
constructor
wrapper for the 0d data
QList< Data * > data()
retrieve the displayed data
virtual ~ZeroDViewer()
destructor