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 Interface class for Plugins which have to store information in ini files.
void hideAll()
Hides all objects.
void showObject(int objectId)
Show the given Object.
Interface class for creating custom context menus.
void pluginsInitialized()
Plugin initialization.
void slotMaterialProperties()
Called by the popup menu to set material properties.
QString name()
Name of the Plugin.
void slotBoundingBoxChange()
Bounding box selection changed.
void slotContextMenuSource()
Source Selection.
int addEmptyGroup(QString _groupName="", int _parentGroupId=0)
Create new empty group.
void setAllSource()
Makes all available objects source.
void slotContextMenuTarget()
Target Selection.
void slotGroup()
Called by the popup menu to group items.
Logtype
Log types for Message Window.
void slotRename()
Called by the popup menu to rename items.
bool locked
Flag set to true if meshlist is updated, preventing signal for list udate to be called.
void propagateUpwards(BaseObject *_obj, int _column)
Recursively update a column up to the root of the tree.
QGridLayout * MeshDialogLayout_
Layout for Toolbox.
void fileOpened(int _id)
Update the model if a file has been opened.
QModelIndex popupIndex_
Index where a popup has been opened.
Interface for all plugins which want to Load or Save files and create Objects.
QHeaderView * viewHeader_
Pointer to the header to the view widget.
TreeModel * model_
The Treemodel organizing the data.
void saveIniFileOptions(INIFile &_ini)
Save groups to ini file.
void showAll()
Shows all objects.
void slotObjectPropertiesChanged(int _identifier)
Update the model if properties of an object changed.
void setTarget(int objectId, bool _target)
set the given Object as target
Interface for all Plugins which provide scriptable Functions.
QString description()
Description of the Plugin.
QAction * sourceAction_
Hide an object.
QString availableDataTypeNames() const
Returns a list of all available DataTypes.
void printObjectInfoToLog()
Print information about all open objects to the console.
void setAllTarget()
Makes all available objects target.
void slotNodeChanged(ACG::SceneGraph::BaseNode *_node)
Called when the material properties were changed inside the material dialog.
void setSource(int objectId, bool _source)
set the given Object as source
DefaultObjectMarker objectMarker
Default marker to visualize "source" and "target" object flags.
~DataControlPlugin()
Destructor.
void slotObjectSelectionChanged(int _identifier)
update drawing of objects when the active object changed
void slotCopyMaterialToTargeted()
Called by the popup menu to copy material properties.
Interface for all Plugins which do logging to the logging window of the framework.
void slotEditLight()
Called by the popup menu in order to edit lights.
unsigned int groupCount() const
Returns the number of groups.
void setObjectName(int objectId, QString _name)
set the name of the given object
void slotPasteMaterialFromClipboard()
Called by the popup menu to paste material properties from clipboard.
void propagateDownwards(BaseObject *_obj, int _column)
Recursively update a column up to the root of the tree.
void slotSwitchLight()
Called by the popup menu in order to turn lights on/off.
void slotCopy()
Called by the popup menu to copy items.
int headerPopupType_
Defines the section of the Popup.
IdList getSourceObjects(DataType _type)
Get all source objects of given type.
int groupObjects(IdList _objectIDs, QString _groupName="")
Group given Objects together.
void showReducedUi(bool reduced)
Show or hide the extended ui interface in the datacontrol toolbox.
Plugins can add its own toolbox to the main widget's toolbox area by using this interface.
std::vector< int > IdList
Standard Type for id Lists used for scripting.
void saveOnExit(INIFile &_ini)
Save settings before application is closed.
void clearAllSource()
remove source selection from all objects
void slotUngroup()
Called by the popup menu to ungroup items.
DatacontrolToolboxWidget * tool_
Widget for Toolbox.
void slotUpdateContextMenu(int _objectId)
Update the context Menus for the given id.
QTableWidget * objectList_
Table containing Mesh information and status.
void slotContextMenuHide()
Hide an object.
void slotMoveBaseObject(int _id, int _newParentId)
Gets called when an object was moved via drag n drop.
void slotPopupRemove()
Called by the popup menu to remove an object/group.
void slotShowLightSources()
Index where a popup has been opened.
QString getObjectName(int objectId)
Get the Objects name from the id.
Interface class from which all plugins have to be created.
QTreeView * view_
Tree view.
QToolButton * advancedSettingsBtn_
Hide an object.
bool addObjectToGroup(int _objectId, int _groupId)
add an object to an existing group
DataControlPlugin()
Constructor.
void slotKeyEvent(QKeyEvent *_event)
a key event occurred
void slotHeaderCustomContextMenuRequested(const QPoint &_pos)
Display a custom context window for the TreeViews header.
void clearAllTarget()
Unselect all objects.
Keyboard Event Interface.
int columnFromGUI_
Gets called when the data in the table has changed.
void addedEmptyObject(int _id)
Update the model if an empty object has been added.
bool unGroupObject(int _id)
void slotDataChanged(int _id, int _column, const QVariant &_value)
Gets called when the data in the table has changed.
IdList getTargetObjects(DataType _type)
Get all target objects of given type.
int onlyUp_
Gets called when the data in the table has changed.
QAction * targetAction_
Hide an object.
void slotZoomTo()
Called by the popup menu to zoom to an object.
int getObject(QString _name)
Get the id of an object by its name.
void slotVisibilityChanged(int _identifier)
Update the model if the visibility of an object changed.
QAction * removeAction_
Hide an object.
int onlyDown_
Gets called when the data in the table has changed.
DataType dataType(int objectId)
Get the DataType of a given object.
void objectDelete(int objectId)
Delete the given object.
void hideObject(int objectId)
Hide the given Object.
void slotCustomContextMenuRequested(const QPoint &_pos)
Display a custom context window for the TreeView.
void slotCopyMaterialToClipboard()
Called by the popup menu to copy material properties to clipboard.
IdList getGroupElements(int _groupId)
Get all elements of the given group.
Interface class for exporting functions to python.
void slotObjectsGrouped(IdList _lst)
update objects when they have been grouped
void slotContextMenuRemove()
Remove Selected Item.
void objectDeleted(int _id)
an object was deleted. delete it internally
Class for the handling of simple configuration files.
void updateBoundingBox(BaseObjectData *_obj)
Updates bounding box.
void loadIniFileOptionsLast(INIFile &_ini)
Load Groups from ini file.