ddt  0.1
ddtImageScaleWidget.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 ddtImageScaleWidgets.hpp
8 // @brief DDT Widgets. Class for the DDT Image Scale Widget.
9 //
10 // Class for the Image Scale Widget. Allows to set the scale factor for the
11 // zooming of the connected Image Widget.
12 //
13 // @author Stefan Eith, CGI
14 // @since 2020/11/16
15 //
16 
17 #ifndef DDT_DATAVISUALISATION_DDTWIDGETS_IMAGESCALEWIDGET_HPP
18 #define DDT_DATAVISUALISATION_DDTWIDGETS_IMAGESCALEWIDGET_HPP
19 
20 #include <QtUiPlugin/QDesignerExportWidget>
21 
23 
28 class QDESIGNER_WIDGET_EXPORT DdtImageScaleWidget : public DdtWidget {
29  Q_OBJECT
30 
31  public:
36  explicit DdtImageScaleWidget(QWidget *parent = nullptr);
37 
41  virtual ~DdtImageScaleWidget() = default;
42 
43  private:
48  QLabel *lable_name;
49 
54  QComboBox *combobox_scale;
55 
60  QLabel *lable_actually_scale;
61 
66  QCheckBox *checkbox_auto_scale;
67 
71  bool setup_scale_list;
72 
73  void CreateWidget();
74 
75  public slots:
82  void UpdateScaleLabel(const QString new_scale_factor);
83 
89  void NewScaleFactors(const QList<QString> new_scale_factor_list);
90 
97  void NewAutoScaleState(const bool new_state);
98 
99  protected slots:
100 
106  void NewScaleSelected(const int selected_field);
107 
114  void NewAutoScaleSelect(const int new_State);
115 
116  signals:
122 
128 
134 
141  void SelectScale(QString next_scale);
142 
148  void SetAutoScale(const bool new_auto_scale_state);
149 };
150 
151 #endif // DDT_DATAVISUALISATION_DDTWIDGETS_IMAGESCALEWIDGET_HPP
DdtImageScaleWidget
Definition: ddtImageScaleWidget.hpp:28
DdtImageScaleWidget::~DdtImageScaleWidget
virtual ~DdtImageScaleWidget()=default
DdtWidget
The DdtWidget class Use as wrapper class for new widgets.
Definition: ddtWidget.hpp:23
DdtImageScaleWidget::DecrementScale
void DecrementScale()
DecrementScale Signal which is sent when the scale is decreased.
DdtImageScaleWidget::SelectScale
void SelectScale(QString next_scale)
SelectScale this will be sent after the user choose another scale value with the combo box.
DdtImageScaleWidget::SetToDefaultScale
void SetToDefaultScale()
SetToDefaultScale Signal which is sent when the default scale is selected.
DdtImageScaleWidget::SetAutoScale
void SetAutoScale(const bool new_auto_scale_state)
SetAutoScale Signal is send after the check box changed the state.
ddtWidget.hpp
DdtImageScaleWidget::IncrementScale
void IncrementScale()
IncrementScale Signal which is sent when the scale is increased.