Skip to content
Snippets Groups Projects
Commit e51ab8d8 authored by Mikhail Svechnikov's avatar Mikhail Svechnikov
Browse files

[m.i825b] Make 'AxisPropertyForm' non-collapsible ()

Merging branch 'm.i825b'  into 'main'.

See merge request !2099
parents 6eb68129 655adddb
No related branches found
No related tags found
1 merge request!2099Make 'AxisPropertyForm' non-collapsible
Pipeline #118945 passed
...@@ -22,7 +22,7 @@ namespace Tag { ...@@ -22,7 +22,7 @@ namespace Tag {
const QString Nbins("Nbins"); const QString Nbins("Nbins");
const QString Min("Min"); const QString Min("Min");
const QString Max("Max"); const QString Max("Max");
const QString ExpandGroupbox("ExpandGroupbox"); const QString ExpandGroupbox("ExpandGroupbox"); // obsolete since v22.0
} // namespace Tag } // namespace Tag
} // namespace } // namespace
...@@ -50,7 +50,7 @@ Scale AxisProperty::createAxis(const std::string& name) const ...@@ -50,7 +50,7 @@ Scale AxisProperty::createAxis(const std::string& name) const
void AxisProperty::writeTo(QXmlStreamWriter* w) const void AxisProperty::writeTo(QXmlStreamWriter* w) const
{ {
XML::writeAttribute(w, XML::Attrib::version, uint(1)); XML::writeAttribute(w, XML::Attrib::version, uint(2));
// nbins // nbins
w->writeStartElement(Tag::Nbins); w->writeStartElement(Tag::Nbins);
...@@ -66,11 +66,6 @@ void AxisProperty::writeTo(QXmlStreamWriter* w) const ...@@ -66,11 +66,6 @@ void AxisProperty::writeTo(QXmlStreamWriter* w) const
w->writeStartElement(Tag::Max); w->writeStartElement(Tag::Max);
m_max.writeTo(w); m_max.writeTo(w);
w->writeEndElement(); w->writeEndElement();
// groupbox: is expanded?
w->writeStartElement(Tag::ExpandGroupbox);
XML::writeAttribute(w, XML::Attrib::value, expandGroupBox);
w->writeEndElement();
} }
void AxisProperty::readFrom(QXmlStreamReader* r) void AxisProperty::readFrom(QXmlStreamReader* r)
...@@ -96,11 +91,6 @@ void AxisProperty::readFrom(QXmlStreamReader* r) ...@@ -96,11 +91,6 @@ void AxisProperty::readFrom(QXmlStreamReader* r)
m_max.readFrom(r); m_max.readFrom(r);
XML::gotoEndElementOfTag(r, tag); XML::gotoEndElementOfTag(r, tag);
// groupbox: is expanded?
} else if (tag == Tag::ExpandGroupbox) {
XML::readAttribute(r, XML::Attrib::value, &expandGroupBox);
XML::gotoEndElementOfTag(r, tag);
} else } else
r->skipCurrentElement(); r->skipCurrentElement();
} }
......
...@@ -54,8 +54,6 @@ public: ...@@ -54,8 +54,6 @@ public:
uint nbins() const { return m_nbins; } uint nbins() const { return m_nbins; }
void setNbins(uint v) { m_nbins = v; } void setNbins(uint v) { m_nbins = v; }
bool expandGroupBox = true;
void writeTo(QXmlStreamWriter* w) const; void writeTo(QXmlStreamWriter* w) const;
void readFrom(QXmlStreamReader* r); void readFrom(QXmlStreamReader* r);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
AxisPropertyForm::AxisPropertyForm(QWidget* parent, const QString& groupTitle, AxisPropertyForm::AxisPropertyForm(QWidget* parent, const QString& groupTitle,
AxisProperty* axisProperty, QString nbinsTooltip) AxisProperty* axisProperty, QString nbinsTooltip)
: CollapsibleGroupBox(groupTitle, parent, axisProperty->expandGroupBox) : StaticGroupBox(groupTitle, parent)
, m_axisProperty(axisProperty) , m_axisProperty(axisProperty)
{ {
auto* layout = new QFormLayout; auto* layout = new QFormLayout;
......
...@@ -26,7 +26,7 @@ class QSpinBox; ...@@ -26,7 +26,7 @@ class QSpinBox;
//! An AxisProperty handles values for a EquiDivision. The values will be already written into the //! 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 //! 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. //! dependent values or to set the document to modified.
class AxisPropertyForm : public CollapsibleGroupBox { class AxisPropertyForm : public StaticGroupBox {
Q_OBJECT Q_OBJECT
public: public:
AxisPropertyForm(QWidget* parent, const QString& groupTitle, AxisProperty* axisProperty, AxisPropertyForm(QWidget* parent, const QString& groupTitle, AxisProperty* axisProperty,
......
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