diff --git a/GUI/View/SampleDesigner/HeinzFormLayout.h b/GUI/View/SampleDesigner/HeinzFormLayout.h index 441527a3e91cf86d40e290d6cba6c83a69e4278b..2aedcf3c15659119b6199fb92d8006eaac9238b7 100644 --- a/GUI/View/SampleDesigner/HeinzFormLayout.h +++ b/GUI/View/SampleDesigner/HeinzFormLayout.h @@ -66,8 +66,8 @@ public: //! The DoubleSpinBox is initialized with the contents found in the DoubleProperty (e.g. limits, //! decimals, unit). The DoubleSpinBox is set as the "buddy" of the label. This is necessary to //! realize the "label shows unit of value" feature. Changes of the DoubleSpinBox are signaled - //! to the SampleEditorController which has been overhanded in the constructor of this - //! FormLayouter. It is connected to SampleEditorController::setDouble(). If a different method + //! to the SampleEditorController which has been overhanded in the constructor of this. + //! It is connected to SampleEditorController::setDouble(). If a different method //! should be called (e.g. for a special undo functionality), this method is not sufficient. It //! would have to be done "manually" or with the overload which takes a slot (see below). //! Returns the newly added row. diff --git a/GUI/View/SampleDesigner/MesocrystalForm.cpp b/GUI/View/SampleDesigner/MesocrystalForm.cpp index 96b21276cf5bcb2828973c117e31b230ca389da8..48a284b8b682d201829cbf30cd09bc35cb9dd9fe 100644 --- a/GUI/View/SampleDesigner/MesocrystalForm.cpp +++ b/GUI/View/SampleDesigner/MesocrystalForm.cpp @@ -18,7 +18,7 @@ #include "GUI/Model/Sample/MesocrystalItem.h" #include "GUI/Model/Sample/ParticleItem.h" #include "GUI/Support/Util/ActionFactory.h" -#include "GUI/View/SampleDesigner/FormLayouter.h" +#include "GUI/View/SampleDesigner/HeinzFormLayout.h" #include <QAction> MesocrystalForm::MesocrystalForm(QWidget* parent, MesocrystalItem* mesocrystalItem, @@ -27,23 +27,23 @@ MesocrystalForm::MesocrystalForm(QWidget* parent, MesocrystalItem* mesocrystalIt , m_item(mesocrystalItem) , m_ec(ec) { - FormLayouter layouter(this, ec); - m_layout = layouter.layout(); + m_layout = new HeinzFormLayout(this, ec); body()->setLayout(m_layout); - layouter.setContentsMargins(30, 6, 0, 0); - layouter.addVector(mesocrystalItem->position(), false); - layouter.addSelection(mesocrystalItem->rotationSelection()); - layouter.addValue(mesocrystalItem->abundance()); - layouter.addVector(mesocrystalItem->vectorA(), false); - layouter.addVector(mesocrystalItem->vectorB(), false); - layouter.addVector(mesocrystalItem->vectorC(), false); + m_layout->setContentsMargins(30, 6, 0, 0); + m_layout->addVector(mesocrystalItem->position(), false); + m_layout->addSelection(mesocrystalItem->rotationSelection()); + m_layout->addValue(mesocrystalItem->abundance()); + m_layout->addVector(mesocrystalItem->vectorA(), false); + m_layout->addVector(mesocrystalItem->vectorB(), false); + m_layout->addVector(mesocrystalItem->vectorC(), false); - layouter.addSelection(mesocrystalItem->outerShapeSelection()); + m_layout->addSelection(mesocrystalItem->outerShapeSelection()); m_basisCombo = createBasisCombo(this, mesocrystalItem->basisItem()); connect(m_basisCombo, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &MesocrystalForm::onBasisComboChanged); - m_rowOfBasisTypeCombo = layouter.addRow("Basis type", m_basisCombo); + m_layout->addRow("Basis type", m_basisCombo); + m_rowOfBasisTypeCombo = m_layout->rowCount() - 1; createBasisWidgets(); //... top right corner actions diff --git a/GUI/View/SampleDesigner/MesocrystalForm.h b/GUI/View/SampleDesigner/MesocrystalForm.h index 43f0b81a4a53558efa892a2cdf566c39438aa467..7f4366db5c262c3911046230ee91c6c0d96f112f 100644 --- a/GUI/View/SampleDesigner/MesocrystalForm.h +++ b/GUI/View/SampleDesigner/MesocrystalForm.h @@ -17,11 +17,11 @@ #include "GUI/View/Widget/GroupBoxes.h" #include <QComboBox> -#include <QFormLayout> +class HeinzFormLayout; +class ItemWithParticles; class MesocrystalItem; class SampleEditorController; -class ItemWithParticles; //! Form for editing a mesocrystal class MesocrystalForm : public CollapsibleGroupBox { @@ -39,7 +39,7 @@ private: void onBasisComboChanged(); - QFormLayout* m_layout; + HeinzFormLayout* m_layout; MesocrystalItem* m_item; QAction* m_removeAction = nullptr; QAction* m_duplicateAction = nullptr;