Commit 5dc7dc52 authored by Jan Möbius's avatar Jan Möbius

Python Interface for DataControl Plugin

parent 376b4cf4
include (plugin)
openflipper_plugin ( TRANSLATION_LANGUAGES de_DE
openflipper_plugin ( PYTHONINTERFACE
TRANSLATION_LANGUAGES de_DE
INSTALLDATA Icons
TYPES LIGHT)
......@@ -56,6 +56,7 @@
#include <OpenFlipper/BasePlugin/ScriptInterface.hh>
#include <OpenFlipper/BasePlugin/INIInterface.hh>
#include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>
#include <OpenFlipper/BasePlugin/PythonInterface.hh>
#include <OpenFlipper/common/Types.hh>
#include <ObjectTypes/Light/Light.hh>
#include "Toolbox.hh"
......@@ -66,7 +67,7 @@
/** Plugin for controlling the Object data structures (Show,hide Object, Target, Source selection
*/
class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyInterface , LoggingInterface, INIInterface, ContextMenuInterface, ScriptInterface, LoadSaveInterface
class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyInterface , LoggingInterface, INIInterface, ContextMenuInterface, ScriptInterface, LoadSaveInterface, PythonInterface
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
......@@ -77,6 +78,7 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
Q_INTERFACES(ContextMenuInterface)
Q_INTERFACES(ScriptInterface)
Q_INTERFACES(LoadSaveInterface)
Q_INTERFACES(PythonInterface)
Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-DataControl")
......@@ -389,40 +391,41 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
*/
int addEmptyGroup(QString _groupName = "", int _parentGroupId = 0);
/** Group objects together
*
* @return object id of new group or -1 if failed
*/
int groupObjects(IdList _objectIDs, QString _groupName = "");
/// add an object to an existing group
bool addObjectToGroup(int _objectId, int _groupId);
/** remove an object from its group and place it at the toplevel group
*
* @return successfull
*/
bool unGroupObject(int _id);
/// Get all target objects of given type
IdList getTargetObjects(DataType _type);
/// Get all source objects of given type
IdList getSourceObjects(DataType _type);
/** Group objects together
*
* @return object id of new group or -1 if failed
*/
int groupObjects(IdList _objectIDs, QString _groupName = "");
/// add an object to an existing group
bool addObjectToGroup(int _objectId, int _groupId);
/** remove an object from its group and place it at the toplevel group
*
* @return successfull
*/
bool unGroupObject(int _id);
/// Get all target objects of given type
IdList getTargetObjects(DataType _type);
/// Get all source objects of given type
IdList getSourceObjects(DataType _type);
/// Returns the number of groups
unsigned int groupCount() const;
/// Returns the number of groups
unsigned int groupCount() const;
/// Returns a list of all available DataTypes
QStringList availableDataTypeNames() const;
/// Returns a list of all available DataTypes
QStringList availableDataTypeNames() const;
/// Print information about all open objects to the console
void printObjectInfoToLog();
/// Print information about all open objects to the console
void printObjectInfoToLog();
/// Get all elements of the given group
IdList getGroupElements(int _groupId);
/// Get all elements of the given group
IdList getGroupElements(int _groupId);
void showReducedUi(bool reduced);
/// Show or hide the extended ui interface in the datacontrol toolbox
void showReducedUi(bool reduced);
/** @} */
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment