gepetto::gui::MainWindow Class Reference

Class. More...

#include <gepetto/gui/mainwindow.hh>

Inheritance diagram for gepetto::gui::MainWindow:
[legend]
Collaboration diagram for gepetto::gui::MainWindow:
[legend]

Public Types

enum  RefreshType {
  RefreshBodyTree = 1,
  RefreshPlugins = 2,
  RefreshAll = RefreshBodyTree + RefreshPlugins
}
 

Public Slots

OSGWidgetcreateView (const std::string &name)
 
BodyTreeWidgetbodyTree () const
 
void log (const QString &text)
 Add the text to logs. More...
 
void logError (const QString &text)
 Add the text to logs and colors it in red. More...
 
void logJobStarted (int id, const QString &text)
 Log that a job has started. More...
 
void logJobDone (int id, const QString &text)
 Log that a job has successfuly finished. More...
 
void logJobFailed (int id, const QString &text)
 Log that a job has failed. More...
 
void requestRefresh ()
 Request a refresh of the interface. More...
 
void requestApplyCurrentConfiguration ()
 Emit a signal to display the current configuration in the viewer. More...
 
void requestConfigurationValidation ()
 Emit a signal to check if the the current configuration is valid. More...
 
void configurationValidationStatusChanged (bool valid)
 Display if a configuration is valid or not. More...
 
void configurationValidationStatusChanged (QStringList bodiesInCollision)
 Display if a configuration is valid or not. More...
 
void requestSelectJointFromBodyName (const QString bodyName)
 Emit a signal to tell that a body has been selected. More...
 
void onOpenPluginManager ()
 Open the plugin manager dialog. More...
 
void registerSignal (const char *signal, QObject *obj)
 Register an object signal that can be accessible without knowing the class definition. More...
 
QObject * getFromSignal (const char *signal)
 Get the instance of object which holds the signal. More...
 
void connectSignal (const char *signal, const char *slot, QObject *obj)
 Connect an object's slot to a registered signal. More...
 
void registerSlot (const char *slot, QObject *obj)
 Register an object slot that can be accessible without knowing the class definition. More...
 
QObject * getFromSlot (const char *slot)
 Get the instance of object which holds the slot. More...
 
void connectSlot (const char *slot, const char *signal, QObject *obj)
 Connect an object's signal to a registered slot. More...
 
void registerShortcut (QString widgetName, QString actionName, QAction *action)
 Register an action on which users can change the shortcut to trigger it. More...
 
void registerShortcut (QString widgetName, QAction *action)
 Register an action on which users can change the shortcut to trigger it. More...
 

Signals

void viewCreated (OSGWidget *widget)
 Triggered when an OSGWidget is created. More...
 
void refresh ()
 
void applyCurrentConfiguration ()
 
void configurationValidation ()
 
void selectJointFromBodyName (const QString bodyName)
 
void logString (QString msg)
 
void logErrorString (QString msg)
 

Public Member Functions

 MainWindow (Settings *settings, QWidget *parent=0)
 
 ~MainWindow ()
 
void insertDockWidget (QDockWidget *dock, Qt::DockWidgetArea area=Qt::AllDockWidgetAreas, Qt::Orientation orientation=Qt::Horizontal)
 Insert a dockwidget in the dock area of the window. More...
 
void removeDockWidget (QDockWidget *dock)
 Remove a dock widget. More...
 
WindowsManagerPtr_t osg () const
 Get. More...
 
SelectionHandlerselectionHandler ()
 
QList< OSGWidget * > osgWindows () const
 Get the list of windows. More...
 
PluginManagerpluginManager ()
 Get the plugin manager. More...
 
ActionSearchBaractionSearchBar () const
 
QMenu * pluginMenu () const
 

Static Public Member Functions

static MainWindowinstance ()
 Return the instance of MainWindow stored. More...
 

Public Attributes

Settingssettings_
 

Detailed Description

Class.

Member Enumeration Documentation

◆ RefreshType

Enumerator
RefreshBodyTree 
RefreshPlugins 
RefreshAll 

Constructor & Destructor Documentation

◆ MainWindow()

gepetto::gui::MainWindow::MainWindow ( Settings settings,
QWidget *  parent = 0 
)
explicit

◆ ~MainWindow()

gepetto::gui::MainWindow::~MainWindow ( )

Member Function Documentation

◆ actionSearchBar()

ActionSearchBar* gepetto::gui::MainWindow::actionSearchBar ( ) const

◆ applyCurrentConfiguration

void gepetto::gui::MainWindow::applyCurrentConfiguration ( )
signal

◆ configurationValidation

void gepetto::gui::MainWindow::configurationValidation ( )
signal

◆ createView

OSGWidget* gepetto::gui::MainWindow::createView ( const std::string &  name)
slot

◆ insertDockWidget()

void gepetto::gui::MainWindow::insertDockWidget ( QDockWidget *  dock,
Qt::DockWidgetArea  area = Qt::AllDockWidgetAreas,
Qt::Orientation  orientation = Qt::Horizontal 
)

Insert a dockwidget in the dock area of the window.

Parameters
dockwidget to add
areawhere the widget will be add
orientationof the widget

◆ instance()

static MainWindow* gepetto::gui::MainWindow::instance ( )
static

Return the instance of MainWindow stored.

◆ logErrorString

void gepetto::gui::MainWindow::logErrorString ( QString  msg)
signal

◆ logString

void gepetto::gui::MainWindow::logString ( QString  msg)
signal

◆ osg()

WindowsManagerPtr_t gepetto::gui::MainWindow::osg ( ) const

Get.

◆ osgWindows()

QList<OSGWidget*> gepetto::gui::MainWindow::osgWindows ( ) const

Get the list of windows.

◆ pluginManager()

PluginManager* gepetto::gui::MainWindow::pluginManager ( )

Get the plugin manager.

◆ pluginMenu()

QMenu* gepetto::gui::MainWindow::pluginMenu ( ) const

◆ refresh

void gepetto::gui::MainWindow::refresh ( )
signal

◆ removeDockWidget()

void gepetto::gui::MainWindow::removeDockWidget ( QDockWidget *  dock)

Remove a dock widget.

Parameters
dockwidget to remove

◆ selectionHandler()

SelectionHandler* gepetto::gui::MainWindow::selectionHandler ( )
inline

◆ selectJointFromBodyName

void gepetto::gui::MainWindow::selectJointFromBodyName ( const QString  bodyName)
signal

◆ viewCreated

void gepetto::gui::MainWindow::viewCreated ( OSGWidget widget)
signal

Triggered when an OSGWidget is created.

Member Data Documentation

◆ settings_

Settings* gepetto::gui::MainWindow::settings_