54 const QVariant parameter)
override;
62 const QVariant parameter)
override;
70 bool eventFilter(QObject *obj, QEvent *event)
override;
87 static const int DIALOG_WIDTH = 850;
88 static const int DIALOG_HEIGHT = 600;
90 static const int CHART_SIZE_X = 500;
91 static const int CHART_SIZE_Y = 300;
92 static const int AXIS_X_HEIGHT = 30;
93 static const int AXIS_Y_WIDTH = 100;
95 static const int LINE_EDIT_VALUE_WIDTH = 120;
96 static const int LINE_EDIT_VALUE_HEIGHT = 10;
98 QVBoxLayout* vertical_layout =
nullptr;
99 QHBoxLayout* horizontal_layout_up =
nullptr;
100 QHBoxLayout* horizontal_layout_middle =
nullptr;
101 QHBoxLayout* horizontal_layout_down =
nullptr;
102 QGridLayout* chart_layout =
nullptr;
103 QLabel* label_low =
nullptr;
104 QLineEdit* line_edit_low =
nullptr;
105 QLabel* label_high =
nullptr;
106 QLineEdit* line_edit_high =
nullptr;
107 QPushButton* push_button_auto =
nullptr;
108 QLabel* label_x =
nullptr;
110 QLabel* label_value =
nullptr;
112 QLabel* label_smooth =
nullptr;
113 QComboBox* combo_box_interpolation =
nullptr;
114 QLabel* label_scaling =
nullptr;
115 QComboBox* checkbox_scaling_value =
nullptr;
116 QDialogButtonBox* push_buttons_box =
nullptr;
117 QPushButton* push_button_cancel =
nullptr;
118 QLabel* label_chart =
nullptr;
119 QLabel* label_xaxis =
nullptr;
120 QLabel* label_yaxis =
nullptr;
121 QLabel* label_fill =
nullptr;
122 QPushButton* push_button_help =
nullptr;
123 QPushButton* push_button_save_plot =
nullptr;
124 QCheckBox* checkbox_show_distribution =
nullptr;
125 QLabel* label_distribution_low =
nullptr;
126 QLabel* label_distribution_high =
nullptr;
127 QSpinBox* spinbox_distribution_val_limit_low =
nullptr;
128 QSpinBox* spinbox_distribution_val_limit_high =
nullptr;
129 QLabel* label_distribution_mean =
nullptr;
130 QLabel* label_distribution_stddev =
nullptr;
134 QList<QVariant> spectrum_values;
136 double current_range_min = 0.0;
137 double original_range_min = 0.0;
139 double current_range_max = 0.0;
140 double original_range_max = 0.0;
142 double current_value_min = 0.0;
143 double original_value_min = 0.0;
145 double current_value_max = 0.0;
146 double original_value_max = 0.0;
148 double chart_min = 0.0;
149 double chart_max = 0.0;
151 double intensity_low = 0.0;
152 double intensity_high = 0.0;
154 bool auto_mode =
true;
156 double scaling_factor = 1.0;
158 QString current_interpolation;
160 QPointF mouse_start_pos;
161 QPointF mouse_delta_pos;
162 int x_axis_scalelines = 0;
163 int y_axis_scalelines = 0;
164 int x_axis_tickstep = 0;
165 int y_axis_tickstep = 0;
166 QPoint chart_movement;
168 std::unique_ptr<QPainterPath> line_path;
170 QList<QPointF> point_list;
175 QString last_image_path =
"";
183 void ClearEditWidgets();
185 void SetRangeValues(
const QList<QVariant> range_values);
186 void SetSpectrum(
const QList<QVariant> spectrum_values);
189 void DrawScaleX(
const double min_value,
const double max_value,
191 void DrawScaleY(
const double min_value,
const double max_value,
192 double *chart_min_value,
double *chart_max_value,
194 double CalculateTickPositionLinear(
const double tick,
const double min_value,
196 const double maxsize)
const;
197 void FindRangeMinMax();
198 void FindValueMinMax();
200 void FillPointList(
const double xfactor,
const double yfactor,
const int height);
201 void AddIntermediatePoints(
const double xfactor,
const double yfactor,
const int height);
202 void AddStepPoints(
const double xfactor,
const double yfactor,
const int height);
203 void AddQuadraticPoints(
const double xfactor,
const double yfactor,
const int height);
204 void AddNaturalPoints(
const double xfactor,
const double yfactor,
const int height);
206 void ConvertPlotToImage(
const QPixmap& pixmap_xaxis,
const QPixmap& pixmap_yaxis,
const QPixmap& pixmap_chart );
211 double ComputeMean(std::size_t start_x, std::size_t end_x);
216 double ComputeStandardDeviation(
double mean, std::size_t start_x, std::size_t end_x);
221 void DrawGaussianDistribution(
const double x_factor,
const double y_factor,
const int height, QPainter &painter);
226 void DrawDistributionXScaleLimits(
const double scale_start_x,
const double scale_end_x,
const double width, QPainter &painter);
231 void UpdateUiDistributionParameterValues(
const double mean,
const double stddev);
236 void UpdateUiDistributionLimitRange();
261 void DisplayXYValuesUnderCursor(
const double chart_x,
const double chart_y);
262 void ScaleChanged(
const QString &text);
273 void ShowDistribution(
bool triggered);
278 void DistributionDataLimiterChangedValue(
int i);
285 const QVariant parameter);