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