Skip to content
Snippets Groups Projects
Commit ed9ea7b8 authored by Matthias Puchner's avatar Matthias Puchner Committed by Wuttke, Joachim
Browse files

docu, corrections

parent aff1b012
No related branches found
No related tags found
1 merge request!706replace SessionItem signaling by Qt signaling in RealDataPropertiesWidget;...
Pipeline #57750 passed
...@@ -52,7 +52,7 @@ private: ...@@ -52,7 +52,7 @@ private:
DoubleDescriptor m_descriptor; DoubleDescriptor m_descriptor;
}; };
// #baMigration docu //! Add a member, a getter and a setter for a DoubleProperty
#define DOUBLE_PROPERTY(nameLower, nameUpper) \ #define DOUBLE_PROPERTY(nameLower, nameUpper) \
protected: \ protected: \
DoubleProperty m_##nameLower; \ DoubleProperty m_##nameLower; \
......
...@@ -54,7 +54,7 @@ private: ...@@ -54,7 +54,7 @@ private:
UIntDescriptor m_descriptor; UIntDescriptor m_descriptor;
}; };
// #baMigration docu //! Add a member, a getter and a bunch of overloaded setters for a UIntProperty
#define UINT_PROPERTY(nameLower, nameUpper) \ #define UINT_PROPERTY(nameLower, nameUpper) \
private: \ private: \
UIntProperty m_##nameLower; \ UIntProperty m_##nameLower; \
......
...@@ -48,7 +48,7 @@ private: ...@@ -48,7 +48,7 @@ private:
VectorDescriptor m_descriptor; VectorDescriptor m_descriptor;
}; };
// #baMigration docu //! Add a member, a getter and a setter for a VectorProperty
#define VECTOR_PROPERTY(nameLower, nameUpper) \ #define VECTOR_PROPERTY(nameLower, nameUpper) \
protected: \ protected: \
VectorProperty m_##nameLower; \ VectorProperty m_##nameLower; \
......
...@@ -27,11 +27,11 @@ AxisPropertyEditor::AxisPropertyEditor(QWidget* parent, const QString& groupTitl ...@@ -27,11 +27,11 @@ AxisPropertyEditor::AxisPropertyEditor(QWidget* parent, const QString& groupTitl
{ {
auto* formLayout = new QFormLayout(this); auto* formLayout = new QFormLayout(this);
nbinsSpinBox = GUI::Util::createSpinBox(formLayout, axisProperty->nbins()); m_nbinsSpinBox = GUI::Util::createSpinBox(formLayout, axisProperty->nbins());
m_minSpinBox = GUI::Util::createSpinBox(formLayout, axisProperty->min()); m_minSpinBox = GUI::Util::createSpinBox(formLayout, axisProperty->min());
m_maxSpinBox = GUI::Util::createSpinBox(formLayout, axisProperty->max()); m_maxSpinBox = GUI::Util::createSpinBox(formLayout, axisProperty->max());
connect(nbinsSpinBox, qOverload<int>(&QSpinBox::valueChanged), [=](int v) { connect(m_nbinsSpinBox, qOverload<int>(&QSpinBox::valueChanged), [=](int v) {
if (axisProperty->nbins() != static_cast<uint>(v)) { if (axisProperty->nbins() != static_cast<uint>(v)) {
axisProperty->setNbins(v); axisProperty->setNbins(v);
emit dataChanged(); emit dataChanged();
...@@ -63,8 +63,8 @@ AxisPropertyEditor::AxisPropertyEditor(QWidget* parent, const QString& groupTitl ...@@ -63,8 +63,8 @@ AxisPropertyEditor::AxisPropertyEditor(QWidget* parent, const QString& groupTitl
void AxisPropertyEditor::updateData() void AxisPropertyEditor::updateData()
{ {
QSignalBlocker b(nbinsSpinBox); QSignalBlocker b(m_nbinsSpinBox);
nbinsSpinBox->setValue(m_axisProperty->nbins()); m_nbinsSpinBox->setValue(m_axisProperty->nbins());
m_minSpinBox->updateValue(); m_minSpinBox->updateValue();
m_maxSpinBox->updateValue(); m_maxSpinBox->updateValue();
} }
...@@ -21,7 +21,11 @@ class QSpinBox; ...@@ -21,7 +21,11 @@ class QSpinBox;
class AxisProperty; class AxisProperty;
class DoubleSpinBox; class DoubleSpinBox;
// #bamigration docu //! Use this to edit an AxisProperty.
//!
//! An AxisProperty handles values for a FixedBinAxis. The values will be already written into the
//! data element. For each change of values, a signal will be emitted. Use this e.g. to update
//! dependent values or to set the document to modified.
class AxisPropertyEditor : public QGroupBox { class AxisPropertyEditor : public QGroupBox {
Q_OBJECT Q_OBJECT
public: public:
...@@ -34,7 +38,7 @@ signals: ...@@ -34,7 +38,7 @@ signals:
void dataChanged(); void dataChanged();
private: private:
QSpinBox* nbinsSpinBox; QSpinBox* m_nbinsSpinBox;
AxisProperty* m_axisProperty; AxisProperty* m_axisProperty;
DoubleSpinBox* m_minSpinBox; DoubleSpinBox* m_minSpinBox;
DoubleSpinBox* m_maxSpinBox; DoubleSpinBox* m_maxSpinBox;
......
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