|
|
A class to execute Operations, maintain the execution history and initialize Scene and MemoryXController. More...
#include <MemoryX/gui-plugins/SceneEditor/controller/Controller.h>
Inheritance diagram for Controller:Signals | |
| void | minimapClicked () |
| A signal which gets triggered, after a click was performed on the minimap. | |
| void | objectClassSelected (const std::string &objectClass, const std::string &collection) |
| A signal which gets triggered, after a class gets selected. | |
| void | objectsChanged (controller::vector_string objectIds) |
| A signal which gets triggered, if objects are moved or rotated. | |
| void | operationExecuted (controller::vector_string objectIds) |
| A signal which gets triggered, after a vector of operations is executed. | |
| void | reloadScene () |
| A signal which gets triggered, after the scene is reloaded. | |
| void | sceneObjectSelected (scene3D::SceneObjectPtr object) |
| A signal which gets triggered, after a object gets selected. | |
Public Member Functions | |
| void | clearScene () |
| Deletes all objects in local scene and in WorkingMemory and deletes all groups. | |
| void | execute (int flags, const OperationPtrListPtr &operations, bool blocking=true) |
| Executes multiple operations. | |
| void | executeQueuedOperations (bool blocking=true) |
| Executes the Operations, which are queued because the object, which would be affected by this was busy. | |
| const std::shared_ptr< memoryxcontroller::MemoryXController > | getMemoryXController () const |
| Returns the MemoryXController. | |
| const std::shared_ptr< scene3D::Scene > | getScene () const |
| Returns the Scene. | |
| const std::shared_ptr< gui::ShortcutController > | getShortcutController () const |
| Returns the ShortcutController. | |
| void | redo () |
| Goes one step forward in the history and redoes the corresponding Operations. | |
| void | reloadLocalScene () |
| Deletes all objects in the local Scene and loads the current objects from the WorkingMemory in the Scene. | |
| void | saveSnapshotAsJSON (std::string const &snapshotName) |
| void | triggerMinimapClicked () |
| Triggers signal controller:Controller::minimapClicked. | |
| void | triggerObjectClassSelected (const std::string &objectClass, const std::string &collection) |
| Triggers signal controller:Controller::objectClassSelected with given parameter. | |
| void | triggerObjectsChanged (controller::vector_string objectIds) |
| Triggers signal controller:Controller::objectsChanged with given parameter. | |
| void | triggerSceneObjectSelected (scene3D::SceneObjectPtr object) |
| Triggers signal controller:Controller::sceneObjectSelected with given parameter. | |
| void | undo () |
| Goes one step back in the history and undoes the corresponding Operations. | |
| ~Controller () override | |
| A destructor. | |
Static Public Member Functions | |
| static ControllerPtr | create () |
| Creates a new instance of the Controller, initializes the Scene and the MemoryXController and returns the new Controller. | |
Static Public Attributes | |
| static const int | EXECUTE_ON_SCENE = 1 << 1 |
| A flag to execute operations on the Scene. | |
| static const int | EXECUTE_ON_WM = 1 << 0 |
| A Flag to execute operations on the WorkingMemory. | |
| static const int | UNDOABLE = 1 << 2 |
| A flag to save the executed operations to the history. | |
A class to execute Operations, maintain the execution history and initialize Scene and MemoryXController.
Definition at line 55 of file Controller.h.
|
override |
| void clearScene | ( | ) |
Deletes all objects in local scene and in WorkingMemory and deletes all groups.
The operations are performed using undoable operations.
Definition at line 346 of file Controller.cpp.
Here is the call graph for this function:
|
static |
Creates a new instance of the Controller, initializes the Scene and the MemoryXController and returns the new Controller.
Definition at line 52 of file Controller.cpp.
Here is the call graph for this function:| void execute | ( | int | flags, |
| const OperationPtrListPtr & | operations, | ||
| bool | blocking = true ) |
Executes multiple operations.
The Operations will be run depending on the flags: flags & EXECUTE_ON_WM == 1 => The Operations will be run at the WorkingMemory. flags & EXECUTE_ON_SCENE == 1 => The Operations will be run at the Scene. flags & UNDOABLE == 1 => The Operations will be saved to the history.
| flags | The flags for the execution. |
| operations | The operations to execute. |
| blocking | If true, wait for ending of execution. |
Definition at line 69 of file Controller.cpp.
Here is the caller graph for this function:| void executeQueuedOperations | ( | bool | blocking = true | ) |
Executes the Operations, which are queued because the object, which would be affected by this was busy.
| blocking | If true, wait for ending of execution. |
Definition at line 247 of file Controller.cpp.
Here is the call graph for this function:| const std::shared_ptr< memoryxcontroller::MemoryXController > getMemoryXController | ( | ) | const |
Returns the MemoryXController.
Definition at line 295 of file Controller.cpp.
Here is the caller graph for this function:| const std::shared_ptr< scene3D::Scene > getScene | ( | ) | const |
Returns the Scene.
Definition at line 289 of file Controller.cpp.
Here is the caller graph for this function:| const std::shared_ptr< gui::ShortcutController > getShortcutController | ( | ) | const |
Returns the ShortcutController.
Definition at line 301 of file Controller.cpp.
|
signal |
A signal which gets triggered, after a click was performed on the minimap.
Here is the caller graph for this function:
|
signal |
A signal which gets triggered, after a class gets selected.
| objectClass | The class of the selected class. |
| collection | The collection of the selected class. |
Here is the caller graph for this function:
|
signal |
A signal which gets triggered, if objects are moved or rotated.
| objectIds | The IDs of the changed objects. |
Here is the caller graph for this function:
|
signal |
A signal which gets triggered, after a vector of operations is executed.
| objectIds | The IDs of the objects affected by the executed operations. |
| void redo | ( | ) |
Goes one step forward in the history and redoes the corresponding Operations.
Definition at line 314 of file Controller.cpp.
Here is the call graph for this function:| void reloadLocalScene | ( | ) |
Deletes all objects in the local Scene and loads the current objects from the WorkingMemory in the Scene.
Definition at line 265 of file Controller.cpp.
Here is the call graph for this function:
|
signal |
A signal which gets triggered, after the scene is reloaded.
Here is the caller graph for this function:| void saveSnapshotAsJSON | ( | std::string const & | snapshotName | ) |
|
signal |
A signal which gets triggered, after a object gets selected.
| object | The object which was selected. |
Here is the caller graph for this function:| void triggerMinimapClicked | ( | ) |
Triggers signal controller:Controller::minimapClicked.
Definition at line 334 of file Controller.cpp.
Here is the call graph for this function:| void triggerObjectClassSelected | ( | const std::string & | objectClass, |
| const std::string & | collection ) |
Triggers signal controller:Controller::objectClassSelected with given parameter.
| objectClass | The class of the selected class. |
| collection | The collection of the selected class. |
Definition at line 321 of file Controller.cpp.
Here is the call graph for this function:| void triggerObjectsChanged | ( | controller::vector_string | objectIds | ) |
Triggers signal controller:Controller::objectsChanged with given parameter.
| objectIds | The IDs of the changed objects. |
Definition at line 340 of file Controller.cpp.
Here is the call graph for this function:| void triggerSceneObjectSelected | ( | scene3D::SceneObjectPtr | object | ) |
Triggers signal controller:Controller::sceneObjectSelected with given parameter.
| object | The object which was selected. |
Definition at line 328 of file Controller.cpp.
Here is the call graph for this function:| void undo | ( | ) |
Goes one step back in the history and undoes the corresponding Operations.
Definition at line 307 of file Controller.cpp.
Here is the call graph for this function:
|
static |
A flag to execute operations on the Scene.
Definition at line 73 of file Controller.h.
|
static |
A Flag to execute operations on the WorkingMemory.
Definition at line 66 of file Controller.h.
|
static |
A flag to save the executed operations to the history.
Definition at line 80 of file Controller.h.