25 #include <RobotAPI/gui-plugins/RobotUnitPlugin/ui_RobotUnitPluginWidget.h>
34 #include <QPushButton>
35 #include <QTreeWidget>
36 #include <QTreeWidgetItem>
47 #include <RobotAPI/interface/units/RobotUnit/RobotUnitInterface.h>
51 #include "../QWidgets/NJointControllerClassesWidget.h"
52 #include "../QWidgets/NJointControllersWidget.h"
53 #include "../QWidgets/ControlDevicesWidget.h"
54 #include "../QWidgets/SensorDevicesWidget.h"
78 public RobotUnitListener
86 void loadSettings(QSettings* settings)
override;
89 void saveSettings(QSettings* settings)
override;
94 return "RobotControl.RobotUnitGUI";
98 void onInitComponent()
override;
101 void onConnectComponent()
override;
103 void onDisconnectComponent()
override;
104 void onExitComponent()
override;
109 QPointer<QDialog> getConfigDialog(QWidget* parent)
override;
112 void configured()
override;
116 return QIcon(
":/robotunitplugin/icons/robot_unit_icon.svg");
120 return QIcon(
":/robotunitplugin/icons/robot_unit_icon.svg");
122 QPointer<QWidget> getCustomTitlebarWidget(QWidget* parent)
override;
126 void nJointControllerStatusChanged(
const NJointControllerStatusSeq&
status,
const Ice::Current&)
override;
127 void controlDeviceStatusChanged(
const ControlDeviceStatusSeq&
status,
const Ice::Current&)
override;
128 void sensorDeviceStatusChanged(
const SensorDeviceStatusSeq&
status,
const Ice::Current&)
override;
129 void nJointControllerClassAdded(
const std::string& name,
const Ice::Current&)
override;
130 void nJointControllerCreated(
const std::string& name,
const Ice::Current&)
override;
131 void nJointControllerDeleted(
const std::string& name,
const Ice::Current&)
override;
134 void refreshNJointControllersClicked();
135 void refreshNJointControllerClassesClicked();
136 void refreshControlDevicesClicked();
137 void refreshSensorDevicesClicked();
138 void refreshLogging();
140 void startOnConnectTimer();
141 void stopOnConnectTimer();
144 void on_lineEditLoggingFilter_textChanged(
const QString& arg1);
145 void on_pushButtonLoggingStop_clicked();
146 void on_pushButtonLoggingStart_clicked();
147 void on_treeWidgetLoggingNames_itemChanged(QTreeWidgetItem* item,
int column);
148 void on_pushButtonLoggingMark1_clicked();
149 void on_pushButtonLoggingMark2_clicked();
150 void on_pushButtonLoggingMark3_clicked();
153 void timerEvent(QTimerEvent*)
override;
154 void updateToolBarActionCheckedState();
158 Ui::RobotUnitPluginWidget widget;
160 QPointer<SimpleConfigDialog> dialog;
162 std::string robotUnitProxyName;
163 std::recursive_mutex robotUnitPrxMutex;
165 std::string listenerTopicName;
172 QPointer<QToolBar> customToolbar;
174 QPointer<QAction> showCDevs;
175 QPointer<QAction> showSDevs;
176 QPointer<QAction> showNJoint;
177 QPointer<QAction> showNJointClasses;
178 QPointer<QAction> showLogging;
182 QTreeWidgetItem* top;
183 std::vector<QTreeWidgetItem*> allItems;
184 SimpleRemoteReferenceCounterBasePtr handle;
186 std::ofstream logStream;
187 static void updateCheckStateUpward(QTreeWidgetItem* item,
bool recurseParents);
188 static void updateCheckStateDownward(QTreeWidgetItem* item, Qt::CheckState state,
bool recurseChildren);
191 LoggingData loggingData;
194 std::atomic_bool timerLastIterationRuWasRunning =
false;