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  Q_PROPERTY(int valueDigits READ get_value_digits WRITE set_value_digits)
38 
39  public:
44  explicit DdtCursorInfoWidget(QWidget* parent = nullptr);
45 
49  virtual ~DdtCursorInfoWidget() = default;
50 
56  void set_show_RADEC(const bool showRADEC);
57 
62  bool get_show_RADEC() const;
63 
69  void set_show_XY(const bool showXY);
70 
75  bool get_show_XY() const;
76 
82  void set_xy_digits(const int digits);
83 
89  int get_xy_digits() const;
90 
96  void set_value_digits(int digits);
97 
103  int get_value_digits() const;
104 
105  protected:
110  bool show_RADEC = false;
111 
116  bool show_XY = true;
117 
123  int xyDigits = 3;
124 
130  int valueDigits = 5;
131 
132  private:
133  QLabel* x_coordinate_label;
134  QLabel* y_coordinate_label;
135  QLabel* pixel_value_label;
136  QLabel* ra_coordinate_label;
137  QLabel* dec_coordinate_label;
138 
139  InactiveLineEdit* x_coordinate_edit;
140  InactiveLineEdit* y_coordinate_edit;
141  InactiveLineEdit* pixel_value_edit;
142  InactiveLineEdit* ra_coordinate_edit;
143  InactiveLineEdit* dec_coordinate_edit;
144 
145  void CreateWidget();
146  void updateCoordinateDisplay();
147 
148  protected slots:
152  void CursorInfo(double x, double y, double pixelvalue, QString ra,
153  QString decl);
154 };
155 
156 #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