ddt 1.1.0
Loading...
Searching...
No Matches
ddtPickObjectDialog.hpp
Go to the documentation of this file.
1
20#ifndef DDT_DATAVISUALISATION_DDTDIALOGS_PICKOBJECTDIALOG_HPP
21#define DDT_DATAVISUALISATION_DDTDIALOGS_PICKOBJECTDIALOG_HPP
22
23#include <QtWidgets>
24
30
35 Q_OBJECT
36
37 public:
42 explicit DdtPickObjectDialog(QWidget* parent = nullptr);
43
47 virtual ~DdtPickObjectDialog() = default;
48
52 void Initialize();
53
60 void SetInitialParameter(const QString parameter_id,
61 const QVariant parameter) override;
62
67 QString GetDialogName() override;
68
69 protected:
73 virtual void CreateDialog() override;
74
79 void UpdateStatisticsValues(const QString all_values_string);
80
85 void UpdatePixelWindowSizeMax(const QString magnification_factor);
86
87 void closeEvent(QCloseEvent* event) override;
88
89 private:
90 void CreateLayouts();
91 void CreateWidgets();
92 void CreateWidgets2();
93
94 void UpdateMagnifiedImage(QImage const& magnified_image);
95
96 QVBoxLayout* layout;
97 QHBoxLayout* layout_upper_half;
98 QVBoxLayout* layout_valueoutput;
99 QHBoxLayout* layout_image_x;
100 QHBoxLayout* layout_image_y;
101 QHBoxLayout* layout_pixelvalue;
102 QHBoxLayout* layout_ra_value;
103 QHBoxLayout* layout_dec_value;
104 QHBoxLayout* layout_equinox_value;
105 QHBoxLayout* layout_fwhm_x_value;
106 QHBoxLayout* layout_fwhm_y_value;
107 QHBoxLayout* layout_angle_x_axis_value;
108 QHBoxLayout* layout_peak_above_bg_value;
109 QHBoxLayout* layout_background_value;
110 QHBoxLayout* layout_pixels_x_y_value;
111 QVBoxLayout* layout_magnification;
112 QHBoxLayout* layout_slider_label;
113 QHBoxLayout* layout_middle;
114
115 QLabel* label_image_x;
116 QLabel* label_image_y;
117 QLabel* label_pixelvalue;
118 QLabel* label_ra_value;
119 QLabel* label_dec_value;
120 QLabel* label_equinox_value;
121 QLabel* label_fwhm_x_value;
122 QLabel* label_fwhm_y_value;
123 QLabel* label_angle_x_axis_value;
124 QLabel* label_peak_above_bg_value;
125 QLabel* label_background_value;
126 QLabel* label_pixels_x_y_value;
127
128 // Inactive edit field for value display
129 InactiveLineEdit* line_edit_image_x;
130 InactiveLineEdit* line_edit_image_y;
131 InactiveLineEdit* line_edit_pixelvalue;
132 InactiveLineEdit* line_edit_ra;
133 InactiveLineEdit* line_edit_dec;
134 InactiveLineEdit* line_edit_equinox;
135 InactiveLineEdit* line_edit_fwhm_x;
136 InactiveLineEdit* line_edit_fwhm_y;
137 InactiveLineEdit* line_edit_angle_x_axis;
138 InactiveLineEdit* line_edit_peak_above_bg;
139 InactiveLineEdit* line_edit_background;
140 InactiveLineEdit* line_edit_pixels_in_x_y;
141
142 // Magnification widget
143 DdtMagnificationWidget* magnification_widget;
144
145 // Pixel Window slider
146 QLabel* label_no_pixels;
147 QLabel* label_slider_min;
148 QLabel* label_slider_max;
149 QSlider* slider_pixel_window_size;
150 QLabel* label_pickmode;
151
152 // Radio buttons, samples and markers
153 QRadioButton* radio_button_objectmode;
154 QRadioButton* radio_button_cursormode;
155 std::unique_ptr<QLineEdit> line_edit_no_samples;
156 QCheckBox* check_box_show_marker;
157
158 // Dialog buttons
159 QDialogButtonBox* push_buttons_box;
160 QPushButton* push_button_pick;
161 QPushButton* push_button_cancel_pick;
162 QPushButton* push_button_ok;
163 QPushButton* push_button_cancel;
164
165 // Status flags and values
166 bool show_marker;
167 int no_samples;
168 int pixel_window_size_max;
169
170 PickMode current_pick_mode;
171
172 // Handling of freezing of the magnified image upon "pick" action
173 bool freeze_image;
174 bool overwrite_freeze;
175 bool vertical_flipped_image;
176 bool horizontal_flipped_image;
177 QImage last_image_while_freezing;
178 bool datastream_pick;
179
180 public slots:
186 void SetChangedParameter(const QString param_id,
187 const QVariant parameter) override;
188
189 private slots:
193 void SliderValueChanged(const int value);
194
198 void PickModeSelected();
199
203 void NumberOfSamplesChanged(const QString text);
204
208 void ShowMarkerChanged();
209
213 void PickSelected();
214
218 void CancelPickSelected();
219
223 void ConfirmSelected();
224
228 void QuitSelected();
229
233 void SetMagnificationFactor(const QString magnification_factor);
234
235 signals:
239 void ParameterChanged(const QString dialog_id, const QString param_id,
240 const QVariant parameter);
241};
242
243#endif // DDT_DATAVISUALISATION_DDTDIALOGS_PICKOBJECTDIALOG_HPP
244
Definition: ddtDialog.hpp:27
The DdtMagnificationWidget class Class for the Magnification Widget that can be used to display a mag...
Definition: ddtMagnificationWidget.hpp:35
Definition: ddtPickObjectDialog.hpp:34
virtual void CreateDialog() override
Definition: ddtPickObjectDialog.cpp:51
void UpdateStatisticsValues(const QString all_values_string)
Definition: ddtPickObjectDialog.cpp:574
void SetChangedParameter(const QString param_id, const QVariant parameter) override
Definition: ddtPickObjectDialog.cpp:495
void SetInitialParameter(const QString parameter_id, const QVariant parameter) override
Definition: ddtPickObjectDialog.cpp:348
void UpdatePixelWindowSizeMax(const QString magnification_factor)
Definition: ddtPickObjectDialog.cpp:484
QString GetDialogName() override
Definition: ddtPickObjectDialog.cpp:33
void closeEvent(QCloseEvent *event) override
Definition: ddtPickObjectDialog.cpp:636
virtual ~DdtPickObjectDialog()=default
void ParameterChanged(const QString dialog_id, const QString param_id, const QVariant parameter)
void Initialize()
Definition: ddtPickObjectDialog.cpp:37
Definition: ddtDatavisualisationUtils.hpp:27
DDT Utils. Definitions for the data visualisation. Utilities for the DDT Datavisualisation.
PickMode
Definition: ddtDatavisualisationDefines.hpp:25
DDT Utils. Helper classes for DDT Datavisualisation. Utilities for the DDT Datavisualisation.
DDT Dialog IDs. ID values for all used dialogs. IDs for the used dialogs.
DDT Dialogs. Base class for the DDT dialogs. Base class for the DDT dialogs.
DDT Widgets. Class for the DDT Magnification Widget. The widget will display a magnified part of the ...