Skip to content

Commit

Permalink
Merge pull request robotology#1261 from Nicogene/EnhanceYarpManager
Browse files Browse the repository at this point in the history
Enhance yarp manager
  • Loading branch information
drdanz authored Jun 8, 2017
2 parents 43ecf81 + 2620970 commit 8965acf
Show file tree
Hide file tree
Showing 12 changed files with 2,379 additions and 76 deletions.
490 changes: 490 additions & 0 deletions data/icons/512x512/action_connect_all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
487 changes: 487 additions & 0 deletions data/icons/512x512/action_disconnect_all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
307 changes: 307 additions & 0 deletions data/icons/512x512/action_kill_all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
414 changes: 414 additions & 0 deletions data/icons/512x512/action_play_all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
368 changes: 368 additions & 0 deletions data/icons/512x512/action_stop_all.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion doc/release/v2_3_68_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ Bug Fixes
* Added automatic refresh on the application tab open.
* Added automatic application tab open when you load an application from disk.
* Disabled the *select all* after pressing run all, stop all, refresh all and kill
all actions.
all actions.
* Added run/stop/kill/connect/disconnect all and run/stop/kill/connect/disconnect
selected

#### yarplaserscannergui

Expand Down
10 changes: 7 additions & 3 deletions src/yarpmanager/res.qrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
<RCC>
<qresource prefix="/">
<file alias="logo.svg">../../data/icons/512x512/yarpmanager.svg</file>
<file alias="stop.svg">../../data/icons/512x512/actions-media-stop_B.svg</file>
<file alias="play.svg">../../data/icons/512x512/actions-media-play_B.svg</file>
<file alias="play_all.svg">../../data/icons/512x512/action_play_all.svg</file>
<file alias="connect_all.svg">../../data/icons/512x512/action_connect_all.svg</file>
<file alias="disconnect_all.svg">../../data/icons/512x512/action_disconnect_all.svg</file>
<file alias="folder-new.svg">../../data/icons/512x512/folder-new.svg</file>
<file alias="folder.svg">../../data/icons/512x512/folder-sand.svg</file>
<file alias="folder-app.svg">../../data/icons/512x512/folder-sand.svg</file>
Expand All @@ -16,6 +18,7 @@
<file alias="apply.svg">../../data/icons/512x512/actions-apply.svg</file>
<file alias="clear.svg">../../data/icons/512x512/actions-edit-clear.svg</file>
<file alias="kill.svg">../../data/icons/512x512/actions-kill.svg</file>
<file alias="kill_all.svg">../../data/icons/512x512/action_kill_all.svg</file>
<file alias="connect.svg">../../data/icons/512x512/actions-connect.svg</file>
<file alias="refresh.svg">../../data/icons/512x512/actions-refresh.svg</file>
<file alias="disconnect.svg">../../data/icons/512x512/actions-disconnect.svg</file>
Expand All @@ -29,6 +32,7 @@
<file alias="close22.svg">../../data/icons/22x22/window-close-symbolic_A.svg</file>
<file alias="close22-red.svg">../../data/icons/22x22/window-close-symbolic_B.svg</file>
<file alias="stop22.svg">../../data/icons/22x22/actions-media-stop_B.svg</file>
<file alias="stop_all.svg">../../data/icons/512x512/action_stop_all.svg</file>
<file alias="play22.svg">../../data/icons/22x22/actions-media-play_B.svg</file>
<file alias="disconnect22.svg">../../data/icons/22x22/network-disconnected.svg</file>
<file alias="connect22.svg">../../data/icons/22x22/actions-connect.svg</file>
Expand Down
45 changes: 35 additions & 10 deletions src/yarpmanager/src-manager/applicationviewwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,25 @@ void ApplicationViewWidget::showBuilder(bool show)
builderWidget->setVisible(show);
}

bool ApplicationViewWidget::anyModuleSelected()
{
return !ui->moduleList->selectedItems().isEmpty();
}
bool ApplicationViewWidget::anyConnectionSelected()
{
return !ui->connectionList->selectedItems().isEmpty();
}

CustomTreeWidget* ApplicationViewWidget::getModuleList()
{
return ui->moduleList;
}

CustomTreeWidget* ApplicationViewWidget::getConnectionList()
{
return ui->connectionList;
}

QToolBar* ApplicationViewWidget::getBuilderToolBar()
{
return builderToolBar;
Expand Down Expand Up @@ -1409,6 +1428,7 @@ void ApplicationViewWidget::selectAllNestedApplicationModule(QTreeWidgetItem *it
}
}


/*! \brief Select/deselect all connections
\param check
*/
Expand Down Expand Up @@ -1465,37 +1485,42 @@ void ApplicationViewWidget::selectAll()
}

/*! \brief Run all modules in the application */
void ApplicationViewWidget::runApplicationSet()
void ApplicationViewWidget::runApplicationSet(bool onlySelected)
{
selectAllModule(true);
if(!onlySelected)
selectAllModule(true);
onRun();
}

/*! \brief Stop all modules in the application */
void ApplicationViewWidget::stopApplicationSet()
void ApplicationViewWidget::stopApplicationSet(bool onlySelected)
{
selectAllModule(true);
if(!onlySelected)
selectAllModule(true);
onStop();
}

/*! \brief Kill all running modules in the application */
void ApplicationViewWidget::killApplicationSet()
void ApplicationViewWidget::killApplicationSet(bool onlySelected)
{
selectAllModule(true);
if(!onlySelected)
selectAllModule(true);
onKill();
}

/*! \brief Connect all modules in the application to their ports using connections list*/
void ApplicationViewWidget::connectConnectionSet()
void ApplicationViewWidget::connectConnectionSet(bool onlySelected)
{
selectAllConnections(true);
if(!onlySelected)
selectAllConnections(true);
onConnect();
}

/*! \brief Disconnect all modules in the application to their ports using connections list*/
void ApplicationViewWidget::disconnectConnectionSet()
void ApplicationViewWidget::disconnectConnectionSet(bool onlySelected)
{
selectAllConnections(true);
if(!onlySelected)
selectAllConnections(true);
onDisconnect();
}

Expand Down
19 changes: 13 additions & 6 deletions src/yarpmanager/src-manager/applicationviewwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <QList>
#include <QDockWidget>
#include "yarpbuilderlib.h"
#include <customtreewidget.h>

namespace Ui {
class ApplicationViewWidget;
Expand All @@ -41,11 +42,11 @@ class ApplicationViewWidget : public GenericViewWidget, public ApplicationEvent
QWidget *parent = 0);
~ApplicationViewWidget();

void runApplicationSet();
void stopApplicationSet();
void killApplicationSet();
void connectConnectionSet();
void disconnectConnectionSet();
void runApplicationSet(bool onlySelected);
void stopApplicationSet(bool onlySelected);
void killApplicationSet(bool onlySelected);
void connectConnectionSet(bool onlySelected);
void disconnectConnectionSet(bool onlySelected);
void refresh();
void selectAll();
void exportGraph();
Expand All @@ -68,6 +69,12 @@ class ApplicationViewWidget : public GenericViewWidget, public ApplicationEvent
bool isBuilderFloating();
void showBuilder(bool);

bool anyModuleSelected();
bool anyConnectionSelected();

CustomTreeWidget* getModuleList();
CustomTreeWidget* getConnectionList();

bool save();
QString getFileName();
void setFileName(QString filename);
Expand Down Expand Up @@ -105,6 +112,7 @@ class ApplicationViewWidget : public GenericViewWidget, public ApplicationEvent
void selectAllNestedApplicationModule(QTreeWidgetItem *it, bool check);



private:
QMainWindow *builderWindowContainer;
QDockWidget *builderWidget;
Expand Down Expand Up @@ -202,7 +210,6 @@ private slots:
void builderWindowFloating(bool);



};

#endif // APPLICATIONVIEWWIDGET_H
Loading

0 comments on commit 8965acf

Please sign in to comment.