diff --git a/GUI/Model/Descriptor/AxisProperty.cpp b/GUI/Model/Descriptor/AxisProperty.cpp index a485d191a68cb86aa3c1fd071007a41bed046040..b0ed1ed4f75360cdc54f6fa5a75a878e4b4c0ae5 100644 --- a/GUI/Model/Descriptor/AxisProperty.cpp +++ b/GUI/Model/Descriptor/AxisProperty.cpp @@ -22,7 +22,7 @@ namespace Tag { const QString Nbins("Nbins"); const QString Min("Min"); const QString Max("Max"); -const QString ExpandGroupbox("ExpandGroupbox"); +const QString ExpandGroupbox("ExpandGroupbox"); // obsolete since v22.0 } // namespace Tag } // namespace @@ -50,7 +50,7 @@ Scale AxisProperty::createAxis(const std::string& name) const void AxisProperty::writeTo(QXmlStreamWriter* w) const { - XML::writeAttribute(w, XML::Attrib::version, uint(1)); + XML::writeAttribute(w, XML::Attrib::version, uint(2)); // nbins w->writeStartElement(Tag::Nbins); @@ -66,11 +66,6 @@ void AxisProperty::writeTo(QXmlStreamWriter* w) const w->writeStartElement(Tag::Max); m_max.writeTo(w); w->writeEndElement(); - - // groupbox: is expanded? - w->writeStartElement(Tag::ExpandGroupbox); - XML::writeAttribute(w, XML::Attrib::value, expandGroupBox); - w->writeEndElement(); } void AxisProperty::readFrom(QXmlStreamReader* r) @@ -96,11 +91,6 @@ void AxisProperty::readFrom(QXmlStreamReader* r) m_max.readFrom(r); XML::gotoEndElementOfTag(r, tag); - // groupbox: is expanded? - } else if (tag == Tag::ExpandGroupbox) { - XML::readAttribute(r, XML::Attrib::value, &expandGroupBox); - XML::gotoEndElementOfTag(r, tag); - } else r->skipCurrentElement(); } diff --git a/GUI/Model/Descriptor/AxisProperty.h b/GUI/Model/Descriptor/AxisProperty.h index 83d51747c0031af5b61ce84836a6e6795b020e27..b9ac1b5d40dd6c7b6c2d274c1eda47cecffd2768 100644 --- a/GUI/Model/Descriptor/AxisProperty.h +++ b/GUI/Model/Descriptor/AxisProperty.h @@ -54,8 +54,6 @@ public: uint nbins() const { return m_nbins; } void setNbins(uint v) { m_nbins = v; } - bool expandGroupBox = true; - void writeTo(QXmlStreamWriter* w) const; void readFrom(QXmlStreamReader* r); diff --git a/GUI/View/Device/AxisPropertyForm.cpp b/GUI/View/Device/AxisPropertyForm.cpp index 88fb2fdce292fa7f549cc16f5303af740cc395c1..0cfcdee3f8f460c40be47ab65a5dc14d8c03a621 100644 --- a/GUI/View/Device/AxisPropertyForm.cpp +++ b/GUI/View/Device/AxisPropertyForm.cpp @@ -20,7 +20,7 @@ AxisPropertyForm::AxisPropertyForm(QWidget* parent, const QString& groupTitle, AxisProperty* axisProperty, QString nbinsTooltip) - : CollapsibleGroupBox(groupTitle, parent, axisProperty->expandGroupBox) + : StaticGroupBox(groupTitle, parent) , m_axisProperty(axisProperty) { auto* layout = new QFormLayout; diff --git a/GUI/View/Device/AxisPropertyForm.h b/GUI/View/Device/AxisPropertyForm.h index caf626f9ed11787807e11a0cc58f01836a9c3fbc..1fa69b0c215bae105d91d773b20f53a0e8a0fbb9 100644 --- a/GUI/View/Device/AxisPropertyForm.h +++ b/GUI/View/Device/AxisPropertyForm.h @@ -26,7 +26,7 @@ class QSpinBox; //! An AxisProperty handles values for a EquiDivision. 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 AxisPropertyForm : public CollapsibleGroupBox { +class AxisPropertyForm : public StaticGroupBox { Q_OBJECT public: AxisPropertyForm(QWidget* parent, const QString& groupTitle, AxisProperty* axisProperty,