Skip to content
Snippets Groups Projects
Commit 9109c471 authored by Raphael Grimm's avatar Raphael Grimm
Browse files

Merge branch 'ub18_robot_unit_gui_plugin' into 'master'

Fix the RobotUnitGuiPlugin for Ubuntu 18

See merge request ArmarX/RobotAPI!36
parents 7367ced3 23b21965
No related branches found
No related tags found
1 merge request!36Fix the RobotUnitGuiPlugin for Ubuntu 18
Pipeline #
......@@ -109,9 +109,9 @@ void RobotUnitPluginWidgetController::onConnectComponent()
{
robotUnitPrx = getProxy<RobotUnitInterfacePrx>(robotUnitProxyName);
listenerTopicName = robotUnitPrx->getListenerTopicName();
onConnectTimerId = startTimer(100);
usingTopic(listenerTopicName);
updateToolBarActionCheckedState();
QMetaObject::invokeMethod(this, "startOnConnectTimer", Qt::QueuedConnection);
}
void RobotUnitPluginWidgetController::onDisconnectComponent()
......@@ -156,7 +156,7 @@ QPointer<QWidget> RobotUnitPluginWidgetController::getCustomTitlebarWidget(QWidg
showCDevs = new QAction {"Control Devices", customToolbar};
showCDevs->setCheckable(true);
showCDevs->setToolTip("Hide/Show the list of Control Devices");
connect(showCDevs, SIGNAL(toggled(bool)), widget.groupBoxCDev, SLOT(setShown(bool)));
connect(showCDevs, SIGNAL(toggled(bool)), widget.groupBoxCDev, SLOT(setVisible(bool)));
customToolbar->addAction(showCDevs);
customToolbar->addSeparator();
......@@ -165,7 +165,7 @@ QPointer<QWidget> RobotUnitPluginWidgetController::getCustomTitlebarWidget(QWidg
showSDevs = new QAction {"Sensor Devices", customToolbar};
showSDevs->setCheckable(true);
showSDevs->setToolTip("Hide/Show the list of Sensor Devices");
connect(showSDevs, SIGNAL(toggled(bool)), widget.groupBoxSDev, SLOT(setShown(bool)));
connect(showSDevs, SIGNAL(toggled(bool)), widget.groupBoxSDev, SLOT(setVisible(bool)));
customToolbar->addAction(showSDevs);
customToolbar->addSeparator();
......@@ -174,7 +174,7 @@ QPointer<QWidget> RobotUnitPluginWidgetController::getCustomTitlebarWidget(QWidg
showNJoint = new QAction {"NJointControllers", customToolbar};
showNJoint->setCheckable(true);
showNJoint->setToolTip("Hide/Show the list of NJointControllers");
connect(showNJoint, SIGNAL(toggled(bool)), widget.groupBoxNJointCtrl, SLOT(setShown(bool)));
connect(showNJoint, SIGNAL(toggled(bool)), widget.groupBoxNJointCtrl, SLOT(setVisible(bool)));
customToolbar->addAction(showNJoint);
customToolbar->addSeparator();
......@@ -183,7 +183,7 @@ QPointer<QWidget> RobotUnitPluginWidgetController::getCustomTitlebarWidget(QWidg
showNJointClasses = new QAction {"NJointController Classes", customToolbar};
showNJointClasses->setCheckable(true);
showNJointClasses->setToolTip("Hide/Show the list of NJointControllers Classes");
connect(showNJointClasses, SIGNAL(toggled(bool)), widget.groupBoxNJointCtrlClasses, SLOT(setShown(bool)));
connect(showNJointClasses, SIGNAL(toggled(bool)), widget.groupBoxNJointCtrlClasses, SLOT(setVisible(bool)));
customToolbar->addAction(showNJointClasses);
customToolbar->addSeparator();
......@@ -249,6 +249,11 @@ void RobotUnitPluginWidgetController::writeLogClicked()
robotUnitPrx->writeRecentIterationsToFile("/tmp/RobotUnitLog-{DateTime}");
}
void RobotUnitPluginWidgetController::startOnConnectTimer()
{
onConnectTimerId = startTimer(100);
}
void RobotUnitPluginWidgetController::updateToolBarActionCheckedState()
{
if (customToolbar)
......@@ -261,18 +266,18 @@ void RobotUnitPluginWidgetController::updateToolBarActionCheckedState()
}
void armarx::RobotUnitPluginWidgetController::timerEvent(QTimerEvent *)
void armarx::RobotUnitPluginWidgetController::timerEvent(QTimerEvent*)
{
if(!robotUnitPrx)
if (!robotUnitPrx)
{
killTimer(onConnectTimerId);
}
if(robotUnitPrx->isRunning())
if (robotUnitPrx->isRunning())
{
QMetaObject::invokeMethod(this, "refreshNJointControllersClicked", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "refreshNJointControllerClassesClicked", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "refreshControlDevicesClicked", Qt::QueuedConnection);
QMetaObject::invokeMethod(this, "refreshSensorDevicesClicked", Qt::QueuedConnection);
refreshNJointControllersClicked();
refreshNJointControllerClassesClicked();
refreshControlDevicesClicked();
refreshSensorDevicesClicked();
killTimer(onConnectTimerId);
}
}
......@@ -136,6 +136,8 @@ namespace armarx
void writeLogClicked();
void startOnConnectTimer();
private:
virtual void timerEvent(QTimerEvent*) override;
void updateToolBarActionCheckedState();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment