CFEL - ASG Software Suite  2.5.0
CASS
track_zoomer_2d.h
Go to the documentation of this file.
1 // Copyright (C) 2013 Lutz Foucar
2 
3 /**
4  * @file track_zoomer_2d.h contains zoomer for a 2d plot with tracking information
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _TRACKZOOMER_2D_
10 #define _TRACKZOOMER_2D_
11 
12 #include "qwt_scroll_zoomer.h"
13 
14 class QPoint;
15 class QStatusBar;
16 
17 namespace jocassview
18 {
19 class TwoDViewerData;
20 
21 /** class that allows to zoom in a 2d view with tracking information
22  *
23  * tracks the data values and position
24  *
25  * @author Stephan Kassemeyer
26  * @author Lutz Foucar
27  */
28 class TrackZoomer2D : public ScrollZoomer
29 {
30  Q_OBJECT
31 
32 public:
33  /** constructor
34  *
35  * @param canvas the canvas which hold the plot
36  */
37  TrackZoomer2D(QWidget *canvas);
38 
39  /** change the tracker text
40  *
41  * @return the text to be displayed
42  * @param pos The position of the mouse
43  */
44  virtual QwtText trackerTextF(const QPointF &pos) const;
45 
46  /** set the data to retrieve the values from
47  *
48  * @param data the object containing the data
49  */
51 
52  /** set the wavelength that is needed of the optional resolution calculation
53  *
54  * @param wavelength_A the wavelength in Angstroem
55  */
56  void setWavelength_A(double wavelength_A);
57 
58  /** set the camera distance that is needed of the optional resolution calculation
59  *
60  * @param cameradistance_cm the camera distance in centimeter
61  */
62  void setCameraDistance_cm(double cameradistance_cm);
63 
64  /** set the size of a pixel in micro meters
65  *
66  * @param pixelsize_um the pixel size in micro meters
67  */
68  void setPixelSize_um(double pixelsize_um);
69 
70  /** set the statusbar pointer
71  *
72  * @param statusbar pointer to the statusbar to put the text to
73  */
74  void setStatusBar(QStatusBar *statusbar);
75 
76 private:
77  /** the data */
79 
80  /** the wavelength in Angstroem (for resolution determination) */
81  double _wavelength_A;
82 
83  /** the cameraDistance in cm (for resolution determination) */
85 
86  /** the pixel size in micro meters (for resolution determination) */
87  double _pixelsize_um;
88 
89  /** pointer to the statusbar to put the text to */
91 };
92 
93 }//end namespace jocassview
94 #endif
TrackZoomer2D(QWidget *canvas)
constructor
void setWavelength_A(double wavelength_A)
set the wavelength that is needed of the optional resolution calculation
QStatusBar * _statusbar
pointer to the statusbar to put the text to
void setCameraDistance_cm(double cameradistance_cm)
set the camera distance that is needed of the optional resolution calculation
double _wavelength_A
the wavelength in Angstroem (for resolution determination)
void setPixelSize_um(double pixelsize_um)
set the size of a pixel in micro meters
virtual QwtText trackerTextF(const QPointF &pos) const
change the tracker text
the 2d data wrapper
TwoDViewerData * _data
the data
auxiliary data[Processor]
class that allows to zoom in a 2d view with tracking information
void setData(TwoDViewerData *data)
set the data to retrieve the values from
void setStatusBar(QStatusBar *statusbar)
set the statusbar pointer
double _cameraDistance_cm
the cameraDistance in cm (for resolution determination)
double _pixelsize_um
the pixel size in micro meters (for resolution determination)