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. More... | |
virtual void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions) |
Set a description for a public slot. More... | |
virtual void | setRenderer (unsigned int _viewer, QString _rendererName) |
Set a renderer for the given viewer. More... | |
Signals inherited from ToolboxInterface | |
virtual void | addToolbox (QString _name, QWidget *_widget) |
Add a toolbox widget to the gui with the given name. More... | |
Signals inherited from KeyInterface | |
virtual void | registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false) |
Register a key-combination for your plugin. More... | |
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. More... | |
Signals inherited from ScriptInterface | |
virtual void | scriptInfo (QString _functionWithParameters) |
Emit this signal if a scriptable function is executed. More... | |
virtual void | getScriptingEngine (QScriptEngine *&_engine) |
virtual void | executeScript (QString _script) |
virtual void | getAvailableFunctions (QStringList &_functions) |
Signals inherited from LoadSaveInterface | |
virtual void | save (int _id, QString _filename) |
Save object to a file. More... | |
virtual void | load (QString _filename, DataType _type, int &_id) |
Load object from file with a specific DataType. More... | |
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. More... | |
void | slotVisibilityChanged (int _identifier) |
Update the model if the visibility of an object changed. More... | |
void | slotObjectSelectionChanged (int _identifier) |
update drawing of objects when the active object changed More... | |
void | slotObjectPropertiesChanged (int _identifier) |
Update the model if properties of an object changed. More... | |
void | slotObjectUpdated (int _identifier, const UpdateType &_type) |
void | slotKeyEvent (QKeyEvent *_event) |
a key event occurred More... | |
void | loadIniFileOptionsLast (INIFile &_ini) |
Load Groups from ini file. More... | |
void | saveIniFileOptions (INIFile &_ini) |
Save groups to ini file. More... | |
void | saveOnExit (INIFile &_ini) |
Save settings before application is closed. More... | |
void | fileOpened (int _id) |
Update the model if a file has been opened. More... | |
void | addedEmptyObject (int _id) |
Update the model if an empty object has been added. More... | |
void | objectDeleted (int _id) |
an object was deleted. delete it internally More... | |
void | noguiSupported () |
Private Slots inherited from BaseInterface | |
virtual void | exit () |
virtual QString | version () |
Return a version string for your plugin. More... | |
Private Slots inherited from KeyInterface | |
virtual void | slotKeyEvent (QKeyEvent *_event) |
Key Event from Main App. More... | |
Private Member Functions | |
void | slotObjectsGrouped (IdList _lst) |
update objects when they have been grouped More... | |
Private Member Functions inherited from BaseInterface | |
virtual void | noguiSupported () |
virtual | ~BaseInterface () |
Destructor. | |
virtual void | blockScenegraphUpdates (bool _block) |
Tell the core to prevent scenegraph updates. More... | |
virtual void | updatedObject (int _objectId) |
An object has been changed or added by this plugin. More... | |
virtual void | updatedObject (int _identifier, const UpdateType &_type) |
An object has been changed or added by this plugin. More... | |
virtual void | nodeVisibilityChanged (int _identifier) |
A scenegraph node has been shown or hidden. More... | |
virtual void | getCurrentRenderer (unsigned int _viewer, QString &_rendererName) |
Get the current renderer for the given viewer. More... | |
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. More... | |
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. More... | |
Private Member Functions inherited from KeyInterface | |
virtual void | slotKeyReleaseEvent (QKeyEvent *_event) |
Key Release Event from Main App. More... | |
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. More... | |
virtual void | hideContextMenu () |
hide the main context menu | |
Private Member Functions inherited from ScriptInterface | |
virtual | ~ScriptInterface () |
Destructor. | |
virtual void | executeFileScript (QString _filename) |
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. More... | |
virtual void | deleteObject (int _id) |
Delete an object This signal can be called from any thread. . More... | |
virtual void | deleteAllObjects () |
Delete all Objects. More... | |
virtual void | getAllFileFilters (QStringList &_filters) |
Get all file filters that are registered. More... | |
Private Member Functions inherited from PythonInterface | |
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. More... | |
int | onlyUp_ |
Gets called when the data in the table has changed. More... | |
int | columnFromGUI_ |
Gets called when the data in the table has changed. More... | |
void | slotDataChanged (int _id, int _column, const QVariant &_value) |
Gets called when the data in the table has changed. More... | |
void | slotMoveBaseObject (int _id, int _newParentId) |
Gets called when an object was moved via drag n drop. More... | |
void | propagateDownwards (BaseObject *_obj, int _column) |
Recursively update a column up to the root of the tree. More... | |
void | propagateUpwards (BaseObject *_obj, int _column) |
Recursively update a column up to the root of the tree. More... | |
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. More... | |
void | slotPopupRemove () |
Called by the popup menu to remove an object/group. More... | |
void | slotUngroup () |
Called by the popup menu to ungroup items. More... | |
void | slotGroup () |
Called by the popup menu to group items. More... | |
void | slotCopy () |
Called by the popup menu to copy items. More... | |
void | slotRename () |
Called by the popup menu to rename items. More... | |
void | slotZoomTo () |
Called by the popup menu to zoom to an object. More... | |
void | slotSwitchLight () |
Called by the popup menu in order to turn lights on/off. More... | |
void | slotEditLight () |
Called by the popup menu in order to edit lights. More... | |
void | slotMaterialProperties () |
Called by the popup menu to set material properties. | |
void | slotCopyMaterialToTargeted () |
Called by the popup menu to copy material properties. More... | |
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. More... | |
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. More... | |
GL Area Context Menu related slots | |
QAction * | targetAction_ |
Hide an object. | |
QAction * | sourceAction_ |
Hide an object. | |
QAction * | removeAction_ |
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. More... | |
void | updateBoundingBox (BaseObjectData *_obj) |
Updates bounding box. More... | |
Scripting functions | |
void | setDescriptions () |
QString | getObjectName (int objectId) |
Get the Objects name from the id. More... | |
void | objectDelete (int objectId) |
Delete the given object. More... | |
int | copyObject (int objectId) |
Creates an object copy. More... | |
int | getObject (QString _name) |
Get the id of an object by its name. More... | |
DataType | dataType (int objectId) |
Get the DataType of a given object. | |
void | hideObject (int objectId) |
Hide the given Object. More... | |
void | showObject (int objectId) |
Show the given Object. More... | |
void | setTarget (int objectId, bool _target) |
set the given Object as target More... | |
void | setSource (int objectId, bool _source) |
set the given Object as source More... | |
void | setObjectName (int objectId, QString _name) |
set the name of the given object More... | |
void | setAllTarget () |
Makes all available objects target. More... | |
void | setAllSource () |
Makes all available objects source. More... | |
void | clearAllTarget () |
Unselect all objects. More... | |
void | clearAllSource () |
remove source selection from all objects More... | |
void | showAll () |
Shows all objects. More... | |
void | hideAll () |
Hides all objects. More... | |
int | addEmptyGroup (QString _groupName="", int _parentGroupId=0) |
Create new empty group. More... | |
int | groupObjects (IdList _objectIDs, QString _groupName="") |
Group given Objects together. More... | |
bool | addObjectToGroup (int _objectId, int _groupId) |
add an object to an existing group More... | |
bool | unGroupObject (int _id) |
IdList | getTargetObjects (DataType _type) |
Get all target objects of given type. More... | |
IdList | getSourceObjects (DataType _type) |
Get all source objects of given type. More... | |
unsigned int | groupCount () const |
Returns the number of groups. More... | |
QString | availableDataTypeNames () const |
Returns a list of all available DataTypes. More... | |
void | printObjectInfoToLog () |
Print information about all open objects to the console. More... | |
IdList | getGroupElements (int _groupId) |
Get all elements of the given group. More... | |
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.
|
privateslot |
Update the model if an empty object has been added.
_id | id of an object |
Definition at line 437 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 662 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 645 of file DataControlPluginScripting.cc.
|
slot |
remove source selection from all objects
Clear Source Selection for all objects.
Definition at line 513 of file DataControlPluginScripting.cc.
|
slot |
Unselect all objects.
Clear Target Selection for all objects.
Definition at line 491 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.
|
privateslot |
Update the model if a file has been opened.
_id | id of an object |
Definition at line 412 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 696 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 600 of file DataControlPluginScripting.cc.
Get all target objects of given type.
Definition at line 585 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 629 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 |
Load Groups from ini file.
_ini | an ini file |
Definition at line 590 of file DataControlPlugin.cc.
|
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 447 of file DataControlPlugin.cc.
|
privateslot |
Plugin initialization.
Definition at line 89 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 615 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 818 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 754 of file DataControlPlugin.cc.
|
privateslot |
Save groups to ini file.
_ini | an ini file |
Definition at line 679 of file DataControlPlugin.cc.
|
privateslot |
Save settings before application is closed.
_ini | reference to ini file |
Definition at line 907 of file DataControlPlugin.cc.
|
slot |
Makes all available objects source.
Set Source Selection for all objects.
Definition at line 469 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.
|
privateslot |
Bounding box selection changed.
Bounding box visibility selection changed.
Definition at line 864 of file DataControlPlugin.cc.
|
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 493 of file DataControlPlugin.cc.
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
a key event occurred
_event | the event that occurred |
Definition at line 461 of file DataControlPlugin.cc.
|
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 539 of file DataControlPlugin.cc.
|
privateslot |
|
privateslot |
Update the model if properties of an object changed.
_identifier | id of an object |
Definition at line 397 of file DataControlPlugin.cc.
|
privateslot |
update drawing of objects when the active object changed
Definition at line 264 of file DataControlPlugin.cc.
|
private |
update objects when they have been grouped
Definition at line 243 of file DataControlPlugin.cc.
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
|
privateslot |
Update the model if the visibility of an object changed.
_identifier | id of an object |
Definition at line 334 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 879 of file DataControlPlugin.cc.
|
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 |
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.