Python plugin API
Collaboration diagram for Python plugin API:
void gepetto::gui::BodyTreeWidget::selectBodyByName (const QString bodyName)
 
void gepetto::gui::BodyTreeWidget::selectBodyByName (const std::string &bodyName)
 
QList< BodyTreeItem * > gepetto::gui::BodyTreeWidget::selectedBodies () const
 Get selected bodies. More...
 
BodyTreeWidgetgepetto::gui::MainWindow::bodyTree () const
 Get the body tree widget. More...
 
void gepetto::gui::MainWindow::log (const QString &text)
 
void gepetto::gui::MainWindow::logError (const QString &text)
 
void gepetto::gui::MainWindow::logJobStarted (int id, const QString &text)
 
void gepetto::gui::MainWindow::logJobDone (int id, const QString &text)
 
void gepetto::gui::MainWindow::logJobFailed (int id, const QString &text)
 
void gepetto::gui::MainWindow::requestRefresh ()
 
void gepetto::gui::MainWindow::requestApplyCurrentConfiguration ()
 Emit a signal to display the current configuration in the viewer. More...
 
void gepetto::gui::MainWindow::requestConfigurationValidation ()
 Emit a signal to check if the the current configuration is valid. More...
 
void gepetto::gui::MainWindow::configurationValidationStatusChanged (bool valid)
 
void gepetto::gui::MainWindow::configurationValidationStatusChanged (QStringList bodiesInCollision)
 
void gepetto::gui::MainWindow::requestSelectJointFromBodyName (const QString bodyName)
 
void gepetto::gui::MainWindow::onOpenPluginManager ()
 Open the plugin manager dialog. More...
 
void gepetto::gui::MainWindow::registerSignal (const char *signal, QObject *obj)
 
QObject * gepetto::gui::MainWindow::getFromSignal (const char *signal)
 
void gepetto::gui::MainWindow::connectSignal (const char *signal, const char *slot, QObject *obj)
 
void gepetto::gui::MainWindow::registerSlot (const char *slot, QObject *obj)
 
QObject * gepetto::gui::MainWindow::getFromSlot (const char *slot)
 
void gepetto::gui::MainWindow::connectSlot (const char *slot, const char *signal, QObject *obj)
 
void gepetto::gui::MainWindow::registerShortcut (QString widgetName, QString actionName, QAction *action)
 
void gepetto::gui::MainWindow::registerShortcut (QString widgetName, QAction *action)
 

Detailed Description

These slots are available for Python scripting in plugins.

Public Slots

◆ bodyTree

BodyTreeWidget* gepetto::gui::MainWindow::bodyTree ( ) const
slot

Get the body tree widget.

◆ configurationValidationStatusChanged [1/2]

void gepetto::gui::MainWindow::configurationValidationStatusChanged ( bool  valid)
slot

Display if a configuration is valid or not.

Parameters
validconfiguration is valid

◆ configurationValidationStatusChanged [2/2]

void gepetto::gui::MainWindow::configurationValidationStatusChanged ( QStringList  bodiesInCollision)
slot

Display if a configuration is valid or not.

Parameters
bodiesInCollisionlist of bodies in collision

◆ connectSignal

void gepetto::gui::MainWindow::connectSignal ( const char *  signal,
const char *  slot,
QObject *  obj 
)
slot

Connect an object's slot to a registered signal.

Parameters
signalsignal's name
slotslot's name
objobject's instance

◆ connectSlot

void gepetto::gui::MainWindow::connectSlot ( const char *  slot,
const char *  signal,
QObject *  obj 
)
slot

Connect an object's signal to a registered slot.

Parameters
slotslot's name
signalsignal's name
objobject's instance

◆ getFromSignal

QObject* gepetto::gui::MainWindow::getFromSignal ( const char *  signal)
slot

Get the instance of object which holds the signal.

Parameters
signalsignal's name
Returns
object's instance

◆ getFromSlot

QObject* gepetto::gui::MainWindow::getFromSlot ( const char *  slot)
slot

Get the instance of object which holds the slot.

Parameters
slotslot's name
Returns
object's instance

◆ log

void gepetto::gui::MainWindow::log ( const QString &  text)
slot

Add the text to logs.

Parameters
texttext to log

◆ logError

void gepetto::gui::MainWindow::logError ( const QString &  text)
slot

Add the text to logs and colors it in red.

Parameters
texttext to log

◆ logJobDone

void gepetto::gui::MainWindow::logJobDone ( int  id,
const QString &  text 
)
slot

Log that a job has successfuly finished.

Parameters
idid of the job
texttext to log

◆ logJobFailed

void gepetto::gui::MainWindow::logJobFailed ( int  id,
const QString &  text 
)
slot

Log that a job has failed.

Parameters
idid of the job
texttext to log

◆ logJobStarted

void gepetto::gui::MainWindow::logJobStarted ( int  id,
const QString &  text 
)
slot

Log that a job has started.

Parameters
idid of the job
texttext to log

◆ onOpenPluginManager

void gepetto::gui::MainWindow::onOpenPluginManager ( )
slot

Open the plugin manager dialog.

◆ registerShortcut [1/2]

void gepetto::gui::MainWindow::registerShortcut ( QString  widgetName,
QString  actionName,
QAction *  action 
)
slot

Register an action on which users can change the shortcut to trigger it.

Parameters
widgetNamewidget's name that handle the action
actionNameaction's name
actionaction to modify

◆ registerShortcut [2/2]

void gepetto::gui::MainWindow::registerShortcut ( QString  widgetName,
QAction *  action 
)
slot

Register an action on which users can change the shortcut to trigger it. User action->text() as action name.

Parameters
widgetNamewidget's name that handle the action
actionaction to modify

◆ registerSignal

void gepetto::gui::MainWindow::registerSignal ( const char *  signal,
QObject *  obj 
)
slot

Register an object signal that can be accessible without knowing the class definition.

Parameters
signalsignal's name
objobject's instance

◆ registerSlot

void gepetto::gui::MainWindow::registerSlot ( const char *  slot,
QObject *  obj 
)
slot

Register an object slot that can be accessible without knowing the class definition.

Parameters
slotslot's name
objobject's instance

◆ requestApplyCurrentConfiguration

void gepetto::gui::MainWindow::requestApplyCurrentConfiguration ( )
slot

Emit a signal to display the current configuration in the viewer.

◆ requestConfigurationValidation

void gepetto::gui::MainWindow::requestConfigurationValidation ( )
slot

Emit a signal to check if the the current configuration is valid.

◆ requestRefresh

void gepetto::gui::MainWindow::requestRefresh ( )
slot

Request a refresh of the interface.

Parameters
refreshTypetells what to refresh. See RefreshType

◆ requestSelectJointFromBodyName

void gepetto::gui::MainWindow::requestSelectJointFromBodyName ( const QString  bodyName)
slot

Emit a signal to tell that a body has been selected.

Parameters
bodyNamename of the body selected

◆ selectBodyByName [1/2]

void gepetto::gui::BodyTreeWidget::selectBodyByName ( const QString  bodyName)
slot

Triggered when an item is selected in the body tree view.

Parameters
bodyNamename of the body

◆ selectBodyByName [2/2]

void gepetto::gui::BodyTreeWidget::selectBodyByName ( const std::string &  bodyName)
slot

Triggered when an item is selected in the body tree view.

Parameters
bodyNamename of the body

◆ selectedBodies

QList<BodyTreeItem*> gepetto::gui::BodyTreeWidget::selectedBodies ( ) const
slot

Get selected bodies.