28#include <QtDesigner/abstractpropertyeditor.h>
36 const std::shared_ptr<memoryxcontroller::MemoryXController>& memoryXController,
37 const std::shared_ptr<scene3D::Scene>& scene,
38 const std::string& objectId) :
39 Operation(memoryXController, scene, objectId), wasSelected(false)
48 std::shared_ptr<controller::Operation> inverseOperation(
50 return inverseOperation;
54 std::shared_ptr<controller::Operation> inverseOperation(
56 return inverseOperation;
69 std::shared_ptr<scene3D::Scene> scene =
getScene();
74 throw std::logic_error(
"Object does not exist");
77 if (scene->getSelectionManager()->isSelected(
object))
83 scene->getSelectionManager()->addToSelection(
object);
A operation to deselect a object.
A operation which does nothing.
std::string getObjectId() const
Returns the ID of the object, this Operation is working on.
const std::shared_ptr< memoryxcontroller::MemoryXController > getMemoryXController() const
Returns the the MemoryXController to execute the Operation at.
const std::shared_ptr< scene3D::Scene > getScene() const
Returns the the Scene to execute the Operation at.
Operation(const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &objectId)
A constructor.
SelectOperation(const std::shared_ptr< memoryxcontroller::MemoryXController > &memoryXController, const std::shared_ptr< scene3D::Scene > &scene, const std::string &objectId)
Creates a new operation, which selects a object.
const OperationPtr createInverseOperation() const override
Returns a new operation, which deselects the object again.
void executeOnScene() override
Selects the object.
void executeOnWorkingMemory() override
Because the WorkingMemory does not support selection, nothing is done on the WorkingMemory.
std::shared_ptr< Operation > OperationPtr
boost::intrusive_ptr< SceneObject > SceneObjectPtr