#ifndef AMUSE_EDITOR_WIDGET_HPP #define AMUSE_EDITOR_WIDGET_HPP #include #include #include #include "ProjectModel.hpp" class EditorWidget : public QWidget { Q_OBJECT public: explicit EditorWidget(QWidget* parent = Q_NULLPTR); virtual bool valid() const { return true; } virtual void unloadData() {} virtual ProjectModel::INode* currentNode() const { return nullptr; } }; class EditorUndoCommand : public QUndoCommand { protected: amuse::ObjToken m_node; enum class Id { SMChangeVal, }; public: EditorUndoCommand(amuse::ObjToken node, const QString& text, QUndoCommand* parent = nullptr) : QUndoCommand(text, parent), m_node(node) {} void undo(); void redo(); }; #endif //AMUSE_EDITOR_WIDGET_HPP