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