YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
entitiestreewidget.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: LGPL-2.1-or-later
4 */
5
8#include <dirent.h>
9#include <QProcess>
10#include <QHeaderView>
11#include <QMessageBox>
12#include <QTreeWidgetItem>
13#include <QMimeData>
14#include <QDrag>
15#include <QDebug>
16#include <QDragEnterEvent>
17#include <QPainter>
18
19
20EntitiesTreeWidget::EntitiesTreeWidget(QWidget *parent) : QTreeWidget(parent)
21{
22
23 missingFile = false;
24 applicationNode = new QTreeWidgetItem(this,QStringList() << "Applications");
25 modulesNode = new QTreeWidgetItem(this,QStringList() << "Modules");
26 resourcesNode = new QTreeWidgetItem(this,QStringList() << "Resources");
27 templatesNode = new QTreeWidgetItem(this,QStringList() << "Templates");
28 portsNode = new QTreeWidgetItem(this,QStringList() << "Ports");
29
30 applicationNode->setIcon(0,QIcon(":/folder-app.svg"));
31 modulesNode->setIcon(0,QIcon(":/folder-mod.svg"));
32 resourcesNode->setIcon(0,QIcon(":/folder-res.svg"));
33 templatesNode->setIcon(0,QIcon(":/folder.svg"));
34 portsNode->setIcon(0,QIcon(":/folder-ports.svg"));
35
36
37 addTopLevelItem(applicationNode);
38 addTopLevelItem(modulesNode);
39 addTopLevelItem(resourcesNode);
40 addTopLevelItem(templatesNode);
41 addTopLevelItem(portsNode);
42
43 setExpandsOnDoubleClick(false);
44 setContextMenuPolicy(Qt::CustomContextMenu);
45 resizeColumnToContents(0);
46
47 connect(this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),this,SLOT(onItemDoubleClicked(QTreeWidgetItem*,int)));
48 connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(onContext(QPoint)));
49
50 openFile = new QAction("Open File",this);
51 importFile = new QAction("Import Files...",this);
52
53 topLevelMenu.addAction(openFile);
54 topLevelMenu.addAction(importFile);
55
56 loadFiles = new QAction("Load",this);
57 auto* separator = new QAction(this);
58 separator->setSeparator(true);
59 reopen = new QAction("Refresh",this);
60 remove = new QAction("Remove",this);
61 editApplication = new QAction("Edit",this);
62
63 secondLevelMenu.addAction(loadFiles);
64 secondLevelMenu.addAction(editApplication);
65 secondLevelMenu.addAction(separator);
66 secondLevelMenu.addAction(reopen);
67 secondLevelMenu.addAction(remove);
68
69 edit = new QAction("Edit",this);
70 leafLevelMenu.addAction(edit);
71
72 connect(loadFiles,SIGNAL(triggered()),this,SLOT(onLoadFile()));
73 connect(editApplication,SIGNAL(triggered()),this,SLOT(onEditApplication()));
74 connect(openFile,SIGNAL(triggered()),this,SIGNAL(openFiles()));
75 connect(importFile,SIGNAL(triggered()),this,SIGNAL(importFiles()));
76 connect(edit,SIGNAL(triggered()),this,SLOT(onEdit()));
77 connect(remove,SIGNAL(triggered()),this,SLOT(onRemove()));
78 connect(reopen,SIGNAL(triggered()),this,SLOT(onReopen()));
79
80 #if defined(_WIN32)
81 ext_editor = "notepad.exe";
82 #else
83 ext_editor = "xdg-open";
84 #endif
85
86 setDragEnabled(true);
87 setDragDropMode(DragOnly);
88}
89
90void EntitiesTreeWidget::setExtEditor(std::string editor)
91{
92 ext_editor = editor.c_str();
93}
94
99{
100 QTreeWidgetItem *item = new QTreeWidgetItem(applicationNode,QStringList() << app->getName());
101 item->setData(0,Qt::UserRole + 1,qlonglong(app));
102 item->setData(0,Qt::UserRole, yarp::manager::APPLICATION);
103 item->setIcon(0,QIcon(":/run22.svg"));
104
105
106
107 std::string fname;
108 std::string fpath = app->getXmlFile();
109 size_t pos = fpath.rfind(yarp::conf::filesystem::preferred_separator);
110 if (pos!=std::string::npos) {
111 fname = fpath.substr(pos+1);
112 } else {
113 fname = fpath;
114 }
115 fname = fname + std::string(" (") + fpath + std::string(")");
116
117 QTreeWidgetItem *xml = new QTreeWidgetItem(item,QStringList() << fname.data());
118 xml->setData(0,Qt::UserRole + 1,QString(fpath.data()));
119 xml->setData(0,Qt::UserRole, yarp::manager::NODE_FILENAME);
120 xml->setIcon(0,QIcon(":/file-xml22.svg"));
121}
122
127{
128 QTreeWidgetItem *item = new QTreeWidgetItem(resourcesNode,QStringList() << comp->getName());
129 item->setData(0,Qt::UserRole + 1,qlonglong(comp));
130 item->setData(0,Qt::UserRole, yarp::manager::RESOURCE);
131 item->setIcon(0,QIcon(":/computer22.svg"));
132
133 std::string fname;
134 std::string fpath = comp->getXmlFile();
135 size_t pos = fpath.rfind(yarp::conf::filesystem::preferred_separator);
136 if (pos!=std::string::npos) {
137 fname = fpath.substr(pos+1);
138 } else {
139 fname = fpath;
140 }
141 fname = fname + std::string(" (") + fpath + std::string(")");
142
143 QTreeWidgetItem *xml = new QTreeWidgetItem(item,QStringList() << fname.data());
144 xml->setData(0,Qt::UserRole + 1,QString(fpath.data()));
145 xml->setData(0,Qt::UserRole, yarp::manager::NODE_FILENAME);
146}
147
152{
153 QTreeWidgetItem *item = new QTreeWidgetItem(modulesNode,QStringList() << mod->getName());
154 item->setData(0,Qt::UserRole + 1,qlonglong(mod));
155 item->setData(0,Qt::UserRole, yarp::manager::MODULE);
156 item->setIcon(0,QIcon(":/module22.svg"));
157
158 std::string fname;
159 std::string fpath = mod->getXmlFile();
160 size_t pos = fpath.rfind(yarp::conf::filesystem::preferred_separator);
161 if (pos!=std::string::npos) {
162 fname = fpath.substr(pos+1);
163 } else {
164 fname = fpath;
165 }
166 fname = fname + std::string(" (") + fpath + std::string(")");
167
168 QTreeWidgetItem *xml = new QTreeWidgetItem(item,QStringList() << fname.data());
169 xml->setData(0,Qt::UserRole + 1,QString(fpath.data()));
170 xml->setData(0,Qt::UserRole, yarp::manager::NODE_FILENAME);
171}
172
177{
178
179 QTreeWidgetItem *item = new QTreeWidgetItem(templatesNode,QStringList() << QString("%1 (%2)").arg(tmp->name.data()).arg(tmp->tmpFileName.data()));
180
181 item->setData(0,Qt::UserRole, yarp::manager::NODE_APPTEMPLATE);
182 item->setData(0,Qt::UserRole + 1 ,tmp->name.data());
183 item->setData(0,Qt::UserRole + 2 ,tmp->tmpFileName.data());
184 item->setIcon(0,QIcon(":/file-xml22.svg"));
185}
186
187void EntitiesTreeWidget::addPort(QStringList portDetails)
188{
189 if (portDetails.size() < 2)
190 {
191 return;
192 }
193 QTreeWidgetItem *item = new QTreeWidgetItem(portsNode,QStringList() << portDetails[0]);
194 item->setIcon(0,QIcon(":/port22.svg"));
195 QTreeWidgetItem *portIp = new QTreeWidgetItem(item,QStringList() << portDetails[1]);
196 YARP_UNUSED(portIp);
197
198}
199
200
201void EntitiesTreeWidget::onSelectItem(QString name, bool open)
202{
203 for(int i=0;applicationNode->childCount();i++) {
204 if (applicationNode->child(i)->text(0) == name) {
205 yarp::manager::Application *app = (yarp::manager::Application*)applicationNode->child(i)->data(0,Qt::UserRole + 1).toLongLong();
206 emit viewApplication(app, !open);
207 return;
208 }
209 }
210}
211
220void EntitiesTreeWidget::onItemDoubleClicked(QTreeWidgetItem *item,int column)
221{
222 Q_UNUSED(column);
223
224 if (item == applicationNode || item == resourcesNode || item == modulesNode || item == templatesNode) {
225 if (!item->isExpanded()) {
226 expandItem(item);
227 } else {
228 collapseItem(item);
229 }
230 return;
231 }
232
233
234 if (item->data(0,Qt::UserRole).toInt() == (int)yarp::manager::APPLICATION) {
235 yarp::manager::Application *app = (yarp::manager::Application*)item->data(0,Qt::UserRole + 1).toLongLong();
236 if(app)
237 {
238 QString fileName = QString("%1").arg(app->getXmlFile());
239
240 QFile file(fileName);
241 if(!file.exists()){
242 missingFile=true;
243 onRemove();
244 return;
245 }
246 emit viewApplication(app);
247 }
248 }
249
250 if (item->data(0,Qt::UserRole).toInt() == (int)yarp::manager::MODULE) {
251 yarp::manager::Module *mod = (yarp::manager::Module*)item->data(0,Qt::UserRole + 1).toLongLong();
252 if (mod) {
253 QString fileName = QString("%1").arg(mod->getXmlFile());
254
255 QFile file(fileName);
256 if(!file.exists()){
257 missingFile=true;
258 onRemove();
259 return;
260 }
261 emit viewModule(mod);
262 }
263 }
264
265 if (item->data(0,Qt::UserRole).toInt() == (int)yarp::manager::RESOURCE) {
266 yarp::manager::Computer *res = (yarp::manager::Computer*)item->data(0,Qt::UserRole + 1).toLongLong();
267 QString fileName = QString("%1").arg(res->getXmlFile());
268
269 QFile file(fileName);
270 if(!file.exists()){
271 missingFile=true;
272 onRemove();
273 return;
274 }
275 emit viewResource(res);
276 }
277
278 if (item->data(0,Qt::UserRole).toInt() == (int)yarp::manager::NODE_APPTEMPLATE) {
279 QString name = item->data(0,Qt::UserRole + 1).toString();
280 QString tmpFileName = item->data(0,Qt::UserRole + 2).toString();
281 qDebug("%s",name.toLatin1().data());
282
283 QProcess *notepad;
284 notepad = new QProcess(this);
285 notepad->start(ext_editor,QStringList()<<tmpFileName);
286
287 }
288
289 if (item->data(0,Qt::UserRole).toInt() == (int)yarp::manager::NODE_FILENAME) {
290 QString fileName = item->data(0,Qt::UserRole + 1).toString();
291 qDebug("%s",fileName.toLatin1().data());
292
293 QProcess *notepad;
294 notepad = new QProcess(this);
295 notepad->start(ext_editor,QStringList()<<fileName);
296 }
297}
298
299
301{
302 if (selectedItems().count() <= 0) {
303 return;
304 }
305 QTreeWidgetItem *selectedItem = selectedItems().at(0);
306 if (selectedItem ) {
307
308 if (!selectedItem->data(0,Qt::UserRole).isValid()) {
309 QTreeWidget::mousePressEvent(event);
310 return;
311 }
312 qlonglong pointer = selectedItem->data(0,Qt::UserRole + 1).toLongLong();
313
314 auto* mimeData = new QMimeData;
315 QByteArray strPointer = QString("%1").arg(pointer).toLatin1();
316 mimeData->setData("pointer",strPointer);
317
318 if (selectedItem->data(0,Qt::UserRole).toInt() == (int)yarp::manager::MODULE) {
319 mimeData->setText("module");
320 }
321 if (selectedItem->data(0,Qt::UserRole).toInt() == (int)yarp::manager::APPLICATION) {
322 mimeData->setText("application");
323 }
324
325 QFontMetrics fontMetric(font());
326 //int textWidth = fontMetric.width(selectedItem->text(0));
327
328 auto* drag = new QDrag(this);
329 drag->setMimeData(mimeData);
330
331// QPixmap pix(textWidth + 40,18);
332// QPainter painter(&pix);
333// QPen pen(QBrush(QColor((Qt::blue))),1);
334// painter.setPen(pen);
335// painter.fillRect(0,0,textWidth + 40,18,QBrush(QColor((Qt::lightGray))));
336// painter.drawRect(0,0,textWidth- + 39,17);
337// painter.drawImage(QRectF(1,1,16,16),QImage(":/module22.svg"));
338// painter.drawText(QRectF(16,1,textWidth + 20,16),Qt::AlignCenter,selectedItem->text(0));
339// //pix.fill(QColor(Qt::red));
340// drag->setPixmap(pix);
341
342
343 drag->exec(Qt::CopyAction);
344
345
346 }
347
348 QTreeWidget::mouseMoveEvent(event);
349}
350
352{
353 //QTreeWidgetItem *selectedItem = itemAt(event->pos());
354
355 // If the selected Item exists
356// if (selectedItem && event->button() == Qt::MouseButton::LeftButton) {
357
358// if (!selectedItem->data(0,Qt::UserRole).isValid()) {
359// QTreeWidget::mousePressEvent(event);
360// return;
361// }
362// qlonglong pointer = selectedItem->data(0,Qt::UserRole + 1).toLongLong();
363
364// QMimeData *mimeData = new QMimeData;
365// QByteArray strPointer = QString("%1").arg(pointer).toLatin1();
366// mimeData->setData("pointer",strPointer);
367
368// if (selectedItem->data(0,Qt::UserRole).toInt() == (int)yarp::manager::MODULE) {
369// mimeData->setText("module");
370// }
371// if (selectedItem->data(0,Qt::UserRole).toInt() == (int)yarp::manager::APPLICATION) {
372// mimeData->setText("application");
373// }
374
375// QFontMetrics fontMetric(font());
376// int textWidth = fontMetric.width(selectedItem->text(0));
377
378// QDrag *drag = new QDrag(this);
379// drag->setMimeData(mimeData);
380// QPixmap pix(textWidth + 40,18);
381// QPainter painter(&pix);
382// QPen pen(QBrush(QColor((Qt::blue))),1);
383// painter.setPen(pen);
384// painter.fillRect(0,0,textWidth + 40,18,QBrush(QColor((Qt::lightGray))));
385// painter.drawRect(0,0,textWidth + 39,17);
386// painter.drawImage(QRectF(1,1,16,16),QImage(":/module22.svg"));
387// painter.drawText(QRectF(16,1,textWidth + 20,16),Qt::AlignCenter,selectedItem->text(0));
388// //pix.fill(QColor(Qt::red));
389// drag->setPixmap(pix);
390
391
392// drag->exec(Qt::CopyAction);
393
394
395// }
396
397 QTreeWidget::mousePressEvent(event);
398}
399
403{
404 if (!applicationNode) {
405 return;
406 }
407 while(applicationNode->childCount() > 0) {
408 applicationNode->removeChild(applicationNode->child(0));
409 }
410}
411
415{
416 if (!modulesNode) {
417 return;
418 }
419 while(modulesNode->childCount() > 0) {
420 modulesNode->removeChild(modulesNode->child(0));
421 }
422}
423
427{
428 if (!resourcesNode) {
429 return;
430 }
431 while(resourcesNode->childCount() > 0) {
432 resourcesNode->removeChild(resourcesNode->child(0));
433 }
434}
435
439{
440 if (!templatesNode) {
441 return;
442 }
443 while(templatesNode->childCount() > 0) {
444 templatesNode->removeChild(templatesNode->child(0));
445 }
446}
447
449{
450 if (!portsNode)
451 {
452 return;
453 }
454 while (portsNode->childCount() > 0)
455 {
456 portsNode->removeChild(portsNode->child(0));
457 }
458}
459
460QTreeWidgetItem * EntitiesTreeWidget::getWidgetItemByFilename(const QString xmlFile){
461 QList<QTreeWidgetItem*> clist = this->findItems(xmlFile, Qt::MatchContains|Qt::MatchRecursive, 0);
462 if (clist.size()) {
463 return clist.at(0)->parent();
464 }
465 return nullptr;
466}
467
472{
473 QTreeWidgetItem *it = itemAt(p);
474
475 if (!it) {
476 return;
477 }
478 QPoint pp = QPoint(p.x(),p.y() + header()->height());
479 if (it == applicationNode || it ==resourcesNode || it == modulesNode || it == templatesNode) {
480 topLevelMenu.exec(mapToGlobal(pp));
481 }
482 else if(it == portsNode)
483 {
484 //do nothing
485 }
486 else {
487 if (it->parent() == applicationNode) {
488 loadFiles->setText("Load Application");
489 secondLevelMenu.exec(mapToGlobal(pp));
490 } else if (it->parent() == resourcesNode) {
491 loadFiles->setText("Load Resource");
492 secondLevelMenu.exec(mapToGlobal(pp));
493 } else if (it->parent() == modulesNode) {
494 loadFiles->setText("Load Module");
495 secondLevelMenu.exec(mapToGlobal(pp));
496 }
497 else if(it->parent() == portsNode || it->parent()->parent() == portsNode)
498 {
499 //do nothing
500 }
501 else {
502 leafLevelMenu.exec(mapToGlobal(pp));
503 }
504 }
505}
506
507
509{
510 QTreeWidgetItem *it = currentItem();
511
512 if (!it) {
513 return;
514 }
515
516 if (it->parent() == applicationNode) {
517 if (it->data(0,Qt::UserRole) == yarp::manager::APPLICATION) {
518 yarp::manager::Application *app = (yarp::manager::Application*)it->data(0,Qt::UserRole + 1).toLongLong();
519 if(app){
520 QString fileName = QString("%1").arg(app->getXmlFile());
521
522 QFile file(fileName);
523 if(!file.exists()){
524 missingFile=true;
525 onRemove();
526 return;
527 }
528 emit viewApplication(app,true);
529 }
530 }
531 }
532}
533
539{
540 QTreeWidgetItem *it = currentItem();
541
542 if (!it) {
543 return;
544 }
545
546 if (it->parent() == applicationNode) {
547 if (it->data(0,Qt::UserRole) == yarp::manager::APPLICATION) {
548 yarp::manager::Application *app = (yarp::manager::Application*)it->data(0,Qt::UserRole + 1).toLongLong();
549 emit viewApplication(app);
550 }
551 } else if (it->parent() == resourcesNode) {
552 if (it->data(0,Qt::UserRole) == yarp::manager::RESOURCE) {
553 yarp::manager::Computer *res = (yarp::manager::Computer*)it->data(0,Qt::UserRole + 1).toLongLong();
554 emit viewResource(res);
555 }
556 } else if (it->parent() == modulesNode) {
557 if (it->data(0,Qt::UserRole) == yarp::manager::MODULE) {
558 yarp::manager::Module *mod = (yarp::manager::Module*)it->data(0,Qt::UserRole + 1).toLongLong();
559 emit viewModule(mod);
560 }
561 }
562
563}
564
570{
571 QTreeWidgetItem *item = currentItem();
572
573 if (!item) {
574 return;
575 }
576 if (item->data(0,Qt::UserRole) == yarp::manager::NODE_FILENAME) {
577 QString fileName = item->data(0,Qt::UserRole + 1).toString();
578
579 QProcess *notepad;
580 notepad = new QProcess(this);
581 notepad->start(ext_editor,QStringList()<<fileName);
582 } else if (item->data(0,Qt::UserRole) == yarp::manager::NODE_APPTEMPLATE) {
583 QString name = item->data(0,Qt::UserRole + 1).toString();
584 QString tmpFileName = item->data(0,Qt::UserRole + 2).toString();
585 qDebug("%s",name.toLatin1().data());
586
587 QProcess *notepad;
588 notepad = new QProcess(this);
589 notepad->start(ext_editor,QStringList()<<tmpFileName);
590
591 }
592
593}
594
598{
599 QTreeWidgetItem *it = currentItem();
600 if (!it) {
601 return;
602 }
603
604 QTreeWidgetItem *parent = it -> parent();
605 int index = it -> parent() -> indexOfChild(it);
606
607 if (it->parent() == applicationNode) {
608 if (it->data(0,Qt::UserRole) == yarp::manager::APPLICATION) {
609 yarp::manager::Application *app = (yarp::manager::Application*)it->data(0,Qt::UserRole + 1).toLongLong();
610 if (app) {
611 QString fileName = QString("%1").arg(app->getXmlFile());
612 QString appName = it->text(0);
613
614 QFile file(fileName);
615 if(!file.exists()){
616 missingFile=true;
617 onRemove();
618 return;
619 }
620
621 emit reopenApplication(appName,fileName);
622 }
623
624 }
625 } else if (it->parent() == resourcesNode) {
626 if (it->data(0,Qt::UserRole) == yarp::manager::RESOURCE) {
627 yarp::manager::Computer *res = (yarp::manager::Computer*)it->data(0,Qt::UserRole + 1).toLongLong();
628 if (res) {
629 QString fileName = QString("%1").arg(res->getXmlFile());
630 QString resName = it->text(0);
631 QFile file(fileName);
632 if(!file.exists()){
633 missingFile=true;
634 onRemove();
635 }
636
637 emit reopenResource(resName,fileName);
638 }
639 }
640 } else if (it->parent() == modulesNode) {
641 if (it->data(0,Qt::UserRole) == yarp::manager::MODULE) {
642 yarp::manager::Module *mod = (yarp::manager::Module*)it->data(0,Qt::UserRole + 1).toLongLong();
643 if (mod) {
644 QString fileName = QString("%1").arg(mod->getXmlFile());
645 QString modName = it->text(0);
646 QFile file(fileName);
647 if(!file.exists()){
648 missingFile=true;
649 onRemove();
650 }
651
652 emit reopenModule(modName,fileName);
653 }
654 }
655 }
656
657 parent -> child(index) -> setSelected(true);
658 scrollToItem(parent -> child(index));
659}
660
664{
665 QTreeWidgetItem *item = currentItem();
666
667
668 if (!item) {
669 return;
670 }
671
672
673
674 if (missingFile || QMessageBox::question(this,"Removing","Are you sure to remove this item?") == QMessageBox::Yes) {
675
676 if (item->parent() == applicationNode) {
677 if (item->data(0,Qt::UserRole) == yarp::manager::APPLICATION) {
678 yarp::manager::Application *app = (yarp::manager::Application*)item->data(0,Qt::UserRole + 1).toLongLong();
679 if (app) {
680 QString appName = item->text(0);
681 QString xmlFile = app->getXmlFile();
682 emit removeApplication(xmlFile,appName);
683 }
684
685 }
686 } else if (item->parent() == resourcesNode) {
687 if (item->data(0,Qt::UserRole) == yarp::manager::RESOURCE) {
688 yarp::manager::Computer *res = (yarp::manager::Computer*)item->data(0,Qt::UserRole + 1).toLongLong();
689 if (res) {
690 QString resName = item->text(0);
691 emit removeResource(resName);
692 }
693 }
694 } else if (item->parent() == modulesNode) {
695 if (item->data(0,Qt::UserRole) == yarp::manager::MODULE) {
696 yarp::manager::Module *mod = (yarp::manager::Module*)item->data(0,Qt::UserRole + 1).toLongLong();
697 if (mod) {
698 QString modName = item->text(0);
699 emit removeModule(modName);
700 }
701 }
702 }
703
704 while(item->childCount()>0) {
705 delete item->takeChild(0);
706 }
707
708 if (item->parent()) {
709 int index = item->parent()->indexOfChild(item);
710 delete item->parent()->takeChild(index);
711 }
712 missingFile = false;
713 }
714}
int SIGNAL(int pid, int signum)
void clearApplications()
Clear the application node.
void mousePressEvent(QMouseEvent *event) override
void removeApplication(QString, QString)
void reopenApplication(QString, QString)
void viewResource(yarp::manager::Computer *)
void addApplication(yarp::manager::Application *app)
Add an application to the tree.
void clearModules()
Clear the module node.
void viewApplication(yarp::manager::Application *, bool editing=false)
void onReopen()
Reload the selected entity node.
void removeResource(QString)
void clearTemplates()
Clear the application template node.
void onLoadFile()
Called when a file has been loaded.
void onContext(QPoint)
Called when a context menu has been requested.
void addModule(yarp::manager::Module *mod)
Add a module to the tree.
void onRemove()
Remove the selected entity node.
void onItemDoubleClicked(QTreeWidgetItem *item, int column)
Called when an item has been double clicked.
void addAppTemplate(yarp::manager::AppTemplate *tmp)
Add an application template to the tree.
void onEdit()
Edit an item.
QTreeWidgetItem * getWidgetItemByFilename(const QString xmlFile)
void viewModule(yarp::manager::Module *)
void reopenModule(QString, QString)
void onSelectItem(QString, bool open=false)
void addComputer(yarp::manager::Computer *comp)
Add a resource to the tree.
void setExtEditor(std::string editor)
void clearResources()
Clear the resource node.
void addPort(QStringList portDetails)
void removeModule(QString)
void mouseMoveEvent(QMouseEvent *event) override
EntitiesTreeWidget(QWidget *parent=0)
void reopenResource(QString, QString)
Class Application.
Class Module.
Definition module.h:99
const char * getXmlFile()
Definition module.h:136
const char * getName()
Definition module.h:128
static constexpr value_type preferred_separator
Definition filesystem.h:21
Abstract Class TempLoader.
#define YARP_UNUSED(var)
Definition api.h:162