Commit e2d6e224 authored by Dirk Wilden's avatar Dirk Wilden

added SlotDescriptions

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3416 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 90456463
......@@ -52,6 +52,11 @@
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
void DataControlPlugin::initializePlugin(){
//set the slot descriptions
setDescriptions();
}
void DataControlPlugin::pluginsInitialized() {
QMenu* contextMenu = new QMenu("Object selection");
......
......@@ -84,6 +84,10 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, Globa
void addContextMenu(QMenu* _menu );
void addContextMenu(QMenu* _menu ,DataType _objectType , ContextMenuType _type );
void setSlotDescription(QString _slotName, QString _slotDescription,
QStringList _parameters, QStringList _descriptions);
private slots :
/// Updates the table widget
void slotObjectUpdated( int _identifier );
......@@ -95,7 +99,7 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, Globa
void saveIniFileOptions( INIFile& _ini );
void pluginsInitialized();
void initializePlugin();
public :
~DataControlPlugin() {};
......@@ -241,6 +245,9 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, Globa
* @{ */
//===========================================================================
private slots:
void setDescriptions();
public slots:
/// Get the Objects name from the id
QString getObjectName( int objectId );
......
......@@ -37,6 +37,31 @@
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
void DataControlPlugin::setDescriptions(){
emit setSlotDescription("getObject(QString)","Returns the id of an object with given name.",
QStringList("Name"), QStringList("Name of an object"));
emit setSlotDescription("getObjectName(int)","Returns the name of an object with given id.",
QStringList("objectId"), QStringList("ID of an object"));
emit setSlotDescription("hideObject(int)","Hide object with the given id.",
QStringList("objectId"), QStringList("ID of an object"));
emit setSlotDescription("showObject(int)","Show object with the given id.",
QStringList("objectId"), QStringList("ID of an object"));
emit setSlotDescription("groupObjects(idList,QString)","Group given Objects together.",
QString("objectIds,groupName").split(","),
QString("List of objects that should be grouped., Name of the group.").split(","));
emit setSlotDescription("groupObjects(idList)","Group given Objects together.",
QStringList("objectIds"), QStringList("List of objects that should be grouped."));
}
/// Returns the id of an object with given name
int DataControlPlugin::getObject( QString _name ) {
BaseObject* object = PluginFunctions::objectRoot()->childExists(_name);
......@@ -47,6 +72,7 @@ int DataControlPlugin::getObject( QString _name ) {
return object->id();
}
/// Returns the name of an object with given id
QString DataControlPlugin::getObjectName( int objectId ) {
BaseObjectData* object;
......@@ -58,6 +84,7 @@ QString DataControlPlugin::getObjectName( int objectId ) {
}
/// Hide object with the given id
void DataControlPlugin::hideObject( int objectId ) {
BaseObjectData* object;
......@@ -70,6 +97,7 @@ void DataControlPlugin::hideObject( int objectId ) {
object->hide();
}
/// Show object with the given id
void DataControlPlugin::showObject( int objectId ) {
BaseObjectData* object;
......@@ -82,6 +110,7 @@ void DataControlPlugin::showObject( int objectId ) {
object->show();
}
/// Group given Objects together
void DataControlPlugin::groupObjects(idList _objectIDs, QString _groupName) {
QVector< BaseObject* > objs;
......
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