diff --git a/GUI/Model/Beam/FootprintItems.h b/GUI/Model/Beam/FootprintItems.h index 7ec19310721916b30eb464533eacbb23b758328c..dff7a4c0a3767ab12ecaf3ef29a68fbd6819c0af 100644 --- a/GUI/Model/Beam/FootprintItems.h +++ b/GUI/Model/Beam/FootprintItems.h @@ -46,7 +46,7 @@ public: DoubleProperty& gaussianFootprintValue() { return m_gaussian_footprint_value; } const DoubleProperty& gaussianFootprintValue() const { return m_gaussian_footprint_value; } - void setGaussianFootprintValue(double v) { m_gaussian_footprint_value.setValue(v); } + void setGaussianFootprintValue(double v) { m_gaussian_footprint_value.setDVal(v); } protected: DoubleProperty m_gaussian_footprint_value; @@ -63,7 +63,7 @@ public: DoubleProperty& squareFootprintValue() { return m_square_footprint_value; } const DoubleProperty& squareFootprintValue() const { return m_square_footprint_value; } - void setSquareFootprintValue(double v) { m_square_footprint_value.setValue(v); } + void setSquareFootprintValue(double v) { m_square_footprint_value.setDVal(v); } protected: DoubleProperty m_square_footprint_value; diff --git a/GUI/Model/Beam/SourceItems.h b/GUI/Model/Beam/SourceItems.h index 22f2e863721bae32dda724f7858bf3a0ce2d1a10..c91813cf73487ff4bc2ff509436dcd02bed73689 100644 --- a/GUI/Model/Beam/SourceItems.h +++ b/GUI/Model/Beam/SourceItems.h @@ -37,7 +37,7 @@ class SourceItem { public: DoubleProperty& intensity() { return m_intensity; } const DoubleProperty& intensity() const { return m_intensity; } - void setIntensity(double v) { m_intensity.setValue(v); } + void setIntensity(double v) { m_intensity.setDVal(v); } double wavelength() const; void setWavelength(double value); diff --git a/GUI/Model/Descriptor/AxisProperty.h b/GUI/Model/Descriptor/AxisProperty.h index 053108e33c72407b4570013f17a4eb3b33dae685..cc66707aafe7d7e1d6d048959630abcfecc019ec 100644 --- a/GUI/Model/Descriptor/AxisProperty.h +++ b/GUI/Model/Descriptor/AxisProperty.h @@ -38,11 +38,11 @@ public: DoubleProperty& min() { return m_min; } const DoubleProperty& min() const { return m_min; } - void setMin(double v) { m_min.setValue(v); } + void setMin(double v) { m_min.setDVal(v); } DoubleProperty& max() { return m_max; } const DoubleProperty& max() const { return m_max; } - void setMax(double v) { m_max.setValue(v); } + void setMax(double v) { m_max.setDVal(v); } void initMin(const QString& label, const QString& tooltip, double value, const RealLimits& limits = RealLimits::nonnegative(), uint decimals = 3); diff --git a/GUI/Model/Descriptor/DistributionItems.cpp b/GUI/Model/Descriptor/DistributionItems.cpp index fef4cc543c4a932a32f9a6747f43c6b9546abdfe..f148b56e12ddb745ca89574a2716685ab90a9052 100644 --- a/GUI/Model/Descriptor/DistributionItems.cpp +++ b/GUI/Model/Descriptor/DistributionItems.cpp @@ -179,14 +179,14 @@ void DistributionGateItem::initDistribution(double value) double sigma(0.1 * std::abs(value)); if (sigma == 0.0) sigma = 0.1; - m_minimum.setValue(value - sigma); - m_maximum.setValue(value + sigma); + m_minimum.setDVal(value - sigma); + m_maximum.setDVal(value + sigma); } void DistributionGateItem::setRange(double min, double max) { - m_minimum.setValue(min); - m_maximum.setValue(max); + m_minimum.setDVal(min); + m_maximum.setDVal(max); } void DistributionGateItem::writeTo(QXmlStreamWriter* w) const diff --git a/GUI/Model/Descriptor/DistributionItems.h b/GUI/Model/Descriptor/DistributionItems.h index bf001849d0c94f021200b1a6de598c63d07ef2e7..f23c12c25d1f097c14aa9d8de579ad432b3992fb 100644 --- a/GUI/Model/Descriptor/DistributionItems.h +++ b/GUI/Model/Descriptor/DistributionItems.h @@ -37,7 +37,7 @@ public: DoubleProperty& relSamplingWidth() { return m_rel_sampling_width; } const DoubleProperty& relSamplingWidth() const { return m_rel_sampling_width; } - void setRelSamplingWidth(double v) { m_rel_sampling_width.setValue(v); } + void setRelSamplingWidth(double v) { m_rel_sampling_width.setDVal(v); } //! Serialization of contents. //! @@ -60,7 +60,7 @@ public: DoubleProperty& mean() { return m_mean; } const DoubleProperty& mean() const { return m_mean; } - void setMean(double v) { m_mean.setValue(v); } + void setMean(double v) { m_mean.setDVal(v); } void setMeanDecimals(uint d); @@ -93,11 +93,11 @@ public: DoubleProperty& minimum() { return m_minimum; } const DoubleProperty& minimum() const { return m_minimum; } - void setMinimum(double v) { m_minimum.setValue(v); } + void setMinimum(double v) { m_minimum.setDVal(v); } DoubleProperty& maximum() { return m_maximum; } const DoubleProperty& maximum() const { return m_maximum; } - void setMaximum(double v) { m_maximum.setValue(v); } + void setMaximum(double v) { m_maximum.setDVal(v); } void setRange(double min, double max); @@ -120,7 +120,7 @@ public: DoubleProperty& hwhm() { return m_hwhm; } const DoubleProperty& hwhm() const { return m_hwhm; } - void setHwhm(double v) { m_hwhm.setValue(v); } + void setHwhm(double v) { m_hwhm.setDVal(v); } void initDistribution(double value) override; @@ -142,7 +142,7 @@ public: DoubleProperty& standardDeviation() { return m_standard_deviation; } const DoubleProperty& standardDeviation() const { return m_standard_deviation; } - void setStandardDeviation(double v) { m_standard_deviation.setValue(v); } + void setStandardDeviation(double v) { m_standard_deviation.setDVal(v); } void initDistribution(double value) override; @@ -164,11 +164,11 @@ public: DoubleProperty& median() { return m_median; } const DoubleProperty& median() const { return m_median; } - void setMedian(double v) { m_median.setValue(v); } + void setMedian(double v) { m_median.setDVal(v); } DoubleProperty& scaleParameter() { return m_scale_parameter; } const DoubleProperty& scaleParameter() const { return m_scale_parameter; } - void setScaleParameter(double v) { m_scale_parameter.setValue(v); } + void setScaleParameter(double v) { m_scale_parameter.setDVal(v); } void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; @@ -190,7 +190,7 @@ public: DoubleProperty& hwhm() { return m_hwhm; } const DoubleProperty& hwhm() const { return m_hwhm; } - void setHwhm(double v) { m_hwhm.setValue(v); } + void setHwhm(double v) { m_hwhm.setDVal(v); } void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; @@ -210,19 +210,19 @@ public: DoubleProperty& center() { return m_center; } const DoubleProperty& center() const { return m_center; } - void setCenter(double v) { m_center.setValue(v); } + void setCenter(double v) { m_center.setDVal(v); } DoubleProperty& leftWidth() { return m_left_width; } const DoubleProperty& leftWidth() const { return m_left_width; } - void setLeftWidth(double v) { m_left_width.setValue(v); } + void setLeftWidth(double v) { m_left_width.setDVal(v); } DoubleProperty& middleWidth() { return m_middle_width; } const DoubleProperty& middleWidth() const { return m_middle_width; } - void setMiddleWidth(double v) { m_middle_width.setValue(v); } + void setMiddleWidth(double v) { m_middle_width.setDVal(v); } DoubleProperty& rightWidth() { return m_right_width; } const DoubleProperty& rightWidth() const { return m_right_width; } - void setRightWidth(double v) { m_right_width.setValue(v); } + void setRightWidth(double v) { m_right_width.setDVal(v); } void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; diff --git a/GUI/Model/Descriptor/DoubleProperty.h b/GUI/Model/Descriptor/DoubleProperty.h index 9805d1ff0063d803b480984fc5d3df11d83be36a..4de19cd8124a30119f5d72bb2ebd752c07c4f22c 100644 --- a/GUI/Model/Descriptor/DoubleProperty.h +++ b/GUI/Model/Descriptor/DoubleProperty.h @@ -44,7 +44,7 @@ public: operator double() const { return m_value; } double dVal() const { return m_value; } - void setValue(double d) { m_value = d; } + void setDVal(double d) { m_value = d; } void setAndNotify(double d); const QString& uid() const { return m_uid; } diff --git a/GUI/Model/Descriptor/SpanProperty.h b/GUI/Model/Descriptor/SpanProperty.h index 2d3ad2221953ab34776989c08d54103d9e42e7e0..78602796da21f6307dc34844eab6129915bd3b27 100644 --- a/GUI/Model/Descriptor/SpanProperty.h +++ b/GUI/Model/Descriptor/SpanProperty.h @@ -34,11 +34,11 @@ public: DoubleProperty& width() { return m_width; } const DoubleProperty& width() const { return m_width; } - void setWidth(double v) { m_width.setValue(v); } + void setWidth(double v) { m_width.setDVal(v); } DoubleProperty& center() { return m_center; } const DoubleProperty& center() const { return m_center; } - void setCenter(double v) { m_center.setValue(v); } + void setCenter(double v) { m_center.setDVal(v); } uint nbins() const { return m_nbins; } void setNbins(uint v) { m_nbins = v; } diff --git a/GUI/Model/Descriptor/VectorProperty.h b/GUI/Model/Descriptor/VectorProperty.h index e633a121524e212c3725731dd5815fab3772ee98..378c1d3ffd982a27b5d82a2443a8f591e546f167 100644 --- a/GUI/Model/Descriptor/VectorProperty.h +++ b/GUI/Model/Descriptor/VectorProperty.h @@ -36,9 +36,9 @@ public: operator R3() const { return R3(m_x.dVal(), m_y.dVal(), m_z.dVal()); } bool operator==(const VectorProperty& other) const; - void setX(double _x) { m_x.setValue(_x); } - void setY(double _y) { m_y.setValue(_y); } - void setZ(double _z) { m_z.setValue(_z); } + void setX(double _x) { m_x.setDVal(_x); } + void setY(double _y) { m_y.setDVal(_y); } + void setZ(double _z) { m_z.setDVal(_z); } void setR3(const R3& d) { setX(d.x()); diff --git a/GUI/Model/Detector/ResolutionFunctionItems.h b/GUI/Model/Detector/ResolutionFunctionItems.h index 7ab561a12c79ee9305a3c87564eadfa4ae4451cc..c82298aad3f248326f34678dd557dcede522a807 100644 --- a/GUI/Model/Detector/ResolutionFunctionItems.h +++ b/GUI/Model/Detector/ResolutionFunctionItems.h @@ -45,11 +45,11 @@ public: DoubleProperty& sigmaX() { return m_sigmaX; } const DoubleProperty& sigmaX() const { return m_sigmaX; } - void setSigmaX(double v) { m_sigmaX.setValue(v); } + void setSigmaX(double v) { m_sigmaX.setDVal(v); } DoubleProperty& sigmaY() { return m_sigmaY; } const DoubleProperty& sigmaY() const { return m_sigmaY; } - void setSigmaY(double v) { m_sigmaY.setValue(v); } + void setSigmaY(double v) { m_sigmaY.setDVal(v); } protected: DoubleProperty m_sigmaX; diff --git a/GUI/Model/Mask/PointItem.cpp b/GUI/Model/Mask/PointItem.cpp index 9b1aebf112cab58c31a0766b81c23a0f20e8088a..1b65a19195b6a4a7b5856e381c23b63f0af83ebe 100644 --- a/GUI/Model/Mask/PointItem.cpp +++ b/GUI/Model/Mask/PointItem.cpp @@ -25,11 +25,11 @@ PointItem::PointItem() void PointItem::setPosX(double val) { - m_posX.setValue(val); + m_posX.setDVal(val); } void PointItem::setPosY(double val) { - m_posY.setValue(val); + m_posY.setDVal(val); } void PointItem::writeTo(QXmlStreamWriter* w) const diff --git a/GUI/Model/Material/MaterialItem.cpp b/GUI/Model/Material/MaterialItem.cpp index c528d04e221bf127369d7a2dd47be0f173f5544c..cd8f8707b97b582a8f7f16ff31cdb333c3d41565 100644 --- a/GUI/Model/Material/MaterialItem.cpp +++ b/GUI/Model/Material/MaterialItem.cpp @@ -61,8 +61,8 @@ void MaterialItem::setRefractiveIndex(const double delta, const double beta) m_use_refractive_index = true; - m_delta.setValue(delta); - m_beta.setValue(beta); + m_delta.setDVal(delta); + m_beta.setDVal(beta); emit dataChanged(); } @@ -73,8 +73,8 @@ void MaterialItem::setScatteringLengthDensity(const complex_t sld) m_use_refractive_index = false; - m_sld_re.setValue(sld.real()); - m_sld_im.setValue(sld.imag()); + m_sld_re.setDVal(sld.real()); + m_sld_im.setDVal(sld.imag()); emit dataChanged(); } const DoubleProperty& MaterialItem::delta() const @@ -251,10 +251,10 @@ void MaterialItem::updateFrom(const MaterialItem& other) m_use_refractive_index = other.m_use_refractive_index; - m_delta.setValue(other.m_delta.dVal()); - m_beta.setValue(other.m_beta.dVal()); - m_sld_re.setValue(other.m_sld_re.dVal()); - m_sld_im.setValue(other.m_sld_im.dVal()); + m_delta.setDVal(other.m_delta.dVal()); + m_beta.setDVal(other.m_beta.dVal()); + m_sld_re.setDVal(other.m_sld_re.dVal()); + m_sld_im.setDVal(other.m_sld_im.dVal()); emit dataChanged(); } diff --git a/GUI/Model/Par/ParameterTreeItems.cpp b/GUI/Model/Par/ParameterTreeItems.cpp index d46aef12e9c4bcc39597641d872bda377268edb3..8f60d7819fde3d5dfdfb4bcc8efb71a23293cbd4 100644 --- a/GUI/Model/Par/ParameterTreeItems.cpp +++ b/GUI/Model/Par/ParameterTreeItems.cpp @@ -109,7 +109,7 @@ void ParameterItem::propagateValueToLink(double newValue) void ParameterItem::linkToProperty(DoubleProperty& d) { getPropertyValue = [&d] { return d.dVal(); }; - setPropertyValue = [&d](double v) { d.setValue(v); }; + setPropertyValue = [&d](double v) { d.setDVal(v); }; m_d = &d; // make a copy } diff --git a/GUI/Model/Sample/FormFactorItems.h b/GUI/Model/Sample/FormFactorItems.h index 7b179e7c6ee03106c8a1bd94117ad24f34edc302..fadff6d3cc33ccbe1a722bfc29f1a05a75e8291c 100644 --- a/GUI/Model/Sample/FormFactorItems.h +++ b/GUI/Model/Sample/FormFactorItems.h @@ -37,10 +37,10 @@ public: Pyramid2Item(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } - void setAlpha(double v) { m_alpha.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } + void setAlpha(double v) { m_alpha.setDVal(v); } DoubleProperties geometryProperties() override { @@ -61,9 +61,9 @@ public: BarGaussItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_length, &m_width, &m_height}; } @@ -81,9 +81,9 @@ public: BarLorentzItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_length, &m_width, &m_height}; } @@ -101,9 +101,9 @@ public: BoxItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_length, &m_width, &m_height}; } @@ -121,9 +121,9 @@ public: ConeItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadius(double v) { m_radius.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } - void setAlpha(double v) { m_alpha.setValue(v); } + void setRadius(double v) { m_radius.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } + void setAlpha(double v) { m_alpha.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_radius, &m_height, &m_alpha}; } @@ -141,9 +141,9 @@ public: Pyramid6Item(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setBaseEdge(double v) { m_base_edge.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } - void setAlpha(double v) { m_alpha.setValue(v); } + void setBaseEdge(double v) { m_base_edge.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } + void setAlpha(double v) { m_alpha.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_base_edge, &m_height, &m_alpha}; } @@ -161,10 +161,10 @@ public: Bipyramid4Item(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setBaseHeight(double v) { m_base_height.setValue(v); } - void setHeightRatio(double v) { m_height_ratio.setValue(v); } - void setAlpha(double v) { m_alpha.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setBaseHeight(double v) { m_base_height.setDVal(v); } + void setHeightRatio(double v) { m_height_ratio.setDVal(v); } + void setAlpha(double v) { m_alpha.setDVal(v); } DoubleProperties geometryProperties() override { @@ -186,8 +186,8 @@ public: CylinderItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadius(double v) { m_radius.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setRadius(double v) { m_radius.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_radius, &m_height}; } @@ -204,9 +204,9 @@ public: EllipsoidalCylinderItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadiusX(double v) { m_radiusX.setValue(v); } - void setRadiusY(double v) { m_radiusY.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setRadiusX(double v) { m_radiusX.setDVal(v); } + void setRadiusY(double v) { m_radiusY.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_radiusX, &m_radiusY, &m_height}; } @@ -224,7 +224,7 @@ public: SphereItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadius(double v) { m_radius.setValue(v); } + void setRadius(double v) { m_radius.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_radius}; } @@ -240,8 +240,8 @@ public: SpheroidItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadius(double v) { m_radius.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setRadius(double v) { m_radius.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_radius, &m_height}; } @@ -258,9 +258,9 @@ public: HemiEllipsoidItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadiusX(double v) { m_radiusX.setValue(v); } - void setRadiusY(double v) { m_radiusY.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setRadiusX(double v) { m_radiusX.setDVal(v); } + void setRadiusY(double v) { m_radiusY.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_radiusX, &m_radiusY, &m_height}; } @@ -278,8 +278,8 @@ public: Prism3Item(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setBaseEdge(double v) { m_base_edge.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setBaseEdge(double v) { m_base_edge.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_base_edge, &m_height}; } @@ -296,8 +296,8 @@ public: Prism6Item(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setBaseEdge(double v) { m_base_edge.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setBaseEdge(double v) { m_base_edge.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_base_edge, &m_height}; } @@ -314,9 +314,9 @@ public: Pyramid4Item(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setBaseEdge(double v) { m_base_edge.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } - void setAlpha(double v) { m_alpha.setValue(v); } + void setBaseEdge(double v) { m_base_edge.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } + void setAlpha(double v) { m_alpha.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_base_edge, &m_height, &m_alpha}; } @@ -334,9 +334,9 @@ public: CosineRippleBoxItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_length, &m_width, &m_height}; } @@ -354,9 +354,9 @@ public: CosineRippleGaussItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_length, &m_width, &m_height}; } @@ -374,9 +374,9 @@ public: CosineRippleLorentzItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_length, &m_width, &m_height}; } @@ -394,10 +394,10 @@ public: SawtoothRippleBoxItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } - void setAsymmetry(double v) { m_asymmetry.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } + void setAsymmetry(double v) { m_asymmetry.setDVal(v); } DoubleProperties geometryProperties() override { @@ -418,10 +418,10 @@ public: SawtoothRippleGaussItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } - void setAsymmetry(double v) { m_asymmetry.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } + void setAsymmetry(double v) { m_asymmetry.setDVal(v); } DoubleProperties geometryProperties() override { @@ -442,10 +442,10 @@ public: SawtoothRippleLorentzItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setWidth(double v) { m_width.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } - void setAsymmetry(double v) { m_asymmetry.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setWidth(double v) { m_width.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } + void setAsymmetry(double v) { m_asymmetry.setDVal(v); } DoubleProperties geometryProperties() override { @@ -466,9 +466,9 @@ public: Pyramid3Item(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setBaseEdge(double v) { m_base_edge.setValue(v); } - void setHeight(double v) { m_height.setValue(v); } - void setAlpha(double v) { m_alpha.setValue(v); } + void setBaseEdge(double v) { m_base_edge.setDVal(v); } + void setHeight(double v) { m_height.setDVal(v); } + void setAlpha(double v) { m_alpha.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_base_edge, &m_height, &m_alpha}; } @@ -486,8 +486,8 @@ public: TruncatedCubeItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setRemovedLength(double v) { m_removed_length.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setRemovedLength(double v) { m_removed_length.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_length, &m_removed_length}; } @@ -504,9 +504,9 @@ public: TruncatedSphereItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadius(double v) { m_radius.setValue(v); } - void setUntruncatedHeight(double v) { m_untruncated_height.setValue(v); } - void setRemovedTop(double v) { m_removed_top.setValue(v); } + void setRadius(double v) { m_radius.setDVal(v); } + void setUntruncatedHeight(double v) { m_untruncated_height.setDVal(v); } + void setRemovedTop(double v) { m_removed_top.setDVal(v); } DoubleProperties geometryProperties() override { @@ -526,10 +526,10 @@ public: TruncatedSpheroidItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadius(double v) { m_radius.setValue(v); } - void setUntruncatedHeight(double v) { m_untruncated_height.setValue(v); } - void setHeightFlattening(double v) { m_height_flattening.setValue(v); } - void setRemovedTop(double v) { m_removed_top.setValue(v); } + void setRadius(double v) { m_radius.setDVal(v); } + void setUntruncatedHeight(double v) { m_untruncated_height.setDVal(v); } + void setHeightFlattening(double v) { m_height_flattening.setDVal(v); } + void setRemovedTop(double v) { m_removed_top.setDVal(v); } DoubleProperties geometryProperties() override { @@ -550,8 +550,8 @@ public: CantellatedCubeItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setLength(double v) { m_length.setValue(v); } - void setRemovedLength(double v) { m_removed_length.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } + void setRemovedLength(double v) { m_removed_length.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_length, &m_removed_length}; } @@ -568,10 +568,10 @@ public: HorizontalCylinderItem(); std::unique_ptr<IFormFactor> createFormFactor() const override; - void setRadius(double v) { m_radius.setValue(v); } - void setLength(double v) { m_length.setValue(v); } - void setSliceBottom(double v) { m_slice_bottom.setValue(v); } - void setSliceTop(double v) { m_slice_top.setValue(v); } + void setRadius(double v) { m_radius.setDVal(v); } + void setLength(double v) { m_length.setDVal(v); } + void setSliceBottom(double v) { m_slice_bottom.setDVal(v); } + void setSliceTop(double v) { m_slice_top.setDVal(v); } DoubleProperties geometryProperties() override { @@ -591,7 +591,7 @@ protected: class PlatonicItem : public FormFactorItem { public: - void setEdge(double v) { m_edge.setValue(v); } + void setEdge(double v) { m_edge.setDVal(v); } DoubleProperties geometryProperties() override { return {&m_edge}; } diff --git a/GUI/Model/Sample/InterferenceItems.h b/GUI/Model/Sample/InterferenceItems.h index 3280d3c0dcf92735936587e03d895d944e0c5301..f8d75b1e69f7b7c28e4d6dddd95c7ff33a238c17 100644 --- a/GUI/Model/Sample/InterferenceItems.h +++ b/GUI/Model/Sample/InterferenceItems.h @@ -35,7 +35,7 @@ public: DoubleProperty& positionVariance() { return m_position_variance; } const DoubleProperty& positionVariance() const { return m_position_variance; } - void setPositionVariance(double v) { m_position_variance.setValue(v); } + void setPositionVariance(double v) { m_position_variance.setDVal(v); } protected: InterferenceItem(); @@ -56,11 +56,11 @@ public: DoubleProperty& length() { return m_length; } const DoubleProperty& length() const { return m_length; } - void setLength(double v) { m_length.setValue(v); } + void setLength(double v) { m_length.setDVal(v); } DoubleProperty& rotationAngle() { return m_rotation_angle; } const DoubleProperty& rotationAngle() const { return m_rotation_angle; } - void setRotationAngle(double v) { m_rotation_angle.setValue(v); } + void setRotationAngle(double v) { m_rotation_angle.setDVal(v); } PolyItem<Profile1DItemCatalog>& decayFunctionSelection() { return m_decay_function; } void setDecayFunctionType(Profile1DItem* p) { m_decay_function.setCertainItem(p); } @@ -121,15 +121,15 @@ public: DoubleProperty& dampingLength() { return m_damping_length; } const DoubleProperty& dampingLength() const { return m_damping_length; } - void setDampingLength(double dampingLength) { m_damping_length.setValue(dampingLength); } + void setDampingLength(double dampingLength) { m_damping_length.setDVal(dampingLength); } DoubleProperty& domainSize1() { return m_domain_size1; } const DoubleProperty& domainSize1() const { return m_domain_size1; } - void setDomainSize1(double size) { m_domain_size1.setValue(size); } + void setDomainSize1(double size) { m_domain_size1.setDVal(size); } DoubleProperty& domainSize2() { return m_domain_size2; } const DoubleProperty& domainSize2() const { return m_domain_size2; } - void setDomainSize2(double size) { m_domain_size2.setValue(size); } + void setDomainSize2(double size) { m_domain_size2.setDVal(size); } PolyItem<Profile2DItemCatalog>& probabilityDistributionSelection1() { return m_pdf1; } void setPDF1Type(Profile2DItem* p) { m_pdf1.setCertainItem(p); } @@ -178,11 +178,11 @@ public: DoubleProperty& radius() { return m_radius; } const DoubleProperty& radius() const { return m_radius; } - void setRadius(double v) { m_radius.setValue(v); } + void setRadius(double v) { m_radius.setDVal(v); } DoubleProperty& density() { return m_density; } const DoubleProperty& density() const { return m_density; } - void setDensity(double v) { m_density.setValue(v); } + void setDensity(double v) { m_density.setDVal(v); } private: DoubleProperty m_radius; @@ -201,19 +201,19 @@ public: DoubleProperty& peakDistance() { return m_peak_distance; } const DoubleProperty& peakDistance() const { return m_peak_distance; } - void setPeakDistance(double v) { m_peak_distance.setValue(v); } + void setPeakDistance(double v) { m_peak_distance.setDVal(v); } DoubleProperty& dampingLength() { return m_damping_length; } const DoubleProperty& dampingLength() const { return m_damping_length; } - void setDampingLength(double v) { m_damping_length.setValue(v); } + void setDampingLength(double v) { m_damping_length.setDVal(v); } DoubleProperty& domainSize() { return m_domain_size; } const DoubleProperty& domainSize() const { return m_domain_size; } - void setDomainSize(double v) { m_domain_size.setValue(v); } + void setDomainSize(double v) { m_domain_size.setDVal(v); } DoubleProperty& kappa() { return m_kappa; } const DoubleProperty& kappa() const { return m_kappa; } - void setKappa(double v) { m_kappa.setValue(v); } + void setKappa(double v) { m_kappa.setDVal(v); } PolyItem<Profile1DItemCatalog>& probabilityDistributionSelection() { return m_pdf; } void setPDFType(Profile1DItem* p) { m_pdf.setCertainItem(p); } diff --git a/GUI/Model/Sample/ItemWithParticles.h b/GUI/Model/Sample/ItemWithParticles.h index e72065633de2706fefcd5191722c7d65e8bfdbb7..941b0aea2a1aedd50e9bd6085b5beefdec8ca1ef 100644 --- a/GUI/Model/Sample/ItemWithParticles.h +++ b/GUI/Model/Sample/ItemWithParticles.h @@ -30,7 +30,7 @@ public: DoubleProperty& abundance() { return m_abundance; } const DoubleProperty& abundance() const { return m_abundance; } - void setAbundance(double v) { m_abundance.setValue(v); } + void setAbundance(double v) { m_abundance.setDVal(v); } VectorProperty& position() { return m_position; } const VectorProperty& position() const { return m_position; } diff --git a/GUI/Model/Sample/Lattice2DItems.h b/GUI/Model/Sample/Lattice2DItems.h index c052bd937b8ebab6a94149460d61e62bc2858f75..e53aeac0ac47431fb8e4f0f0557b2e54a86345dd 100644 --- a/GUI/Model/Sample/Lattice2DItems.h +++ b/GUI/Model/Sample/Lattice2DItems.h @@ -34,7 +34,7 @@ public: double unitCellArea() const; DoubleProperty& latticeRotationAngle() { return m_lattice_rotation_angle; } - void setLatticeRotationAngle(double v) { m_lattice_rotation_angle.setValue(v); } + void setLatticeRotationAngle(double v) { m_lattice_rotation_angle.setDVal(v); } protected: DoubleProperty m_lattice_rotation_angle; @@ -56,9 +56,9 @@ public: return {&m_length1, &m_length2, &m_angle}; } - void setLatticeLength1(double v) { m_length1.setValue(v); } - void setLatticeLength2(double v) { m_length2.setValue(v); } - void setLatticeAngle(double v) { m_angle.setValue(v); } + void setLatticeLength1(double v) { m_length1.setDVal(v); } + void setLatticeLength2(double v) { m_length2.setDVal(v); } + void setLatticeAngle(double v) { m_angle.setDVal(v); } private: DoubleProperty m_length1; @@ -82,7 +82,7 @@ public: return {&m_length}; } - void setLatticeLength(double v) { m_length.setValue(v); } + void setLatticeLength(double v) { m_length.setDVal(v); } private: DoubleProperty m_length; @@ -104,7 +104,7 @@ public: return {&m_length}; } - void setLatticeLength(double v) { m_length.setValue(v); } + void setLatticeLength(double v) { m_length.setDVal(v); } private: DoubleProperty m_length; diff --git a/GUI/Model/Sample/LayerItem.h b/GUI/Model/Sample/LayerItem.h index 1f14449914666678caa1f351c1932c2008942abe..03258c628eab7f47de2c52be05e6fb447ca4afc5 100644 --- a/GUI/Model/Sample/LayerItem.h +++ b/GUI/Model/Sample/LayerItem.h @@ -37,7 +37,7 @@ public: DoubleProperty& thickness() { return m_thickness; } const DoubleProperty& thickness() const { return m_thickness; } - void setThickness(double v) { m_thickness.setValue(v); } + void setThickness(double v) { m_thickness.setDVal(v); } PolyItem<RoughnessItemCatalog>& roughnessSelection() { return m_roughness; } void setBasicRoughness(); diff --git a/GUI/Model/Sample/ParticleLayoutItem.h b/GUI/Model/Sample/ParticleLayoutItem.h index 8e53888eb9bc58c4ed68bdb6ab87a614de9931ac..a1e2a99e7139ae74774740bf330dab3943c66114 100644 --- a/GUI/Model/Sample/ParticleLayoutItem.h +++ b/GUI/Model/Sample/ParticleLayoutItem.h @@ -36,7 +36,7 @@ public: //! whether an interference is present or not, use totalDensityValue(). DoubleProperty& ownDensity() { return m_own_density; } const DoubleProperty& ownDensity() const { return m_own_density; } - void setOwnDensity(double v) { m_own_density.setValue(v); } + void setOwnDensity(double v) { m_own_density.setDVal(v); } //! The real density. //! diff --git a/GUI/Model/Sample/ProfileItems.h b/GUI/Model/Sample/ProfileItems.h index 069ff11dc2f81aef8097a1e2a73bb90736bf4054..d1d537be4f9c0e7ec74fff948f6cf52eed88245a 100644 --- a/GUI/Model/Sample/ProfileItems.h +++ b/GUI/Model/Sample/ProfileItems.h @@ -30,7 +30,7 @@ public: virtual void readFrom(QXmlStreamReader* r); double omega() const { return m_omega.dVal(); } - void setOmega(double v) { m_omega.setValue(v); } + void setOmega(double v) { m_omega.setDVal(v); } virtual DoubleProperties profileProperties(); @@ -73,7 +73,7 @@ public: void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; - void setEta(double v) { m_eta.setValue(v); } + void setEta(double v) { m_eta.setDVal(v); } DoubleProperties profileProperties() override; @@ -91,9 +91,9 @@ public: virtual void writeTo(QXmlStreamWriter* w) const; virtual void readFrom(QXmlStreamReader* r); - void setOmegaX(double v) { m_omegaX.setValue(v); } - void setOmegaY(double v) { m_omegaY.setValue(v); } - void setGamma(double v) { m_gamma.setValue(v); } + void setOmegaX(double v) { m_omegaX.setDVal(v); } + void setOmegaY(double v) { m_omegaY.setDVal(v); } + void setGamma(double v) { m_gamma.setDVal(v); } virtual DoubleProperties profileProperties(); @@ -133,7 +133,7 @@ public: void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; - void setEta(double v) { m_eta.setValue(v); } + void setEta(double v) { m_eta.setDVal(v); } DoubleProperties profileProperties() override; diff --git a/GUI/Model/Sample/RotationItems.h b/GUI/Model/Sample/RotationItems.h index 13badca31fbc89fbf38176fca4f1149f51bff43a..c25694295b56d7ff123d9c4db24fe81111820cc0 100644 --- a/GUI/Model/Sample/RotationItems.h +++ b/GUI/Model/Sample/RotationItems.h @@ -40,7 +40,7 @@ public: void readFrom(QXmlStreamReader* r) override; DoubleProperties rotationProperties() override { return {&m_angle}; } - void setAngle(double v) { m_angle.setValue(v); } + void setAngle(double v) { m_angle.setDVal(v); } protected: DoubleProperty m_angle; @@ -72,9 +72,9 @@ public: void readFrom(QXmlStreamReader* r) override; DoubleProperties rotationProperties() override { return {&m_alpha, &m_beta, &m_gamma}; } - void setAlpha(double v) { m_alpha.setValue(v); } - void setBeta(double v) { m_beta.setValue(v); } - void setGamma(double v) { m_gamma.setValue(v); } + void setAlpha(double v) { m_alpha.setDVal(v); } + void setBeta(double v) { m_beta.setDVal(v); } + void setGamma(double v) { m_gamma.setDVal(v); } unique_ptr<IRotation> createRotation() const override; diff --git a/GUI/Model/Sample/RoughnessItems.h b/GUI/Model/Sample/RoughnessItems.h index f5537f9b3bcdbe9f73871811541da6e34735e4a1..ecaa4c8a2493e1944c2cc58f44b435d8e38cab16 100644 --- a/GUI/Model/Sample/RoughnessItems.h +++ b/GUI/Model/Sample/RoughnessItems.h @@ -35,15 +35,15 @@ public: DoubleProperty& sigma() { return m_sigma; } const DoubleProperty& sigma() const { return m_sigma; } - void setSigma(double v) { m_sigma.setValue(v); } + void setSigma(double v) { m_sigma.setDVal(v); } DoubleProperty& hurst() { return m_hurst; } const DoubleProperty& hurst() const { return m_hurst; } - void setHurst(double v) { m_hurst.setValue(v); } + void setHurst(double v) { m_hurst.setDVal(v); } DoubleProperty& lateralCorrelationLength() { return m_lateral_correlation_length; } const DoubleProperty& lateralCorrelationLength() const { return m_lateral_correlation_length; } - void setLateralCorrelationLength(double v) { m_lateral_correlation_length.setValue(v); } + void setLateralCorrelationLength(double v) { m_lateral_correlation_length.setDVal(v); } void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; diff --git a/GUI/Model/Sample/SampleItem.h b/GUI/Model/Sample/SampleItem.h index eb99f9d96b509a66b78911773211c6f5354775e2..fdca0f29b29d406916bb9107fe04794bd564e146 100644 --- a/GUI/Model/Sample/SampleItem.h +++ b/GUI/Model/Sample/SampleItem.h @@ -39,7 +39,7 @@ public: DoubleProperty& crossCorrLength() { return m_cross_correlation_length; } const DoubleProperty& crossCorrLength() const { return m_cross_correlation_length; } - void setCrossCorLength(double d) { m_cross_correlation_length.setValue(d); } + void setCrossCorLength(double d) { m_cross_correlation_length.setDVal(d); } VectorProperty& externalField() { return m_external_field; } const VectorProperty& externalField() const { return m_external_field; } diff --git a/GUI/Model/Sim/BackgroundItems.h b/GUI/Model/Sim/BackgroundItems.h index 26755c5625ed211a5ea1336cd99eecba425d6376..be77adefbfe24d0d65de66f8f38c6f3dc4174114 100644 --- a/GUI/Model/Sim/BackgroundItems.h +++ b/GUI/Model/Sim/BackgroundItems.h @@ -44,7 +44,7 @@ public: DoubleProperty& backgroundValue() { return m_background_value; } const DoubleProperty& backgroundValue() const { return m_background_value; } - void setBackgroundValue(double v) { m_background_value.setValue(v); } + void setBackgroundValue(double v) { m_background_value.setDVal(v); } protected: DoubleProperty m_background_value; diff --git a/GUI/Model/Sim/InstrumentItems.cpp b/GUI/Model/Sim/InstrumentItems.cpp index 63b94efa993a54ea5f0483c70ddc70847bcb651e..ce9387d881fd1c906965f9bc4a45fc9d06b8b2d4 100644 --- a/GUI/Model/Sim/InstrumentItems.cpp +++ b/GUI/Model/Sim/InstrumentItems.cpp @@ -293,7 +293,7 @@ Frame InstrumentItem::makeFrame() const ScanningInstrumentItem::ScanningInstrumentItem(double intensity) : m_scan_item(new ScanItem()) { - m_scan_item->intensity().setValue(intensity); // overwrite default value set by BeamItem c'tor + m_scan_item->intensity().setDVal(intensity); // overwrite default value set by BeamItem c'tor } //! Takes ownership of argument 'axis'. diff --git a/GUI/Model/Tune/FitParameterItem.cpp b/GUI/Model/Tune/FitParameterItem.cpp index ba3e03c8dfe4a507d63bb430ccb296e133a60972..17ca357a07f79e7f45e5437b056da20566e825dd 100644 --- a/GUI/Model/Tune/FitParameterItem.cpp +++ b/GUI/Model/Tune/FitParameterItem.cpp @@ -268,7 +268,7 @@ double FitParameterItem::startValue() const void FitParameterItem::setStartValue(double start_value) { - m_start_value_item->setValue(start_value); + m_start_value_item->setDVal(start_value); } QObject* FitParameterItem::startValueItem() const @@ -283,7 +283,7 @@ double FitParameterItem::minimum() const void FitParameterItem::setMinimum(double minimum) { - m_min_item->setValue(minimum); + m_min_item->setDVal(minimum); } QObject* FitParameterItem::minimumItem() const @@ -298,7 +298,7 @@ double FitParameterItem::maximum() const void FitParameterItem::setMaximum(double maximum) { - m_max_item->setValue(maximum); + m_max_item->setDVal(maximum); } QObject* FitParameterItem::maximumItem() const diff --git a/GUI/Model/Tune/FitParameterItem.h b/GUI/Model/Tune/FitParameterItem.h index 663afce001147f24057550ccef30c18ea112d492..240f168a53bb6fb5ffece20bd687cdddaf645827 100644 --- a/GUI/Model/Tune/FitParameterItem.h +++ b/GUI/Model/Tune/FitParameterItem.h @@ -44,7 +44,7 @@ public: explicit FitDoubleItem(double value, QObject* parent = nullptr); double value() const { return m_value; } - void setValue(double value) { m_value = value; } + void setDVal(double value) { m_value = value; } const RealLimits& limits() const { return m_limits; } void setLimits(const RealLimits& l) { m_limits = l; } diff --git a/GUI/View/Device/DistributionSelector.cpp b/GUI/View/Device/DistributionSelector.cpp index 33e023e87366ffe7ea2e933f7287ed00583ba745..db9405aecda31d752575ef5f4c456f86b9b6ec76 100644 --- a/GUI/View/Device/DistributionSelector.cpp +++ b/GUI/View/Device/DistributionSelector.cpp @@ -113,7 +113,7 @@ DoubleSpinBox* DistributionSelector::createSpinBox(DoubleProperty& d) { auto* sb = GUI::Util::addDoubleSpinBoxRow(m_form_layout, d); connect(sb, &DoubleSpinBox::valueChanged, [this, &d](double v) { - d.setValue(v); + d.setDVal(v); emit distributionChanged(); }); return sb; @@ -125,7 +125,7 @@ void DistributionSelector::createMeanSpinBox(DoubleProperty& d) if (m_mean_config->scientific) { auto* sb = GUI::Util::addDoubleSpinBoxRow(m_form_layout, d); connect(sb, &DoubleSpinBox::valueChanged, [this, &d](double v) { - d.setValue(v); + d.setDVal(v); emit distributionChanged(); }); } else diff --git a/GUI/View/Device/PolarizationAnalysisEditor.cpp b/GUI/View/Device/PolarizationAnalysisEditor.cpp index e72aa92f98b61ae69b6c800b1db7c50beff8a7f0..19b47366346190a5945a6e9492e4d02a7cd78423 100644 --- a/GUI/View/Device/PolarizationAnalysisEditor.cpp +++ b/GUI/View/Device/PolarizationAnalysisEditor.cpp @@ -77,7 +77,7 @@ DoubleSpinBox* PolarizationAnalysisEditor::createSpinBox(DoubleProperty& d) auto* sb = new DoubleSpinBox(&d); connect(sb, &DoubleSpinBox::valueChanged, [this, &d](double v) { if (d.dVal() != v) { - d.setValue(v); + d.setDVal(v); emit dataChanged(); } }); diff --git a/GUI/View/Numeric/DoubleSpinBox.cpp b/GUI/View/Numeric/DoubleSpinBox.cpp index 4a5c3cc8892274e6d4f04221a58601a528c95f24..04abe2d87dc8a15bf5a2b7b6f543c2883f335a32 100644 --- a/GUI/View/Numeric/DoubleSpinBox.cpp +++ b/GUI/View/Numeric/DoubleSpinBox.cpp @@ -102,7 +102,7 @@ void DoubleSpinBox::setValue(double val) const double oldval = m_property->dVal(); val = m_property->limits().clamp(val); lineEdit()->setText(toString(val)); - m_property->setValue(fromDisplay()); + m_property->setDVal(fromDisplay()); if (m_property->dVal() != oldval) emit valueChanged(m_property->dVal()); } diff --git a/GUI/View/Sample/SampleEditorController.cpp b/GUI/View/Sample/SampleEditorController.cpp index dc1eaec32f2c9927f0f922abfecd7b7deb803aa4..95533bdbc4f4dd522807504e9e5d53a597b9663d 100644 --- a/GUI/View/Sample/SampleEditorController.cpp +++ b/GUI/View/Sample/SampleEditorController.cpp @@ -334,7 +334,7 @@ void SampleEditorController::removeParticle(ItemWithParticles* itemToRemove) void SampleEditorController::setDouble(double value, DoubleProperty& d) { - d.setValue(value); + d.setDVal(value); emit modified(); } diff --git a/GUI/View/Tuning/FitparQModel.cpp b/GUI/View/Tuning/FitparQModel.cpp index 2a8b6cb73aeb50bdcd5f0f2dcaf0a0503ec12d0f..462a767269bb8971de078496af6ca0f18612f7f7 100644 --- a/GUI/View/Tuning/FitparQModel.cpp +++ b/GUI/View/Tuning/FitparQModel.cpp @@ -388,7 +388,7 @@ void FitparQModel::setValueOfItem(QObject* item, const QVariant& value) if (auto* type = dynamic_cast<FitTypeItem*>(item)) type->setType(value.value<ComboProperty>()); if (auto* doubleVal = dynamic_cast<FitDoubleItem*>(item)) - doubleVal->setValue(value.toDouble()); + doubleVal->setDVal(value.toDouble()); if (auto* link = dynamic_cast<LinkItem*>(item)) link->setLink(value.toString()); }