25 constexpr
int COMMAND_ID_CHANGE_VALUE = 11;
31 QUndoCommand* parent )
32 : QUndoCommand(parent)
35 setText(
"Remove layer");
77 double oldValue,
double newValue,
const QString& path,
78 QUndoCommand* parent )
79 : QUndoCommand(parent)
81 , m_oldValue(oldValue)
82 , m_newValue(newValue)
85 setText(
"change " + label +
"\n");
90 return COMMAND_ID_CHANGE_VALUE;
95 if (command->id() !=
id())
Defines GUI::Util namespace.
Defines class MultiLayerItem.
Defines command classes for LayerOrientedSampleEditor.
Defines class SampleEditorController.
@ other
The unit has no enum value defined in here (e.g. when defined as an explicit string)
SampleEditorController * m_ec
CommandAddLayer(SampleEditorController *ec, int atIndex, QUndoCommand *parent=nullptr)
Command to change a double value.
bool mergeWith(const QUndoCommand *command) override
SampleEditorController * m_ec
CommandChangeValue(const QString &label, SampleEditorController *ec, double oldValue, double newValue, const QString &path, QUndoCommand *parent=nullptr)
QByteArray m_layerItemBackup
SampleEditorController * m_ec
CommandRemoveLayer(SampleEditorController *ec, LayerItem *layerItem, QUndoCommand *parent=nullptr)
LayerItem * addLayer(int index=-1)
Creates and inserts a layer at given index.
QVector< LayerItem * > layers() const
Class to modify a sample from the layer oriented sample editor.
MultiLayerItem * sampleItem() const
The item on which this controller operates.
void addLayerFromUndo(int atIndex)
MultiLayerForm * sampleForm() const
The current form.
void setDoubleFromUndo(double newValue, const QString &path)
void removeLayerFromUndo(int atIndex)
void restoreBackup(T *t, const QByteArray &backup)
QByteArray createBackup(const T *t)