55 class Controller :
public QObject
126 const std::shared_ptr<scene3D::Scene>
getScene()
const;
163 const std::string& collection);
246 std::shared_ptr<scene3D::Scene> scene;
247 std::shared_ptr<memoryxcontroller::MemoryXController> memoryXController;
248 std::shared_ptr<gui::ShortcutController> shortcutController;
249 mutable std::recursive_mutex execute_mutex;
250 mutable std::mutex queue_mutex;
252 std::vector<std::pair<int, OperationPtr>> queuedOperations;
void execute(int flags, const OperationPtrListPtr &operations, bool blocking=true)
Executes multiple operations.
void undo()
Goes one step back in the history and undoes the corresponding Operations.
void triggerSceneObjectSelected(scene3D::SceneObjectPtr object)
Triggers signal controller:Controller::sceneObjectSelected with given parameter.
const std::shared_ptr< memoryxcontroller::MemoryXController > getMemoryXController() const
Returns the MemoryXController.
void triggerMinimapClicked()
Triggers signal controller:Controller::minimapClicked.
void triggerObjectsChanged(controller::vector_string objectIds)
Triggers signal controller:Controller::objectsChanged with given parameter.
void saveSnapshotAsJSON(std::string const &snapshotName)
void objectsChanged(controller::vector_string objectIds)
A signal which gets triggered, if objects are moved or rotated.
static const int UNDOABLE
A flag to save the executed operations to the history.
void clearScene()
Deletes all objects in local scene and in WorkingMemory and deletes all groups.
void triggerObjectClassSelected(const std::string &objectClass, const std::string &collection)
Triggers signal controller:Controller::objectClassSelected with given parameter.
void reloadScene()
A signal which gets triggered, after the scene is reloaded.
const std::shared_ptr< gui::ShortcutController > getShortcutController() const
Returns the ShortcutController.
static const int EXECUTE_ON_WM
A Flag to execute operations on the WorkingMemory.
const std::shared_ptr< scene3D::Scene > getScene() const
Returns the Scene.
void executeQueuedOperations(bool blocking=true)
Executes the Operations, which are queued because the object, which would be affected by this was bus...
void reloadLocalScene()
Deletes all objects in the local Scene and loads the current objects from the WorkingMemory in the Sc...
void redo()
Goes one step forward in the history and redoes the corresponding Operations.
void operationExecuted(controller::vector_string objectIds)
A signal which gets triggered, after a vector of operations is executed.
static const int EXECUTE_ON_SCENE
A flag to execute operations on the Scene.
static ControllerPtr create()
Creates a new instance of the Controller, initializes the Scene and the MemoryXController and returns...
void objectClassSelected(const std::string &objectClass, const std::string &collection)
A signal which gets triggered, after a class gets selected.
void minimapClicked()
A signal which gets triggered, after a click was performed on the minimap.
void sceneObjectSelected(scene3D::SceneObjectPtr object)
A signal which gets triggered, after a object gets selected.
~Controller() override
A destructor.
std::vector< std::string > vector_string
std::shared_ptr< Controller > ControllerPtr
std::shared_ptr< std::vector< OperationPtr > > OperationPtrListPtr
std::shared_ptr< UndoRedoStack > UndoRedoStackPtr
boost::intrusive_ptr< SceneObject > SceneObjectPtr