NJointControllersWidget.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * \package RobotAPI::gui-plugins::RobotUnitPlugin
17  * \author Raphael Grimm ( raphael dot grimm at kit dot edu )
18  * \date 2017
19  * \copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
23 #include "StyleSheets.h"
24 
26 
27 namespace armarx
28 {
30  RobotUnitWidgetTemplateBase("NJointControllersWidget", parent)
31  {
32  ui->treeWidget->setColumnCount(11);
33  QTreeWidgetItem* head = ui->treeWidget->headerItem();
34 
35  head->setText(idxName, "Name");
36  head->setText(idxClass, "Class");
37  head->setText(idxActive, "Act");
38  head->setText(idxRequested, "Req");
39  head->setText(idxError, "Err");
40  head->setText(idxInternal, "Int");
41  head->setText(idxCtrlDev, "Devices");
42  head->setText(idxCtrlMode, "Modes");
43  head->setText(idxActivate, "");
44  head->setText(idxDeactivate, "");
45  head->setText(idxDelete, "");
46 
47  head->setToolTip(idxName, "The controllers instance name (green: ok, red: active and requested state missmatch or there is an error)");
48  head->setToolTip(idxClass, "The controllers class name");
49  head->setToolTip(idxActive, "Whether the controller is active (green: ok, red: active and requested state missmatch)");
50  head->setToolTip(idxRequested, "Whether the controller is requested (green: ok, red: active and requested state missmatch)");
51  head->setToolTip(idxError, "Whether the controller is deactivated due to an error (green: ok, red: there is an error)");
52  head->setToolTip(idxInternal, "Whether the controller is internal (e.g. used by the kinematic unit)");
53  head->setToolTip(idxCtrlDev, "The control devices used by this controller");
54  head->setToolTip(idxCtrlMode, "The controll mode for the control devices used by this controller");
55  head->setToolTip(idxActivate, "Button to activate the Controller");
56  head->setToolTip(idxDeactivate, "Button to deactivate the Controller");
57  head->setToolTip(idxDelete, "Button to delete the Controller");
58 
59  ui->treeWidget->setColumnWidth(idxName, 400);
60  ui->treeWidget->setColumnWidth(idxClass, 200);
61  ui->treeWidget->setColumnWidth(idxCtrlDev, 130);
62  ui->treeWidget->setColumnWidth(idxCtrlMode, 150);
63  ui->treeWidget->setColumnWidth(idxActivate, 40);
64  ui->treeWidget->setColumnWidth(idxDeactivate, 40);
65  ui->treeWidget->setColumnWidth(idxDelete, 40);
66  ui->treeWidget->setColumnWidth(idxRequested, 40);
67  ui->treeWidget->setColumnWidth(idxActive, 40);
68  ui->treeWidget->setColumnWidth(idxError, 40);
69  ui->treeWidget->setColumnWidth(idxInternal, 40);
70 
71  ui->treeWidget->header()->setResizeMode(idxActivate, QHeaderView::Fixed);
72  ui->treeWidget->header()->setResizeMode(idxDeactivate, QHeaderView::Fixed);
73  ui->treeWidget->header()->setResizeMode(idxDelete, QHeaderView::Fixed);
74  ui->treeWidget->header()->setResizeMode(idxRequested, QHeaderView::Fixed);
75  ui->treeWidget->header()->setResizeMode(idxActive, QHeaderView::Fixed);
76  ui->treeWidget->header()->setResizeMode(idxError, QHeaderView::Fixed);
77  ui->treeWidget->header()->setResizeMode(idxInternal, QHeaderView::Fixed);
78 
79  ui->pushButtonStopAll->setIcon(QIcon {QString{":/icons/media-playback-pause.ico"}});
80  ui->pushButtonRemoveAll->setIcon(QIcon {QString{":/icons/Trash.svg"}});
81  connect(ui->pushButtonStopAll, SIGNAL(clicked()), this, SLOT(onPushButtonStopAll_clicked()));
82  connect(ui->pushButtonRemoveAll, SIGNAL(clicked()), this, SLOT(onPushButtonRemoveAll_clicked()));
83  }
84 
86  {
87  delete ui;
88  }
89 
90  void NJointControllersWidget::nJointControllerStatusChanged(const NJointControllerStatusSeq& allStatus)
91  {
92  std::unique_lock<std::recursive_timed_mutex> guard {mutex, std::defer_lock};
93  if (!guard.try_lock_for(std::chrono::microseconds(100)))
94  {
95  return;
96  }
97  for (const auto& status : allStatus)
98  {
99  if (statusUpdates[status.instanceName].timestampUSec < status.timestampUSec)
100  {
101  statusUpdates[status.instanceName] = status;
102  if (doMetaCall)
103  {
104  QMetaObject::invokeMethod(this, "updateContent", Qt::QueuedConnection);
105  }
106  }
107  }
108  }
109 
110  void NJointControllersWidget::add(const NJointControllerDescriptionWithStatus& ds)
111  {
112  if (!entries.count(ds.description.instanceName))
113  {
114  entries[ds.description.instanceName] = new NJointControllersWidgetEntry(*this, *(ui->treeWidget), ds.description);
115  }
116  entries.at(ds.description.instanceName)->update(ds.status);
117  }
118 
119  void NJointControllersWidget::onPushButtonStopAll_clicked()
120  {
121  if (robotUnit)
122  {
123  robotUnit->switchNJointControllerSetup({});
124  }
125  }
126 
127  void NJointControllersWidget::onPushButtonRemoveAll_clicked()
128  {
129  for (auto& pair : entries)
130  {
131  try
132  {
133  if (pair.second->deletable)
134  {
135  pair.second->deleteController();
136  }
137  }
138  catch (...)
139  {}
140  }
141  }
142 
144  {
146  std::unique_lock<std::recursive_timed_mutex> guard {mutex};
147  if (isResetting || !robotUnit || entries.count(name))
148  {
149  return;
150  }
151  ru = robotUnit;
152  guard.unlock();
153  auto data = ru->getNJointControllerDescriptionWithStatus(name);
154  guard.lock();
155  if (!entries.count(name))
156  {
157  controllersCreated[name] = std::move(data);
158  if (doMetaCall)
159  {
160  QMetaObject::invokeMethod(this, "updateContent", Qt::QueuedConnection);
161  }
162  }
163  }
164 
166  {
167  std::unique_lock<std::recursive_timed_mutex> guard {mutex};
168  controllersDeleted.emplace(name);
169  if (doMetaCall)
170  {
171  QMetaObject::invokeMethod(this, "updateContent", Qt::QueuedConnection);
172  }
173  }
174 
175  void NJointControllersWidget::loadSettings(QSettings* settings)
176  {
177  ui->treeWidget->setColumnWidth(idxName, settings->value("ctrlColWName", 400).toInt());
178  ui->treeWidget->setColumnWidth(idxClass, settings->value("ctrlColWClass", 200).toInt());
179  ui->treeWidget->setColumnWidth(idxCtrlDev, settings->value("ctrlColWCDen", 130).toInt());
180  ui->treeWidget->setColumnWidth(idxCtrlMode, settings->value("ctrlColWCMod", 150).toInt());
181  }
182 
183  void NJointControllersWidget::saveSettings(QSettings* settings)
184  {
185  settings->setValue("ctrlColWName", ui->treeWidget->columnWidth(idxName));
186  settings->setValue("ctrlColWClass", ui->treeWidget->columnWidth(idxClass));
187  settings->setValue("ctrlColWCDen", ui->treeWidget->columnWidth(idxCtrlDev));
188  settings->setValue("ctrlColWCMod", ui->treeWidget->columnWidth(idxCtrlMode));
189  }
190 
192  {
193  entries.clear();
194  controllersCreated.clear();
195  statusUpdates.clear();
196  controllersDeleted.clear();
197  }
198 
200  {
201  for (const auto& pair : controllersCreated)
202  {
203  add(pair.second);
204  }
205  controllersCreated.clear();
206  for (const auto& pair : statusUpdates)
207  {
208  const auto& name = pair.second.instanceName;
209  if (controllersDeleted.count(name))
210  {
211  continue;
212  }
213  auto it = entries.find(name);
214  if (it != entries.end())
215  {
216  it->second->update(pair.second);
217  }
218  else
219  {
220  NJointControllerDescriptionWithStatus stat;
221  stat.status = pair.second;
222  ARMARX_INFO << "loding description for the missing entry '" << name << "'";
223  stat.description = robotUnit->getNJointControllerDescription(name);
224  add(stat);
225  }
226  }
227  statusUpdates.clear();
228  for (const auto& name : controllersDeleted)
229  {
230  auto it = entries.find(name);
231  if (it != entries.end())
232  {
233  it->second->deleteContent();
234  it->second->deleteLater();
235  entries.erase(it);
236  }
237  }
238  controllersDeleted.clear();
239  }
240 
242  {
243  auto temp = robotUnit->getNJointControllerDescriptionsWithStatuses();
244  {
245  std::unique_lock<std::recursive_timed_mutex> guard {mutex};
246  for (NJointControllerDescriptionWithStatus& ds : temp)
247  {
248  controllersCreated[ds.description.instanceName] = std::move(ds);
249  }
250  }
251  }
252 
254  {
255  if (controllersCreated.empty())
256  {
257  return true;
258  }
259  add(controllersCreated.begin()->second);
260  controllersCreated.erase(controllersCreated.begin());
261  return false;
262  }
263 
264  NJointControllersWidgetEntry::NJointControllersWidgetEntry(NJointControllersWidget& parent, QTreeWidget& treeWidget, const NJointControllerDescription& desc)
265  :
266  QObject(&parent),
267  deletable {desc.deletable},
268  controller {desc.controller}
269  {
271  header = new QTreeWidgetItem;
272  treeWidget.addTopLevelItem(header);
273  header->setText(NJointControllersWidget::idxName, QString::fromStdString(desc.instanceName));
274  header->setText(NJointControllersWidget::idxClass, QString::fromStdString(desc.className));
275  header->setText(NJointControllersWidget::idxActive, "?");
276  header->setText(NJointControllersWidget::idxRequested, "?");
277  header->setText(NJointControllersWidget::idxError, "?");
278  header->setText(NJointControllersWidget::idxInternal, desc.internal ? "X" : " ");
279 
280  const std::size_t numDev = desc.controlModeAssignment.size();
281  const std::size_t numMod = getMapValues<StringStringDictionary, std::set>(desc.controlModeAssignment).size();
282  //device list
283  {
284  //buttons
285  QWidget* widgDev = new QWidget{&parent};
286  QWidget* widgMod = new QWidget{&parent};
287  treeWidget.setItemWidget(header, NJointControllersWidget::idxCtrlDev, widgDev);
288  treeWidget.setItemWidget(header, NJointControllersWidget::idxCtrlMode, widgMod);
289  QVBoxLayout* layDev = new QVBoxLayout;
290  QVBoxLayout* layMod = new QVBoxLayout;
291  layDev->setContentsMargins(0, 0, 0, 0);
292  layMod->setContentsMargins(0, 0, 0, 0);
293  widgDev->setLayout(layDev);
294  widgMod->setLayout(layMod);
295  boxDev = new QCheckBox{QString::number(numDev) + " Device" + (numDev > 1 ? QString{"s"}: QString{""})};
296  boxMod = new QCheckBox{QString::number(numMod) + " Mode" + (numMod > 1 ? QString{"s"}: QString{""})};
297  layDev->addWidget(boxDev);
298  layMod->addWidget(boxMod);
299  boxDev->setStyleSheet(checkboxStyleSheet());
300  boxMod->setStyleSheet(checkboxStyleSheet());
301  boxDev->setChecked(false);
302  boxMod->setChecked(false);
303  connect(boxDev, SIGNAL(clicked(bool)), this, SLOT(hideDeviceList()));
304  connect(boxMod, SIGNAL(clicked(bool)), this, SLOT(hideDeviceList()));
305  //list
306  devsToModes.reserve(desc.controlModeAssignment.size());
307  for (const auto& pair : desc.controlModeAssignment)
308  {
309  QTreeWidgetItem* child = new QTreeWidgetItem;
310  header->addChild(child);
311  child->setText(NJointControllersWidget::idxCtrlDev, QString::fromStdString(pair.first));
312  child->setText(NJointControllersWidget::idxCtrlMode, QString::fromStdString(pair.second));
313  devsToModes.emplace_back(child);
314  child->setHidden(true);
315  }
316  }
317  QPushButton* act = new QPushButton;
318  QPushButton* dec = new QPushButton;
319  act->setToolTip("Activate the Controller");
320  dec->setToolTip("Deactivate the Controller");
321  treeWidget.setItemWidget(header, NJointControllersWidget::idxActivate, act);
322  treeWidget.setItemWidget(header, NJointControllersWidget::idxDeactivate, dec);
323  act->setIcon(QIcon {QString{":/icons/media-playback-start.ico"}});
324  dec->setIcon(QIcon {QString{":/icons/media-playback-pause.ico"}});
325  act->setFixedWidth(40);
326  dec->setFixedWidth(40);
327  act->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
328  dec->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
329  connect(act, SIGNAL(clicked(bool)), this, SLOT(activateController()));
330  connect(dec, SIGNAL(clicked(bool)), this, SLOT(deactivateController()));
331  if (desc.deletable)
332  {
333  QPushButton* del = new QPushButton;
334  treeWidget.setItemWidget(header, NJointControllersWidget::idxDelete, del);
335  del->setToolTip("Delete the Controller");
336  del->setIcon(QIcon {QString{":/icons/Trash.svg"}});
337  del->setFixedWidth(40);
338  del->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
339  connect(del, SIGNAL(clicked(bool)), this, SLOT(deleteController()));
340  }
341 
342  //remote functions
343  {
344  for (const auto& descr : controller->getFunctionDescriptions())
345  {
346  new NJointControllersWidgetRemoteFunction {treeWidget, *header, descr.first, controller, descr.second}; //adds it self to the widget
347  }
348  }
349  }
350 
351  void NJointControllersWidgetEntry::update(const NJointControllerStatus& status)
352  {
353  header->setText(NJointControllersWidget::idxActive, status.active ? "X" : " ");
354  header->setText(NJointControllersWidget::idxRequested, status.requested ? "X" : " ");
355  header->setText(NJointControllersWidget::idxError, status.error ? "X" : " ");
356  auto acReqColor = (status.active != status.requested) ? red() : green();
357  header->setBackground(NJointControllersWidget::idxActive, {acReqColor});
358  header->setBackground(NJointControllersWidget::idxRequested, {acReqColor});
359  header->setBackground(NJointControllersWidget::idxError, {status.error ? red() : green()});
360  //name
361  header->setBackground(NJointControllersWidget::idxName, {status.error ? red() : acReqColor});
362  }
363 
364  bool NJointControllersWidgetEntry::matchName(const QString& name)
365  {
366  return header->text(NJointControllersWidget::idxName).contains(name, Qt::CaseInsensitive);
367  }
368 
370  {
371  return header->text(NJointControllersWidget::idxClass).contains(name, Qt::CaseInsensitive);
372  }
373 
375  {
376  return header->text(NJointControllersWidget::idxActive).contains(state, Qt::CaseInsensitive);
377  }
378 
380  {
381  return header->text(NJointControllersWidget::idxRequested).contains(state, Qt::CaseInsensitive);
382  }
383 
385  {
386  return header->text(NJointControllersWidget::idxError).contains(state, Qt::CaseInsensitive);
387  }
388 
390  {
391  for (const auto& elem : devsToModes)
392  {
393  if (elem->text(NJointControllersWidget::idxCtrlDev).contains(dev, Qt::CaseInsensitive))
394  {
395  return true;
396  }
397  }
398  return false;
399  }
400 
401  bool NJointControllersWidgetEntry::matchMode(const QString& mode)
402  {
403  for (const auto& elem : devsToModes)
404  {
405  if (elem->text(NJointControllersWidget::idxCtrlMode).contains(mode, Qt::CaseInsensitive))
406  {
407  return true;
408  }
409  }
410  return false;
411  }
412 
414  {
415  for (auto item : devsToModes)
416  {
417  delete item;
418  }
419  delete header;
420  }
421 
423  {
424  setDeviceListVisible(vis);
425  header->setHidden(!vis);
426  }
427 
428  void NJointControllersWidgetEntry::activateController()
429  {
431  controller->activateController();
432  }
433 
434  void NJointControllersWidgetEntry::deactivateController()
435  {
437  controller->deactivateController();
438  }
439 
440  void NJointControllersWidgetEntry::deleteController()
441  {
443  controller->deleteController();
444  }
445 
446  void NJointControllersWidgetEntry::hideDeviceList()
447  {
448  QCheckBox* box = dynamic_cast<QCheckBox*>(sender());
449  if (box)
450  {
451  bool checked = box->isChecked();
452  boxDev->setChecked(checked);
453  boxMod->setChecked(checked);
454  for (QTreeWidgetItem* dev : devsToModes)
455  {
456  dev->setHidden(!checked);
457  }
458  if (checked)
459  {
460  header->setExpanded(true);
461  }
462  }
463  }
464  void NJointControllersWidgetEntry::setDeviceListVisible(bool vis)
465  {
466  boxDev->setChecked(vis);
467  boxMod->setChecked(vis);
468  for (QTreeWidgetItem* dev : devsToModes)
469  {
470  dev->setHidden(!vis);
471  }
472  }
473 
475  QTreeWidget& treeWidget,
476  QTreeWidgetItem& header,
477  const std::string& name,
478  const NJointControllerInterfacePrx& ctrl,
480  ):
481  functionName {name},
482  ctrl {ctrl}
483  {
484  //tree widget item
485  {
486  setObjectName(QString::fromStdString(ctrl->getInstanceName() + "_" + name));
487  functionHeader = new QTreeWidgetItem;
488  header.addChild(functionHeader);
489  functionHeader->setFirstColumnSpanned(true);
490  treeWidget.setItemWidget(functionHeader, 0, this);
491 
492  QHBoxLayout* l = new QHBoxLayout;
493  setLayout(l);
494  l->setContentsMargins(0, 0, 0, 0);
495  //exec button
496  {
497  QPushButton* execute = new QPushButton;
498  execute->setIcon(QIcon {QString{":/icons/media-playback-start.ico"}});
499  execute->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
500  execute->setFixedWidth(40);
501  execute->setToolTip("Execute '" + QString::fromStdString(name) + "' function");
502  connect(execute, SIGNAL(clicked(bool)), this, SLOT(execFunction()));
503  l->addWidget(execute);
504  }
505  //param change box
506  execOnParamChange = new QCheckBox {"Call function on parameter changes"};
507  execOnParamChange->setToolTip("Execute '" + QString::fromStdString(name) + "' function whenever a parameter changes");
508  l->addWidget(execOnParamChange);
509  if (!w)
510  {
511  //this way we always have the correct horizontal spacing
512  execOnParamChange->setFixedHeight(0);
513  execOnParamChange->setSizePolicy(execOnParamChange->sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
514  }
515  //name
516  l->addWidget(new QLabel{"Remote function: " + QString::fromStdString(name)});
517  //spacer
518  l->addSpacerItem(new QSpacerItem{0, 0, QSizePolicy::Expanding});
519  }
520  //add widget as child
521  if (w)
522  {
523  QTreeWidgetItem* fnitem = new QTreeWidgetItem;
524  functionHeader->addChild(fnitem);
525  fnitem->setFirstColumnSpanned(true);
526  QWidget* container = new QWidget;
527  treeWidget.setItemWidget(fnitem, 0, container);
528  QHBoxLayout* compress = new QHBoxLayout;
529  compress->setContentsMargins(0, 0, 0, 0);
530  container->setLayout(compress);
531  //params
532  params = WidgetDescription::makeDescribedWidget(w, this);
533  paramValues = params->getVariants();
534  params->setContentsMargins(0, 0, 0, 0);
535  compress->addWidget(params);
536  //add spacer
537  compress->addItem(new QSpacerItem {0, 0, QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding});
538  }
539  }
540 
541  void NJointControllersWidgetRemoteFunction::execFunction()
542  {
543  if (paramValues.empty())
544  {
545  ARMARX_INFO << deactivateSpam(1, functionName) << "calling function " << functionName << " with no parameters\n";
546  }
547  else
548  {
549  std::stringstream ss;
550  ss << "calling function " << functionName << " with parameters:\n";
551  for (const auto& pair : paramValues)
552  {
553  if (pair.second)
554  {
555 
556  if (pair.second->data)
557  {
558  ss << " '" << pair.first << "' of type " << pair.second->data->ice_id() << "\n";
559  }
560  else
561  {
562  ss << " '" << pair.first << "' nullptr data \n";
563  }
564  }
565  else
566  {
567  ss << " '" << pair.first << "' nullptr\n";
568  }
569  }
570  ARMARX_INFO << deactivateSpam(1, functionName) << ss.str();
571  }
572  ctrl->callDescribedFunction(functionName, paramValues);
573  }
574 
576  {
577  paramValues[std::move(name)] = std::move(value);
578  if (execOnParamChange->isChecked())
579  {
580  execFunction();
581  }
582  }
583 }
armarx::NJointControllersWidgetRemoteFunction::valueChangedSlot
void valueChangedSlot(std::string name, VariantBasePtr value) override
Definition: NJointControllersWidget.cpp:575
armarx::checkboxStyleSheet
QString checkboxStyleSheet()
Definition: StyleSheets.h:30
armarx::NJointControllersWidget::idxRequested
static constexpr int idxRequested
Definition: NJointControllersWidget.h:88
armarx::NJointControllersWidgetEntry::matchMode
bool matchMode(const QString &mode)
Definition: NJointControllersWidget.cpp:401
armarx::NJointControllersWidgetEntry::isRequestedState
bool isRequestedState(const QString &state)
Definition: NJointControllersWidget.cpp:379
armarx::NJointControllersWidgetRemoteFunction::NJointControllersWidgetRemoteFunction
NJointControllersWidgetRemoteFunction(QTreeWidget &treeWidget, QTreeWidgetItem &header, const std::string &functionName, const NJointControllerInterfacePrx &ctrl, const WidgetDescription::WidgetPtr &w)
Definition: NJointControllersWidget.cpp:474
execute
Use of this software is granted under one of the following two to be chosen freely by the user Boost Software License Version Marcin Kalicinski Permission is hereby free of to any person or organization obtaining a copy of the software and accompanying documentation covered by this execute
Definition: license.txt:12
armarx::NJointControllersWidgetEntry::matchName
bool matchName(const QString &name)
Definition: NJointControllersWidget.cpp:364
armarx::NJointControllersWidgetEntry::setVisible
void setVisible(bool vis)
Definition: NJointControllersWidget.cpp:422
armarx::NJointControllersWidget::idxName
static constexpr int idxName
Definition: NJointControllersWidget.h:85
armarx::NJointControllersWidget::~NJointControllersWidget
~NJointControllersWidget() override
Definition: NJointControllersWidget.cpp:85
armarx::NJointControllersWidget::idxClass
static constexpr int idxClass
Definition: NJointControllersWidget.h:86
NJointControllersWidget.h
armarx::NJointControllersWidget::clearAll
void clearAll() override
Definition: NJointControllersWidget.cpp:191
armarx::RobotUnitWidgetTemplateBase< Ui::NJointControllersWidget >::ui
Ui::NJointControllersWidget * ui
Definition: RobotUnitWidgetBase.h:117
armarx::NJointControllersWidget
Definition: NJointControllersWidget.h:53
armarx::RobotUnitWidgetBase::doMetaCall
std::atomic_bool doMetaCall
Definition: RobotUnitWidgetBase.h:87
armarx::NJointControllersWidget::idxError
static constexpr int idxError
Definition: NJointControllersWidget.h:89
armarx::NJointControllersWidget::idxActive
static constexpr int idxActive
Definition: NJointControllersWidget.h:87
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::NJointControllersWidget::NJointControllersWidget
NJointControllersWidget(QWidget *parent=0)
Definition: NJointControllersWidget.cpp:29
armarx::NJointControllersWidget::loadSettings
void loadSettings(QSettings *settings) override
Definition: NJointControllersWidget.cpp:175
deactivateSpam
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
Definition: Logging.cpp:72
armarx::NJointControllersWidget::idxCtrlMode
static constexpr int idxCtrlMode
Definition: NJointControllersWidget.h:92
armarx::status
status
Definition: FiniteStateMachine.h:259
armarx::NJointControllersWidgetEntry::isActiveState
bool isActiveState(const QString &state)
Definition: NJointControllersWidget.cpp:374
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
armarx::NJointControllersWidgetEntry::matchDevice
bool matchDevice(const QString &dev)
Definition: NJointControllersWidget.cpp:389
armarx::RobotUnitWidgetBase::robotUnit
RobotUnitInterfacePrx robotUnit
Definition: RobotUnitWidgetBase.h:81
controller
Definition: AddOperation.h:39
armarx::NJointControllersWidget::nJointControllerDeleted
virtual void nJointControllerDeleted(std::string name)
Definition: NJointControllersWidget.cpp:165
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
armarx::NJointControllersWidget::addOneFromResetData
bool addOneFromResetData() override
Definition: NJointControllersWidget.cpp:253
armarx::RobotUnitWidgetBase::mutex
std::recursive_timed_mutex mutex
Definition: RobotUnitWidgetBase.h:82
armarx::NJointControllersWidget::idxCtrlDev
static constexpr int idxCtrlDev
Definition: NJointControllersWidget.h:91
armarx::NJointControllersWidget::idxDelete
static constexpr int idxDelete
Definition: NJointControllersWidget.h:95
armarx::RobotUnitWidgetTemplateBase
Definition: RobotUnitWidgetBase.h:93
armarx::NJointControllersWidget::saveSettings
void saveSettings(QSettings *settings) override
Definition: NJointControllersWidget.cpp:183
armarx::WidgetDescription::makeDescribedWidget
DescribedWidgetBase * makeDescribedWidget(const WidgetPtr &p, ValueChangedListenerInterface *listener)
Definition: WidgetDescription.cpp:742
armarx::NJointControllersWidgetEntry::matchClass
bool matchClass(const QString &name)
Definition: NJointControllersWidget.cpp:369
armarx::red
QColor red()
Definition: StyleSheets.h:76
armarx::NJointControllersWidgetEntry::NJointControllersWidgetEntry
NJointControllersWidgetEntry(NJointControllersWidget &parent, QTreeWidget &treeWidget, const NJointControllerDescription &desc)
Definition: NJointControllersWidget.cpp:264
ARMARX_CHECK_EXPRESSION
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
Definition: ExpressionException.h:73
armarx::NJointControllersWidgetEntry::isErrorState
bool isErrorState(const QString &state)
Definition: NJointControllersWidget.cpp:384
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::NJointControllersWidget::nJointControllerStatusChanged
void nJointControllerStatusChanged(const NJointControllerStatusSeq &allStatus)
Definition: NJointControllersWidget.cpp:90
armarx::NJointControllersWidgetEntry::update
void update(const NJointControllerStatus &status)
Definition: NJointControllersWidget.cpp:351
IceInternal::ProxyHandle<::IceProxy::armarx::RobotUnitInterface >
armarx::NJointControllersWidget::getResetData
void getResetData() override
Definition: NJointControllersWidget.cpp:241
armarx::RobotUnitWidgetBase::isResetting
std::atomic_bool isResetting
Definition: RobotUnitWidgetBase.h:86
armarx::NJointControllersWidget::doContentUpdate
void doContentUpdate() override
Definition: NJointControllersWidget.cpp:199
Logging.h
armarx::NJointControllersWidgetEntry
Definition: NJointControllersWidget.h:98
armarx::NJointControllersWidget::nJointControllerCreated
virtual void nJointControllerCreated(std::string name)
Definition: NJointControllersWidget.cpp:143
armarx::NJointControllersWidget::idxActivate
static constexpr int idxActivate
Definition: NJointControllersWidget.h:93
StyleSheets.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::NJointControllersWidget::idxInternal
static constexpr int idxInternal
Definition: NJointControllersWidget.h:90
armarx::NJointControllersWidget::idxDeactivate
static constexpr int idxDeactivate
Definition: NJointControllersWidget.h:94
armarx::NJointControllersWidgetEntry::deleteContent
void deleteContent()
Definition: NJointControllersWidget.cpp:413
armarx::green
QColor green()
Definition: StyleSheets.h:72