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