ddt  0.1
ddtCursorInfoWidget.hpp
Go to the documentation of this file.
1 // @copyright
2 // (c) Copyright ESO 2020
3 // All Rights Reserved
4 // ESO (eso.org) is an Intergovernmental Organization, and therefore special
5 // legal conditions apply.
6 //
7 // @file ddtCursorInfoWidgets.hpp
8 // @brief DDT Widgets. Class for the DDT Cursor Info Widget.
9 //
10 // Class for the Cursor Info Widget. The widget will display information on the
11 // point currently under the mouse pointer.
12 //
13 // @author Carsten Mannel, CGI
14 // @since 2020/09/03
15 //
16 
17 #ifndef DDT_DATAVISUALISATION_DDTWIDGETS_CURSORINFOWIDGET_HPP
18 #define DDT_DATAVISUALISATION_DDTWIDGETS_CURSORINFOWIDGET_HPP
19 
20 #include <QtUiPlugin/QDesignerExportWidget>
21 
23 #include "ddt/imageHandling.hpp"
25 
31 class QDESIGNER_WIDGET_EXPORT DdtCursorInfoWidget : public DdtWidget {
32  Q_OBJECT
33 
34  Q_PROPERTY(bool show_RADEC READ get_show_RADEC WRITE set_show_RADEC)
35  Q_PROPERTY(bool show_XY READ get_show_XY WRITE set_show_XY)
36  Q_PROPERTY(int xyDigits READ get_xy_digits WRITE set_xy_digits)
37 
38  public:
43  explicit DdtCursorInfoWidget(QWidget* parent = nullptr);
44 
48  virtual ~DdtCursorInfoWidget() = default;
49 
55  void set_show_RADEC(bool show_RADEC);
56 
61  bool get_show_RADEC();
62 
68  void set_show_XY(bool show_XY);
69 
74  bool get_show_XY();
75 
81  void set_xy_digits(int digits);
82 
88  int get_xy_digits();
89 
90  protected:
95  bool show_RADEC;
96 
101  bool show_XY;
102 
108  int xyDigits;
109 
110  private:
111  QLabel* x_coordinate_label;
112  QLabel* y_coordinate_label;
113  QLabel* pixel_value_label;
114  QLabel* ra_coordinate_label;
115  QLabel* dec_coordinate_label;
116 
117  InactiveLineEdit* x_coordinate_edit;
118  InactiveLineEdit* y_coordinate_edit;
119  InactiveLineEdit* pixel_value_edit;
120  InactiveLineEdit* ra_coordinate_edit;
121  InactiveLineEdit* dec_coordinate_edit;
122 
123  void CreateWidget();
124  void updateCoordinateDisplay();
125 
126  protected slots:
130  void CursorInfo(double x, double y, double pixelvalue, QString ra,
131  QString decl);
132 };
133 
134 #endif // DDT_DATAVISUALISATION_DDTWIDGETS_CURSORINFOWIDGET_HPP
InactiveLineEdit
Definition: ddtDatavisualisationUtils.hpp:24
ddtDatavisualisationUtils.hpp
DdtCursorInfoWidget
The DdtCursorInfoWidget class Class for the Cursor Info Widget that can be used to report information...
Definition: ddtCursorInfoWidget.hpp:31
DdtCursorInfoWidget::~DdtCursorInfoWidget
virtual ~DdtCursorInfoWidget()=default
DdtWidget
The DdtWidget class Use as wrapper class for new widgets.
Definition: ddtWidget.hpp:23
ddtWidget.hpp
imageHandling.hpp