Skip to content
Snippets Groups Projects

rm unfinished undo/redo engine (#757)

Merged Wuttke, Joachim requested to merge j.757 into main
1 file
+ 5
4
Compare changes
  • Side-by-side
  • Inline
@@ -17,13 +17,13 @@
#include "GUI/Model/Sample/FormFactorItemCatalog.h"
#include "GUI/Model/Sample/ItemWithParticlesCatalog.h"
#include <QUndoStack>
#include <QObject>
class ISelectionContainerForm;
class ISelectionProperty;
class CompoundItem;
class CoreAndShellForm;
class DoubleProperty;
class ISelectionContainerForm;
class ISelectionProperty;
class InterferenceForm;
class InterferenceItem;
class Item3D;
@@ -34,17 +34,19 @@ class LayerForm;
class LayerItem;
class MaterialModel;
class MesocrystalForm;
class SampleForm;
class SampleItem;
class ParticleLayoutItem;
class ProjectDocument;
class SampleForm;
class SampleItem;
class SelectionContainerForm;
//! Class to modify a sample from the layer oriented sample editor.
//!
//! Use this class to modify the sample model. It takes care of notifications and creating undo/redo
//! commands.
//! Use this class to modify the sample model. It takes care of notifications.
//! It operates on one SampleItem.
//!
//! Originally, it also supported undo/redo (never completed, withdrawn in release 22).
class SampleEditorController : public QObject {
Q_OBJECT
public:
@@ -62,9 +64,6 @@ public:
//! The item on which this controller operates.
SampleItem* sampleItem() const;
//! The contained undo stack.
QUndoStack* undoStack();
//! The materials of the current document
MaterialModel* materialModel() const;
@@ -74,10 +73,8 @@ public:
void addLayerItem(LayerItem* before);
QColor findColor(int atIndex);
void onLayerAdded(LayerItem* layer);
void addLayerItemFromUndo(int atIndex);
void duplicateLayerItem(const LayerItem* layer);
void removeLayerItem(LayerItem* layer);
void removeLayerItemFromUndo(int atIndex);
void onLayoutAdded(LayerForm* layerForm, ParticleLayoutItem* layout);
void addLayoutItem(LayerForm* layerForm);
@@ -103,15 +100,14 @@ public:
void setMesocrystalBasis(MesocrystalForm* widget, ItemWithParticlesCatalog::Type type);
void setMesocrystalBasis(MesocrystalForm* widget, FormFactorItemCatalog::Type type);
void selectInterference(InterferenceForm* widget, int newIndex);
void setIntegrateOverXi(LatticeTypeSelectionForm* widget, bool newValue);
void setIntegrateOverXi(LatticeTypeSelectionForm* widget, bool value);
void setDouble(double newValue, DoubleProperty& d);
void setDoubleFromUndo(double newValue, const QString& path);
void setDouble(double value, DoubleProperty& d);
void setCurrentIndex(ISelectionContainerForm* widget, int index, ISelectionProperty& d);
void selectMaterial(ItemWithMaterial* item, const QString& newMaterialIdentifier);
void setMaterialValue(ItemWithMaterial* item, double newValue, DoubleProperty& d);
void setMaterialValue(ItemWithMaterial* item, double value, DoubleProperty& d);
//! Set an interference function's value which affects the total particle density of the
//! containing particle layout.
@@ -119,7 +115,7 @@ public:
//! Some values in interference settings affect the total density in the particle layout which
//! contains this interference function. Call this method to provide all the related updating
//! (data & UI).
void setDensityRelatedValue(InterferenceItem* interferenceItem, double newValue,
void setDensityRelatedValue(InterferenceItem* interferenceItem, double value,
DoubleProperty& d);
void onStoppedToMoveLayer(QWidget* widgetToMove, QWidget* moveAboveThisWidget);
@@ -136,8 +132,6 @@ private:
ItemWithParticles* createAndInitItem(FormFactorItemCatalog::Type formFactorType) const;
ItemWithParticles* createAndInitItem(ItemWithParticlesCatalog::Type itemType) const;
private:
QUndoStack m_undoStack;
SampleItem* m_sampleItem;
SampleForm* m_sampleForm;
ProjectDocument* m_document;
Loading