From 01fb2870e9f1d8db80d8a6d459c5d7a11c6e8d87 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Wed, 14 Feb 2018 20:03:05 +0100 Subject: [PATCH] Make MainWindow::createView accessible to Python --- include/gepetto/gui/mainwindow.hh | 4 +++- src/gui/mainwindow.cc | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/gepetto/gui/mainwindow.hh b/include/gepetto/gui/mainwindow.hh index 18d30af..e92f887 100644 --- a/include/gepetto/gui/mainwindow.hh +++ b/include/gepetto/gui/mainwindow.hh @@ -139,7 +139,7 @@ signals: /// \param text text to log void logJobFailed (int id, const QString& text); - OSGWidget* createView (const std::string& name); + OSGWidget* createView (const QString& name); /// Request a refresh of the interface. /// \param refreshType tells what to refresh. See RefreshType void requestRefresh (); @@ -212,6 +212,8 @@ signals: /// \} + OSGWidget* createView (const std::string& name); + private slots: void addOSGWidget(OSGWidget* osgWidget); diff --git a/src/gui/mainwindow.cc b/src/gui/mainwindow.cc index 690956f..ef253b6 100644 --- a/src/gui/mainwindow.cc +++ b/src/gui/mainwindow.cc @@ -210,6 +210,11 @@ namespace gepetto { emit logErrorString (QString ("Job ") + QString::number (id) + " failed: " + text); } + OSGWidget *MainWindow::createView(const QString& name) + { + return createView (name.toStdString()); + } + OSGWidget *MainWindow::createView(const std::string& name) { if (thread() != QThread::currentThread()) { -- GitLab