47 #ifndef DATACONTROLPLUGIN_HH 48 #define DATACONTROLPLUGIN_HH 57 #include <OpenFlipper/BasePlugin/INIInterface.hh> 64 #include "TreeModel.hh" 65 #include "DefaultObjectMarker.hh" 83 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-DataControl")
88 void updatedObject(
int _it,
const UpdateType& _type);
90 void setSlotDescription(QString _slotName, QString _slotDescription,
91 QStringList _parameters, QStringList _descriptions);
94 void log(
Logtype _type, QString _message);
95 void log(QString _message);
102 void deleteObject(
int _id );
103 void emptyObjectAdded(
int _id );
104 void copyObject(
int _oldId,
int& _newId);
107 void addToolbox( QString _name , QWidget* _widget, QIcon* _icon, QWidget *_headerAreaWidget);
109 void objectsGrouped(
IdList);
113 void initializePlugin();
118 void slotObjectUpdated(
int _identifier,
const UpdateType& _type );
134 void noguiSupported( ) {} ;
147 QString
name(){
return (QString(
"DataControl")); };
150 QString
description() {
return (QString(tr(
"Manages Data Objects"))); };
342 int copyObject(
int objectId );
357 void setTarget(
int objectId,
bool _target );
360 void setSource(
int objectId,
bool _source );
392 int addEmptyGroup(QString _groupName =
"",
int _parentGroupId = 0);
433 QString version() {
return QString(
"1.03"); };
436 #endif //DATACONTROLPLUGIN_HH void slotKeyEvent(QKeyEvent *_event)
a key event occurred
void slotVisibilityChanged(int _identifier)
Update the model if the visibility of an object changed.
void hideAll()
Hides all objects.
void slotUpdateContextMenu(int _objectId)
Update the context Menus for the given id.
void propagateUpwards(BaseObject *_obj, int _column)
Recursively update a column up to the root of the tree.
void saveIniFileOptions(INIFile &_ini)
Save groups to ini file.
IdList getSourceObjects(DataType _type)
Get all source objects of given type.
void hideObject(int objectId)
Hide the given Object.
void showAll()
Shows all objects.
void slotBoundingBoxChange()
Bounding box selection changed.
int groupObjects(IdList _objectIDs, QString _groupName="")
Group given Objects together.
int columnFromGUI_
Gets called when the data in the table has changed.
void setSource(int objectId, bool _source)
set the given Object as source
bool addObjectToGroup(int _objectId, int _groupId)
add an object to an existing group
void setTarget(int objectId, bool _target)
set the given Object as target
void loadIniFileOptionsLast(INIFile &_ini)
Load Groups from ini file.
Interface class for exporting functions to python.
DefaultObjectMarker objectMarker
Default marker to visualize "source" and "target" object flags.
int onlyUp_
Gets called when the data in the table has changed.
QHeaderView * viewHeader_
Pointer to the header to the view widget.
void slotSwitchLight()
Called by the popup menu in order to turn lights on/off.
void slotContextMenuTarget()
Target Selection.
QModelIndex popupIndex_
Index where a popup has been opened.
void slotCopyMaterialToTargeted()
Called by the popup menu to copy material properties.
void objectDeleted(int _id)
an object was deleted. delete it internally
QAction * targetAction_
Hide an object.
void slotObjectPropertiesChanged(int _identifier)
Update the model if properties of an object changed.
bool unGroupObject(int _id)
void slotNodeChanged(ACG::SceneGraph::BaseNode *_node)
Called when the material properties were changed inside the material dialog.
IdList getTargetObjects(DataType _type)
Get all target objects of given type.
void clearAllTarget()
Unselect all objects.
Logtype
Log types for Message Window.
~DataControlPlugin()
Destructor.
void slotCopy()
Called by the popup menu to copy items.
DataControlPlugin()
Constructor.
Interface for all Plugins which do logging to the logging window of the framework.
void slotCopyMaterialToClipboard()
Called by the popup menu to copy material properties to clipboard.
void setAllTarget()
Makes all available objects target.
QAction * removeAction_
Hide an object.
void showReducedUi(bool reduced)
Show or hide the extended ui interface in the datacontrol toolbox.
void slotDataChanged(int _id, int _column, const QVariant &_value)
Gets called when the data in the table has changed.
QAction * sourceAction_
Hide an object.
void slotHeaderCustomContextMenuRequested(const QPoint &_pos)
Display a custom context window for the TreeViews header.
QToolButton * advancedSettingsBtn_
Hide an object.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
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.
QString getObjectName(int objectId)
Get the Objects name from the id.
QTableWidget * objectList_
Table containing Mesh information and status.
void slotMoveBaseObject(int _id, int _newParentId)
Gets called when an object was moved via drag n drop.
void slotContextMenuRemove()
Remove Selected Item.
void setAllSource()
Makes all available objects source.
unsigned int groupCount() const
Returns the number of groups.
DataType dataType(int objectId)
Get the DataType of a given object.
void slotCustomContextMenuRequested(const QPoint &_pos)
Display a custom context window for the TreeView.
void slotUngroup()
Called by the popup menu to ungroup items.
IdList getGroupElements(int _groupId)
Get all elements of the given group.
void slotGroup()
Called by the popup menu to group items.
QString name()
Name of the Plugin.
DatacontrolToolboxWidget * tool_
Widget for Toolbox.
void fileOpened(int _id)
Update the model if a file has been opened.
QGridLayout * MeshDialogLayout_
Layout for Toolbox.
void slotContextMenuSource()
Source Selection.
Keyboard Event Interface.
int onlyDown_
Gets called when the data in the table has changed.
Interface class for Plugins which have to store information in ini files.
void slotShowLightSources()
Index where a popup has been opened.
void slotObjectsGrouped(IdList _lst)
update objects when they have been grouped
void printObjectInfoToLog()
Print information about all open objects to the console.
void slotContextMenuHide()
Hide an object.
QString description()
Description of the Plugin.
void objectDelete(int objectId)
Delete the given object.
Class for the handling of simple configuration files.
void saveOnExit(INIFile &_ini)
Save settings before application is closed.
void slotObjectSelectionChanged(int _identifier)
update drawing of objects when the active object changed
int getObject(QString _name)
Get the id of an object by its name.
void slotZoomTo()
Called by the popup menu to zoom to an object.
Interface for all Plugins which provide scriptable Functions.
void addedEmptyObject(int _id)
Update the model if an empty object has been added.
void clearAllSource()
remove source selection from all objects
void slotMaterialProperties()
Called by the popup menu to set material properties.
int headerPopupType_
Defines the section of the Popup.
void propagateDownwards(BaseObject *_obj, int _column)
Recursively update a column up to the root of the tree.
void updateBoundingBox(BaseObjectData *_obj)
Updates bounding box.
void slotPasteMaterialFromClipboard()
Called by the popup menu to paste material properties from clipboard.
void slotEditLight()
Called by the popup menu in order to edit lights.
void pluginsInitialized()
Plugin initialization.
void setObjectName(int objectId, QString _name)
set the name of the given object
Interface class from which all plugins have to be created.
void slotRename()
Called by the popup menu to rename items.
Interface for all plugins which want to Load or Save files and create Objects.
int addEmptyGroup(QString _groupName="", int _parentGroupId=0)
Create new empty group.
QString availableDataTypeNames() const
Returns a list of all available DataTypes.
void slotPopupRemove()
Called by the popup menu to remove an object/group.
void showObject(int objectId)
Show the given Object.