|
Developer Documentation
|
#include <Plugin-Datacontrol/DataControlPlugin.hh>
Public Slots | |
| QString | version () |
Signals | |
| void | updateView () |
| void | updatedObject (int _it, const UpdateType &_type) |
| void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions) |
| void | log (Logtype _type, QString _message) |
| void | log (QString _message) |
| void | addContextMenuItem (QAction *_action, ContextMenuType _type) |
| void | addContextMenuItem (QAction *_action, DataType _objectType, ContextMenuType _type) |
| void | deleteObject (int _id) |
| void | emptyObjectAdded (int _id) |
| void | copyObject (int _oldId, int &_newId) |
| void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget) |
| void | objectsGrouped (IdList) |
Signals inherited from BaseInterface | |
| virtual void | updateView () |
| Update current view in Main Application. | |
| virtual void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions) |
| Set a description for a public slot. | |
| virtual void | setRenderer (unsigned int _viewer, QString _rendererName) |
| Set a renderer for the given viewer. | |
Signals inherited from ToolboxInterface | |
| virtual void | addToolbox (QString _name, QWidget *_widget) |
| Add a toolbox widget to the gui with the given name. | |
Signals inherited from KeyInterface | |
| virtual void | registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false) |
| Register a key-combination for your plugin. | |
Signals inherited from LoggingInterface | |
| virtual void | log (Logtype _type, QString _message)=0 |
| virtual void | log (QString _message)=0 |
Signals inherited from ContextMenuInterface | |
| virtual void | addContextMenuItem (QAction *_action, ContextMenuType _type) |
| Add an entry for a context Menu. | |
Signals inherited from ScriptInterface | |
| virtual void | scriptInfo (QString _functionWithParameters) |
| Emit this signal if a scriptable function is executed. | |
| virtual void | getScriptingEngine (QScriptEngine *&_engine) |
| virtual void | executeFileScript (QString _filename) |
| virtual void | getAvailableFunctions (QStringList &_functions) |
Signals inherited from LoadSaveInterface | |
| virtual void | save (int _id, QString _filename) |
| Save object to a file. | |
| virtual void | load (QString _filename, DataType _type, int &_id) |
| Load object from file with a specific DataType. | |
Signals inherited from PythonInterface | |
| virtual void | executePythonScript (QString _script) |
Public Member Functions | |
| DataControlPlugin () | |
| Constructor. | |
| ~DataControlPlugin () | |
| Destructor. | |
| QString | name () |
| Name of the Plugin. | |
| QString | description () |
| Description of the Plugin. | |
Private Slots | |
| void | initializePlugin () |
| void | pluginsInitialized () |
| Plugin initialization. | |
| void | slotVisibilityChanged (int _identifier) |
| Update the model if the visibility of an object changed. | |
| void | slotObjectSelectionChanged (int _identifier) |
| update drawing of objects when the active object changed | |
| void | slotObjectPropertiesChanged (int _identifier) |
| Update the model if properties of an object changed. | |
| void | slotObjectUpdated (int _identifier, const UpdateType &_type) |
| void | slotKeyEvent (QKeyEvent *_event) |
| a key event occurred | |
| void | loadIniFileOptionsLast (INIFile &_ini) |
| Load Groups from ini file. | |
| void | saveIniFileOptions (INIFile &_ini) |
| Save groups to ini file. | |
| void | saveOnExit (INIFile &_ini) |
| Save settings before application is closed. | |
| void | fileOpened (int _id) |
| Update the model if a file has been opened. | |
| void | addedEmptyObject (int _id) |
| Update the model if an empty object has been added. | |
| void | objectDeleted (int _id) |
| an object was deleted. delete it internally | |
| void | noguiSupported () |
Private Slots inherited from BaseInterface | |
| virtual void | exit () |
| virtual QString | version () |
| Return a version string for your plugin. | |
Private Slots inherited from KeyInterface | |
| virtual void | slotKeyEvent (QKeyEvent *_event) |
| Key Event from Main App. | |
Private Member Functions | |
| void | slotObjectsGrouped (IdList _lst) |
| update objects when they have been grouped | |
Private Member Functions inherited from BaseInterface | |
| virtual void | noguiSupported () |
| virtual | ~BaseInterface () |
| Destructor. | |
| virtual void | blockScenegraphUpdates (bool _block) |
| Tell the core to prevent scenegraph updates. | |
| virtual void | updatedObject (int _objectId) |
| An object has been changed or added by this plugin. | |
| virtual void | updatedObject (int _identifier, const UpdateType &_type) |
| An object has been changed or added by this plugin. | |
| virtual void | nodeVisibilityChanged (int _identifier) |
| A scenegraph node has been shown or hidden. | |
| virtual void | getCurrentRenderer (unsigned int _viewer, QString &_rendererName) |
| Get the current renderer for the given viewer. | |
Private Member Functions inherited from ToolboxInterface | |
| virtual | ~ToolboxInterface () |
| Destructor. | |
| virtual void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon) |
| Add a toolbox widget to the gui with the given name and an icon. | |
| virtual void | addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget) |
| Add a toolbox widget to the gui with the given name, icon and header area widget. | |
Private Member Functions inherited from KeyInterface | |
| virtual void | slotKeyReleaseEvent (QKeyEvent *_event) |
| Key Release Event from Main App. | |
| virtual | ~KeyInterface () |
| Destructor. | |
Private Member Functions inherited from LoggingInterface | |
| virtual | ~LoggingInterface () |
| Destructor. | |
Private Member Functions inherited from INIInterface | |
| virtual | ~INIInterface () |
| Destructor. | |
Private Member Functions inherited from ContextMenuInterface | |
| virtual | ~ContextMenuInterface () |
| Destructor. | |
| virtual void | addContextMenuItem (QAction *_action, DataType _objectType, ContextMenuType _type) |
| Add an entry for a context Menu. | |
| virtual void | hideContextMenu () |
| hide the main context menu | |
Private Member Functions inherited from ScriptInterface | |
| virtual | ~ScriptInterface () |
| Destructor. | |
| virtual void | showScriptInEditor (QString _filename) |
| virtual void | executeScript (QString _script) |
| virtual void | getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions) |
Private Member Functions inherited from LoadSaveInterface | |
| virtual | ~LoadSaveInterface () |
| Destructor. | |
| virtual void | addEmptyObject (DataType _type, int &_id) |
| virtual void | copyObject (int _oldId, int &_newId) |
| virtual void | emptyObjectAdded (int _id) |
| DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. | |
| virtual void | deleteObject (int _id) |
| Delete an object This signal can be called from any thread. . | |
| virtual void | deleteAllObjects () |
| Delete all Objects. | |
| virtual void | getAllFileFilters (QStringList &_filters) |
| Get all file filters that are registered. | |
Private Member Functions inherited from PythonInterface | |
| virtual void | openPythonScriptInEditor (QString _script) |
| virtual | ~PythonInterface () |
| Destructor. | |
Private Attributes | |
| DatacontrolToolboxWidget * | tool_ |
| Widget for Toolbox. | |
| QIcon * | toolIcon_ |
| QGridLayout * | MeshDialogLayout_ |
| Layout for Toolbox. | |
| QTableWidget * | objectList_ |
| Table containing Mesh information and status. | |
| bool | locked |
| Flag set to true if meshlist is updated, preventing signal for list udate to be called. | |
| TreeModel * | model_ |
| The Treemodel organizing the data. | |
| QTreeView * | view_ |
| Tree view. | |
| QHeaderView * | viewHeader_ |
| Pointer to the header to the view widget. | |
| DefaultObjectMarker | objectMarker |
| Default marker to visualize "source" and "target" object flags. | |
Slots which are called if data changed | |
| int | onlyDown_ |
| Gets called when the data in the table has changed. | |
| int | onlyUp_ |
| Gets called when the data in the table has changed. | |
| int | columnFromGUI_ |
| Gets called when the data in the table has changed. | |
| void | slotDataChanged (int _id, int _column, const QVariant &_value) |
| Gets called when the data in the table has changed. | |
| void | slotMoveBaseObject (int _id, int _newParentId) |
| Gets called when an object was moved via drag n drop. | |
| void | propagateDownwards (BaseObject *_obj, int _column) |
| Recursively update a column up to the root of the tree. | |
| void | propagateUpwards (BaseObject *_obj, int _column) |
| Recursively update a column up to the root of the tree. | |
Popup Menu related | |
| QModelIndex | popupIndex_ |
| Index where a popup has been opened. | |
| int | headerPopupType_ |
| Defines the section of the Popup. | |
| void | slotCustomContextMenuRequested (const QPoint &_pos) |
| Display a custom context window for the TreeView. | |
| void | slotPopupRemove () |
| Called by the popup menu to remove an object/group. | |
| void | slotUngroup () |
| Called by the popup menu to ungroup items. | |
| void | slotGroup () |
| Called by the popup menu to group items. | |
| void | slotCopy () |
| Called by the popup menu to copy items. | |
| void | slotRename () |
| Called by the popup menu to rename items. | |
| void | slotZoomTo () |
| Called by the popup menu to zoom to an object. | |
| void | slotSwitchLight () |
| Called by the popup menu in order to turn lights on/off. | |
| void | slotEditLight () |
| Called by the popup menu in order to edit lights. | |
| void | slotMaterialProperties () |
| Called by the popup menu to set material properties. | |
| void | slotCopyMaterialToTargeted () |
| Called by the popup menu to copy material properties. | |
| void | slotCopyMaterialToClipboard () |
| Called by the popup menu to copy material properties to clipboard. | |
| void | slotPasteMaterialFromClipboard () |
| Called by the popup menu to paste material properties from clipboard. | |
| void | slotNodeChanged (ACG::SceneGraph::BaseNode *_node) |
| Called when the material properties were changed inside the material dialog. | |
| void | slotShowLightSources (bool _state) |
| Hide/Show all light sources if checkbox has been checked. | |
| void | slotShowLightSources () |
| Index where a popup has been opened. | |
| void | slotHeaderCustomContextMenuRequested (const QPoint &_pos) |
| Display a custom context window for the TreeViews header. | |
GL Area Context Menu related slots | |
| QAction * | targetAction_ |
| Hide an object. | |
| QAction * | sourceAction_ |
| Hide an object. | |
| QAction * | removeAction_ |
| Hide an object. | |
| QAction * | material_ |
| Hide an object. | |
| QAction * | copyMaterial_ |
| Hide an object. | |
| QAction * | copyMaterialToClipboard_ |
| Hide an object. | |
| QAction * | pasteMaterialFromClipboard_ |
| Hide an object. | |
| QToolButton * | advancedSettingsBtn_ |
| Hide an object. | |
| void | slotContextMenuHide () |
| Hide an object. | |
| void | slotContextMenuTarget () |
| Target Selection. | |
| void | slotContextMenuSource () |
| Source Selection. | |
| void | slotContextMenuRemove () |
| Remove Selected Item. | |
| void | slotUpdateContextMenu (int _objectId) |
| Update the context Menus for the given id. | |
Bounding box related slots/functions | |
| void | slotBoundingBoxChange () |
| Bounding box selection changed. | |
| void | updateBoundingBox (BaseObjectData *_obj) |
| Updates bounding box. | |
Scripting functions | |
| void | setDescriptions () |
| QString | getObjectName (int objectId) |
| Get the Objects name from the id. | |
| void | objectDelete (int objectId) |
| Delete the given object. | |
| int | copyObject (int objectId) |
| Creates an object copy. | |
| int | getObject (QString _name) |
| Get the id of an object by its name. | |
| DataType | dataType (int objectId) |
| Get the DataType of a given object. | |
| void | hideObject (int objectId) |
| Hide the given Object. | |
| void | showObject (int objectId) |
| Show the given Object. | |
| void | setTarget (int objectId, bool _target) |
| set the given Object as target | |
| void | setSource (int objectId, bool _source) |
| set the given Object as source | |
| void | setObjectName (int objectId, QString _name) |
| set the name of the given object | |
| void | setAllTarget () |
| Makes all available objects target. | |
| void | setAllSource () |
| Makes all available objects source. | |
| void | clearAllTarget () |
| Unselect all objects. | |
| void | clearAllSource () |
| remove source selection from all objects | |
| void | showAll () |
| Shows all objects. | |
| void | hideAll () |
| Hides all objects. | |
| int | addEmptyGroup (QString _groupName="", int _parentGroupId=0) |
| Create new empty group. | |
| int | groupObjects (IdList _objectIDs, const QString &_groupName="") |
| Group given Objects together. | |
| bool | addObjectToGroup (int _objectId, int _groupId) |
| add an object to an existing group | |
| bool | unGroupObject (int _id) |
| IdList | getTargetObjects (DataType _type) |
| Get all target objects of given type. | |
| IdList | getSourceObjects (DataType _type) |
| Get all source objects of given type. | |
| unsigned int | groupCount () const |
| Returns the number of groups. | |
| QString | availableDataTypeNames () const |
| Returns a list of all available DataTypes. | |
| void | printObjectInfoToLog () |
| Print information about all open objects to the console. | |
| IdList | getGroupElements (int _groupId) |
| Get all elements of the given group. | |
| void | showReducedUi (bool reduced) |
| Show or hide the extended ui interface in the datacontrol toolbox. | |
Plugin for controlling the Object data structures (Show,hide Object, Target, Source selection
Definition at line 70 of file DataControlPlugin.hh.
| DataControlPlugin::DataControlPlugin | ( | ) |
Constructor.
Definition at line 64 of file DataControlPlugin.cc.
| DataControlPlugin::~DataControlPlugin | ( | ) |
Destructor.
Definition at line 242 of file DataControlPlugin.cc.
|
privateslot |
Update the model if an empty object has been added.
| _id | id of an object |
Definition at line 451 of file DataControlPlugin.cc.
|
slot |
Create new empty group.
Create and add an empty group.
| _groupName | Name of the new group. If it is an empty string, a default name based on group id will be generated. |
| _parentGroupId | Parent object under which the new group is created. If _parentGroupId is zero, the corresponding object does not exist or it is not a group, the new group is created as toplevel. |
| _groupName | name of the new group |
| _parentGroupId | id of the parent. -1, if the new group will have no parent |
Definition at line 328 of file DataControlPluginScripting.cc.
|
slot |
add an object to an existing group
add the object with _objectId to the group with _groupId
Definition at line 660 of file DataControlPluginScripting.cc.
|
slot |
Returns a list of all available DataTypes.
Return available dataType.
Returns a space separated list of all available DataTypes
Definition at line 643 of file DataControlPluginScripting.cc.
|
slot |
remove source selection from all objects
Clear Source Selection for all objects.
Definition at line 510 of file DataControlPluginScripting.cc.
|
slot |
Unselect all objects.
Clear Target Selection for all objects.
Definition at line 489 of file DataControlPluginScripting.cc.
|
slot |
Creates an object copy.
Generate a copy of an object.
| objectId | id of an object |
Definition at line 173 of file DataControlPluginScripting.cc.
|
slot |
Get the DataType of a given object.
Definition at line 204 of file DataControlPluginScripting.cc.
|
inlinevirtual |
Description of the Plugin.
Implements BaseInterface.
Definition at line 150 of file DataControlPlugin.hh.
|
privateslot |
Update the model if a file has been opened.
| _id | id of an object |
Definition at line 426 of file DataControlPlugin.cc.
|
slot |
Get all elements of the given group.
get all objects of an given group
get all objects of an given group with id _groupId
Definition at line 694 of file DataControlPluginScripting.cc.
|
slot |
Get the id of an object by its name.
Returns the id of an object with given name.
| _name | name of an object |
Definition at line 155 of file DataControlPluginScripting.cc.
|
slot |
Get the Objects name from the id.
Returns the name of an object with given id.
| objectId | id of an object |
Definition at line 190 of file DataControlPluginScripting.cc.
Get all source objects of given type.
Definition at line 596 of file DataControlPluginScripting.cc.
Get all target objects of given type.
Definition at line 580 of file DataControlPluginScripting.cc.
|
slot |
Returns the number of groups.
get number of groups
Returns the number of groups that are in the scene
Definition at line 627 of file DataControlPluginScripting.cc.
|
slot |
Group given Objects together.
Group objects together
| _objectIDs | list of object ids |
| _groupName | the name of the new group |
Definition at line 362 of file DataControlPluginScripting.cc.
|
slot |
|
slot |
Hide the given Object.
Hide object with the given id.
| objectId | id of an object |
Definition at line 221 of file DataControlPluginScripting.cc.
|
privateslot |
Definition at line 170 of file DataControlPlugin.cc.
|
privateslot |
Load Groups from ini file.
| _ini | an ini file |
Definition at line 604 of file DataControlPlugin.cc.
|
inlinevirtual |
|
inlineprivateslot |
Definition at line 134 of file DataControlPlugin.hh.
|
slot |
Delete the given object.
Delete an object.
| objectId | id of the object that should be deleted |
Definition at line 289 of file DataControlPluginScripting.cc.
|
privateslot |
an object was deleted. delete it internally
| _id | id of the object |
Definition at line 461 of file DataControlPlugin.cc.
|
privateslot |
Plugin initialization.
Definition at line 93 of file DataControlPlugin.cc.
|
slot |
Print information about all open objects to the console.
Prints information about all open objects to the Log.
Definition at line 612 of file DataControlPluginScripting.cc.
|
private |
Recursively update a column up to the root of the tree.
| _obj | object to start with |
| _column | Column to be propagated |
Definition at line 832 of file DataControlPlugin.cc.
|
private |
Recursively update a column up to the root of the tree.
| _obj | Object to start with |
| _column | Column to propagate |
Definition at line 768 of file DataControlPlugin.cc.
|
privateslot |
Save groups to ini file.
| _ini | an ini file |
Definition at line 693 of file DataControlPlugin.cc.
|
privateslot |
Save settings before application is closed.
| _ini | reference to ini file |
Definition at line 921 of file DataControlPlugin.cc.
|
slot |
Makes all available objects source.
Set Source Selection for all objects.
Definition at line 468 of file DataControlPluginScripting.cc.
|
slot |
Makes all available objects target.
Set Target Selection for all objects.
Definition at line 447 of file DataControlPluginScripting.cc.
|
privateslot |
This function sets the slot descriptions for this plugin which will be visible in the script editor
Definition at line 52 of file DataControlPluginScripting.cc.
|
slot |
set the name of the given object
set the name of the given Object
| objectId | id of an object |
| _name | new name |
Definition at line 274 of file DataControlPluginScripting.cc.
|
slot |
set the given Object as source
| objectId | id of an object |
| _source | set object as source? |
Definition at line 257 of file DataControlPluginScripting.cc.
|
slot |
set the given Object as target
| objectId | id of an object |
| _target | set object as target? |
Definition at line 241 of file DataControlPluginScripting.cc.
|
slot |
|
slot |
Show the given Object.
Show object with the given id.
| objectId | id of an object |
Definition at line 308 of file DataControlPluginScripting.cc.
|
slot |
Show or hide the extended ui interface in the datacontrol toolbox.
Definition at line 927 of file DataControlPlugin.cc.
|
privateslot |
Bounding box selection changed.
Bounding box visibility selection changed.
Definition at line 878 of file DataControlPlugin.cc.
|
privateslot |
Hide an object.
Definition at line 63 of file ContextMenuDataControl.cc.
|
privateslot |
Remove Selected Item.
Definition at line 92 of file ContextMenuDataControl.cc.
|
privateslot |
Source Selection.
Definition at line 78 of file ContextMenuDataControl.cc.
|
privateslot |
Target Selection.
Definition at line 49 of file ContextMenuDataControl.cc.
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Gets called when the data in the table has changed.
emit the right updates when the model changed
| _id | Object id that was changed |
| _column | Which column changed |
| _value | What is the new value? |
Definition at line 507 of file DataControlPlugin.cc.
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
a key event occurred
| _event | the event that occurred |
Definition at line 475 of file DataControlPlugin.cc.
|
privateslot |
|
privateslot |
Gets called when an object was moved via drag n drop.
| _id | id of the object |
| _newParentId | id of the new parent |
Definition at line 553 of file DataControlPlugin.cc.
|
privateslot |
|
privateslot |
Update the model if properties of an object changed.
| _identifier | id of an object |
Definition at line 411 of file DataControlPlugin.cc.
|
privateslot |
update drawing of objects when the active object changed
Definition at line 278 of file DataControlPlugin.cc.
|
private |
update objects when they have been grouped
Definition at line 257 of file DataControlPlugin.cc.
|
privateslot |
Definition at line 932 of file DataControlPlugin.cc.
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Index where a popup has been opened.
Definition at line 594 of file DataControlPlugin.cc.
|
privateslot |
Hide/Show all light sources if checkbox has been checked.
Definition at line 578 of file DataControlPlugin.cc.
|
privateslot |
|
privateslot |
|
privateslot |
Update the context Menus for the given id.
Definition at line 102 of file ContextMenuDataControl.cc.
|
privateslot |
Update the model if the visibility of an object changed.
| _identifier | id of an object |
Definition at line 348 of file DataControlPlugin.cc.
|
privateslot |
|
slot |
remove an object from its group and place it at the toplevel group
Definition at line 414 of file DataControlPluginScripting.cc.
|
private |
Updates bounding box.
Update state of bounding box node.
| _obj | object |
Definition at line 893 of file DataControlPlugin.cc.
|
inlineslot |
Definition at line 438 of file DataControlPlugin.hh.
|
private |
Hide an object.
Definition at line 306 of file DataControlPlugin.hh.
|
private |
Gets called when the data in the table has changed.
emit the right updates when the model changed
| _id | Object id that was changed |
| _column | Which column changed |
| _value | What is the new value? |
Definition at line 201 of file DataControlPlugin.hh.
|
private |
Hide an object.
Definition at line 302 of file DataControlPlugin.hh.
|
private |
Hide an object.
Definition at line 303 of file DataControlPlugin.hh.
|
private |
Defines the section of the Popup.
Definition at line 270 of file DataControlPlugin.hh.
|
private |
Flag set to true if meshlist is updated, preventing signal for list udate to be called.
Definition at line 164 of file DataControlPlugin.hh.
|
private |
Hide an object.
Definition at line 301 of file DataControlPlugin.hh.
|
private |
Layout for Toolbox.
Definition at line 158 of file DataControlPlugin.hh.
|
private |
The Treemodel organizing the data.
Definition at line 167 of file DataControlPlugin.hh.
|
private |
Table containing Mesh information and status.
Definition at line 161 of file DataControlPlugin.hh.
|
private |
Default marker to visualize "source" and "target" object flags.
Definition at line 176 of file DataControlPlugin.hh.
|
private |
Gets called when the data in the table has changed.
emit the right updates when the model changed
| _id | Object id that was changed |
| _column | Which column changed |
| _value | What is the new value? |
Definition at line 197 of file DataControlPlugin.hh.
|
private |
Gets called when the data in the table has changed.
emit the right updates when the model changed
| _id | Object id that was changed |
| _column | Which column changed |
| _value | What is the new value? |
Definition at line 198 of file DataControlPlugin.hh.
|
private |
Hide an object.
Definition at line 304 of file DataControlPlugin.hh.
|
private |
Index where a popup has been opened.
Definition at line 261 of file DataControlPlugin.hh.
|
private |
Hide an object.
Definition at line 299 of file DataControlPlugin.hh.
|
private |
Hide an object.
Definition at line 298 of file DataControlPlugin.hh.
|
private |
Hide an object.
Definition at line 297 of file DataControlPlugin.hh.
|
private |
Widget for Toolbox.
Definition at line 154 of file DataControlPlugin.hh.
|
private |
Definition at line 155 of file DataControlPlugin.hh.
|
private |
Tree view.
Definition at line 170 of file DataControlPlugin.hh.
|
private |
Pointer to the header to the view widget.
Definition at line 173 of file DataControlPlugin.hh.