29 #include <QPushButton>
34 , m_layoutItem(layoutItem)
86 const int rowInLayout =
96 const int rowInLayout =
114 const auto layouts = layerItem->
layouts();
115 if (layouts.size() > 1)
Defines class ActionFactory.
Defines class DoubleSpinBox.
Defines class GroupBoxCollapser.
Defines InterferenceItems's classes.
Defines abstract item with a material property.
Defines class LayerEditorUtils.
Defines class ParticleLayoutForm.
Defines class ParticleLayoutItem.
Defines class SampleEditorController.
static QAction * createShowInRealSpaceAction(QObject *parent, const QString &what, std::function< void()> slot=nullptr)
Create "show in RealSpace" action.
static QAction * createRemoveAction(QObject *parent, const QString &what, std::function< void()> slot=nullptr)
Create "remove" action.
SpinBox for DoubleDescriptors, supporting units.
void updateValue()
Update the shown value to the one contained in the value descriptor.
void addAction(QAction *action)
Add a tool button to the title bar, connected to the given action.
static GroupBoxCollapser * installIntoGroupBox(QGroupBox *groupBox, bool expanded=true)
void setTitle(const QString &title)
Set the title of the group box. Do not use the method groupBox->setTitle() any more once the add-on i...
QVector< ParticleLayoutItem * > layouts() const
void enableStructureEditing(bool b)
void updateDensityEnabling()
Disable/enable total density property depending on type of interference function.
void onParticleAdded(ItemWithParticles *item)
SampleEditorController * m_ec
void onAboutToRemoveParticle(ItemWithParticles *item)
void updateTitle(const LayerItem *layerItem)
ParticleLayoutForm(LayerForm *parent, ParticleLayoutItem *layoutItem, SampleEditorController *ec)
GroupBoxCollapser * m_collapser
void updateDensityValue()
Update the shown density value.
ParticleLayoutItem * m_layoutItem
ParticleLayoutItem * layoutItem() const
DoubleSpinBox * m_totalDensitySpinBox
QList< QWidget * > m_structureEditingWidgets
bool totalDensityIsDefinedByInterference() const
Returns whether total density is defined by the currently selected interference.
DoubleDescriptor weight() const
DoubleDescriptor totalDensity() const
The real density.
QVector< ItemWithParticles * > particles() const
The particles this layout contains.
Class to modify a sample from the layer oriented sample editor.
void removeLayout(LayerForm *layerItem, ParticleLayoutItem *layout)
void requestViewInRealSpace(SampleItem item)
void addParticle(ParticleLayoutItem *layout, ItemWithParticlesCatalog::Type type)
QWidget * createWidgetForItemWithParticles(QWidget *parentWidget, ItemWithParticles *itemWithParticles, bool allowAbundance, SampleEditorController *ec, bool allowRemove=true)
QPushButton * createAddParticleButton(QWidget *parentWidget, std::function< void(FormFactorItemCatalog::Type t)> slotAddFormFactor, std::function< void(ItemWithParticlesCatalog::Type t)> slotAddParticle)