YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
mainwindow.h
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
6#ifndef MAINWINDOW_H
7#define MAINWINDOW_H
8
9#include <QMainWindow>
10#include <QFileSystemWatcher>
11#include <yarp/os/Network.h>
12#include <yarp/os/Property.h>
13#include <string>
15#include "entitiestreewidget.h"
16#include "genericviewwidget.h"
18#include "clusterWidget.h"
19//#include "message_list.h"
20//#include "application_list.h"
21
22namespace Ui {
23class MainWindow;
24}
25
29class MainWindow : public QMainWindow
30{
31 Q_OBJECT
33
34public:
35 explicit MainWindow(QWidget *parent = 0);
36 void init(yarp::os::Property config);
38
39 void reportErrors();
40
41private:
42 void syncApplicationList(QString selectNodeForEditing = "", bool open = false);
43 bool loadRecursiveTemplates(const char* szPath);
44 bool loadRecursiveApplications(const char* szPath);
45 bool initializeFile(std::string _class);
46 int getAppTabIndex(QString appName);
47 QString getAppNameFromXml(QString fileName);
48
49private:
50 Ui::MainWindow *ui;
51 yarp::manager::Manager lazyManager;
52 yarp::os::Property config;
53 QString fileName;
54 QString currentAppName;
55 QString currentAppDescription;
56 QString currentAppVersion;
57 QStringList listOfAppFiles;
58
59 QFileSystemWatcher* watcher;
60
61 EntitiesTreeWidget *entitiesTree;
62 QToolBar *builderToolBar;
63 GenericViewWidget *prevWidget;
64
65 std::string ext_editor;
66
67protected:
68 void closeEvent(QCloseEvent *) override;
69
70
71private slots:
72 void onSave();
73 void onSaveAs();
74 void onOpen();
75 void onClose();
76 void onImportFiles();
77 void onNewModule();
78 void onNewResource();
79 void onNewApplication();
80 void onExportGraph();
81 void onRun(bool onlySelected=false);
82 void onStop(bool onlySelected=false);
83 void onKill(bool onlySelected=false);
84 void onConnect(bool onlySelected=false);
85 void onDisconnect(bool onlySelected=false);
86 void onRunSelected();
87 void onStopSelected();
88 void onKillSelected();
89 void onConnectSelected();
90 void onDisconnectSelected();
91 void onRefresh();
92 void onSelectAll();
93 bool onTabClose(int);
94 void onLogError(QString);
95 void onLogWarning(QString);
96 void onLogMessage(QString);
97 void onHelp();
98 void onAbout();
99 void onWizardError(QString);
100
101 void onModified(bool);
102 void onFileChanged(const QString & path);
103 void onYarpClean();
104 void onYarpNameList();
105
106public slots:
107 void onTabChangeItem(int);
110 void viewApplication(yarp::manager::Application *app, bool editingMode);
111
112 void onRemoveApplication(QString , QString);
113 void onRemoveModule(QString);
114 void onRemoveResource(QString);
115 void onReopenApplication(QString,QString);
116 void onReopenModule(QString,QString);
117 void onReopenResource(QString,QString);
119
120signals:
121 void selectItem(QString, bool);
122};
123
124#endif // MAINWINDOW_H
The Entities QtreeWidget.
Generic View Widget.
MainWindow class.
Definition display.h:22
void onReopenApplication(QString, QString)
void init(yarp::os::Property config)
Init the application with the current configuration.
void onReopenModule(QString, QString)
void viewApplication(yarp::manager::Application *app, bool editingMode)
Load the Application on the MainWindow.
void closeEvent(QCloseEvent *) override
void onTabChangeItem(int)
Called when a tab has been pressed.
void viewModule(yarp::manager::Module *)
Load the Module on the MainWindow.
MainWindow(QWidget *parent=0)
void selectItem(QString, bool)
void onApplicationSelectionChanged()
void onRemoveResource(QString)
void onRemoveApplication(QString, QString)
void onReopenResource(QString, QString)
void onRemoveModule(QString)
void reportErrors()
Reports tge error on the log window.
void viewResource(yarp::manager::Computer *res)
Load the Resource on the MainWindow.
Class Application.
Class Manager.
Definition manager.h:20
Class Module.
Definition module.h:99
A class for storing options and configuration information.
Definition Property.h:33
Definition aboutdlg.h:11