ddt  0.1
ddtCutValuesWidget.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 ddtCutValuesWidgets.hpp
8 // @brief DDT Widgets. Class for the DDT Cuts Values Widget.
9 //
10 // Class for the Cut Values Widget. Allows to set the cut values for display of
11 // images in the connected Image Widget.
12 //
13 // @author Carsten Mannel, CGI
14 // @since 2020/08/24
15 //
16 
17 #ifndef DDT_DATAVISUALISATION_DDTWIDGETS_CUTVALUESWIDGET_HPP
18 #define DDT_DATAVISUALISATION_DDTWIDGETS_CUTVALUESWIDGET_HPP
19 
20 #include <QtUiPlugin/QDesignerExportWidget>
21 
23 #include "ddt/imageHandling.hpp"
25 
30 class QDESIGNER_WIDGET_EXPORT DdtCutValuesWidget : public DdtWidget {
31  Q_OBJECT
32 
33  Q_PROPERTY(double default_low READ get_default_low WRITE set_default_low)
34  Q_PROPERTY(double default_high READ get_default_high WRITE set_default_high)
35 
36  public:
41  explicit DdtCutValuesWidget(QWidget* parent = nullptr);
42 
47 
52  void set_default_low(const double low);
53 
58  double get_default_low() const;
59 
64  void set_default_high(const double high);
65 
70  double get_default_high() const;
71 
72  protected:
76  double default_low;
77 
81  double default_high;
82 
83  private:
84  QPushButton* auto_cut_button;
85  QPushButton* min_max_button;
86  QPushButton* user_cut_button;
87  QLabel* low_value_label;
88  QLabel* high_value_label;
89  QLineEdit* low_value_edit;
90  QLineEdit* high_value_edit;
91  InactiveLineEdit* current_low_value_edit;
92  InactiveLineEdit* current_high_value_edit;
93 
94  void CreateWidget();
95 
96  protected slots:
100  void SwitchToAutoCut();
101 
105  void SwitchToMinMaxCut();
106 
110  void SwitchToUserCut();
111 
112  public slots:
116  void CurrentCutValues(const double cutvalue_min, const double cutvalue_max);
117 
118  signals:
125  void SetCutValues(double low, double high);
126 
130  void SetAutoCuts();
131 
136 };
137 
138 #endif // DDT_DATAVISUALISATION_DDTWIDGETS_CUTVALUESWIDGET_HPP
InactiveLineEdit
Definition: ddtDatavisualisationUtils.hpp:24
ddtDatavisualisationUtils.hpp
DdtCutValuesWidget
Definition: ddtCutValuesWidget.hpp:30
DdtCutValuesWidget::SetMinMaxCuts
void SetMinMaxCuts()
DdtCutValuesWidget::~DdtCutValuesWidget
virtual ~DdtCutValuesWidget()
DdtCutValuesWidget::SetCutValues
void SetCutValues(double low, double high)
DdtWidget
The DdtWidget class Use as wrapper class for new widgets.
Definition: ddtWidget.hpp:23
DdtCutValuesWidget::SetAutoCuts
void SetAutoCuts()
ddtWidget.hpp
imageHandling.hpp