Skip to content
Snippets Groups Projects
Commit 9809a99f authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

unify arg names

parent 7aa436d2
No related branches found
No related tags found
1 merge request!2003In GUI, remove option to switch beteen nm and angstrom, degrees and radians.
Pipeline #114403 passed
...@@ -35,9 +35,9 @@ DoubleLineEdit::DoubleLineEdit(QWidget* parent, const DoubleProperty& d) ...@@ -35,9 +35,9 @@ DoubleLineEdit::DoubleLineEdit(QWidget* parent, const DoubleProperty& d)
connect(this, &QLineEdit::editingFinished, this, &DoubleLineEdit::onEditingFinished); connect(this, &QLineEdit::editingFinished, this, &DoubleLineEdit::onEditingFinished);
} }
void DoubleLineEdit::setBaseValue(double baseValue) void DoubleLineEdit::setBaseValue(double value)
{ {
setText(QString::number(baseValue, 'g')); setText(QString::number(value, 'g'));
} }
void DoubleLineEdit::updateBaseValue() void DoubleLineEdit::updateBaseValue()
......
...@@ -31,15 +31,13 @@ public: ...@@ -31,15 +31,13 @@ public:
DoubleLineEdit(QWidget* parent, const DoubleProperty& d); DoubleLineEdit(QWidget* parent, const DoubleProperty& d);
//! Set the base value (unit is the one of the contained descriptor). //! Set the base value (unit is the one of the contained descriptor).
void setBaseValue(double baseValue); void setBaseValue(double value);
void updateBaseValue(); void updateBaseValue();
signals: signals:
//! Emitted whenever the value changes. //! Emitted whenever the value changes.
//! void baseValueChanged(double value);
//! newBaseValue is in the unit of the valueProperty.
void baseValueChanged(double newBaseValue);
private slots: private slots:
void onEditingFinished(); void onEditingFinished();
......
...@@ -43,9 +43,9 @@ QString DoubleSpinBox::uid() const ...@@ -43,9 +43,9 @@ QString DoubleSpinBox::uid() const
// This method is only used in undo/redo functionality in SampleEditorController // This method is only used in undo/redo functionality in SampleEditorController
// On its removal the input arguments of DoubleSpinbox and GUI::Util::createDoubleSpinBoxRow // On its removal the input arguments of DoubleSpinbox and GUI::Util::createDoubleSpinBoxRow
// can be changed to "const DoubleProperty&" // can be changed to "const DoubleProperty&"
void DoubleSpinBox::setPropertyValue(double v) void DoubleSpinBox::setPropertyValue(double value)
{ {
m_valueProperty.setValue(v); m_valueProperty.setValue(value);
} }
void DoubleSpinBox::setBaseValue(double value) void DoubleSpinBox::setBaseValue(double value)
......
...@@ -30,7 +30,7 @@ public: ...@@ -30,7 +30,7 @@ public:
DoubleSpinBox(DoubleProperty& d, bool easyScrollable = false, QWidget* parent = nullptr); DoubleSpinBox(DoubleProperty& d, bool easyScrollable = false, QWidget* parent = nullptr);
//! Set the value //! Set the value
void setBaseValue(double baseValue); void setBaseValue(double value);
void setPropertyValue(double v); void setPropertyValue(double v);
QString uid() const; QString uid() const;
...@@ -42,9 +42,7 @@ public: ...@@ -42,9 +42,7 @@ public:
signals: signals:
//! Emitted whenever the value changes. //! Emitted whenever the value changes.
//! void baseValueChanged(double value);
//! newBaseValue is in the unit of the valueProperty.
void baseValueChanged(double newBaseValue);
private: private:
void wheelEvent(QWheelEvent* event) override; void wheelEvent(QWheelEvent* event) override;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment