EventSenderConfig.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 ArmarX::GuiComponent::EventSender
17 * @author Mirko Waechter
18 * @copyright 2012 Mirko Waechter
19 * @license http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22 
23 #include "EventSenderConfig.h"
24 #include "StateParameterEditor.h"
25 #include <ArmarXGui/gui-plugins/StatechartEventSenderPlugin/ui_EventSenderConfig.h>
26 
27 
28 // ArmarX
36 
37 //Ice
38 #include <IceUtil/IceUtil.h>
39 
40 // Qt headers
41 #include <Qt>
42 #include <QtGlobal>
43 #include <QComboBox>
44 #include <QScrollArea>
45 #include <QPushButton>
46 #include <QTableWidget>
47 #include <QTableWidgetItem>
48 #include <QFile>
49 #include <QFileDialog>
50 #include <QMessageBox>
51 #include <QTableWidgetItem>
52 #include <QValidator>
53 #include <QTreeView>
54 
55 // System
56 #include <cstdio>
57 #include <string>
58 #include <cstring>
59 #include <cstdlib>
60 #include <iostream>
61 #include <cmath>
62 
63 
64 using namespace armarx;
65 
67 {
68  event = new Event(EVENTTOALL, "dummyEvent");
69 }
70 
71 
72 void EventSenderConfig::saveSettings(QSettings* settings)
73 {
74  settings->setValue("eventSenderName", eventSenderName);
75  settings->setValue("description", description);
76  settings->setValue("componentName", componentName);
77  settings->setValue("globalStateIdentifier", globalStateIdentifier.c_str());
78 
79  if (event)
80  {
81  settings->setValue("eventName", event->eventName.c_str());
82  settings->setValue("eventReceiverName", event->eventReceiverName.c_str());
83  settings->beginWriteArray("parameters");
84  StringVariantContainerBaseMap::const_iterator it = event->properties.begin();
85  int i = 0;
86 
87  for (; it != event->properties.end(); ++it, i++)
88  {
89  SingleVariantPtr sVar = SingleVariantPtr::dynamicCast(it->second);
90  settings->setArrayIndex(i);
91  settings->setValue("key", it->first.c_str());
92  settings->setValue("VariantTypeId", sVar->get()->getType());
93  settings->setValue("value", sVar->get()->getOutputValueOnly().c_str());
94  }
95 
96  settings->endArray();
97  }
98 
99 }
100 
101 void EventSenderConfig::loadSettings(QSettings* settings)
102 {
103  eventSenderName = settings->value("eventSenderName").toString();
104  description = settings->value("description").toString();
105  componentName = settings->value("componentName").toString();
106  event = new Event(settings->value("eventReceiverName").toString().toStdString(),
107  settings->value("eventName").toString().toStdString());
108  globalStateIdentifier = settings->value("globalStateIdentifier").toString().toStdString();
109  int size = settings->beginReadArray("parameters");
110 
111  for (int i = 0; i < size; ++i)
112  {
113  settings->setArrayIndex(i);
114  SingleVariantPtr sVar = new SingleVariant();
115  VariantPtr var = new Variant();
116  var->setType(settings->value("VariantTypeId").toInt());
117  QVariant data = settings->value("value");
118  VariantTypeId type = var->getType();
119 
120  if (type == VariantType::String)
121  {
122  var->setString(data.toString().toStdString());
123  }
124  else if (type == VariantType::Int)
125  {
126  var->setInt(data.toInt());
127  }
128  else if (type == VariantType::Long)
129  {
130  var->setLong(data.toLongLong());
131  }
132  else if (type == VariantType::Float)
133  {
134  var->setFloat(data.toFloat());
135  }
136  else if (type == VariantType::Double)
137  {
138  var->setDouble(data.toDouble());
139  }
140  else if (type == VariantType::Bool)
141  {
142  var->setBool(data.toBool());
143  }
144  else
145  {
146  throw exceptions::user::NotImplementedYetException("VariantParser");
147  }
148 
149  sVar->setVariant(var);
150  std::string key = settings->value("key").toString().toStdString();
151  event->properties[key] = sVar;
152  ARMARX_VERBOSE_S << "Reading parameter " << key << ": " << *sVar->get() << flush;
153  }
154 
155  settings->endArray();
156 }
157 
158 
160  ui(new Ui::EventSenderConfigDialog())
161 {
162  ui->setupUi(this);
163  setupUi();
164 }
165 
167 {
168  delete ui;
169  // ARMARX_INFO << "~EventSenderConfigDialog" << flush;
170 }
171 
172 
173 
174 
175 
177 {
178  switch (index)
179  {
180  default:
181  //cases not defined yet
182  break;
183  }
184 }
185 
186 
187 
188 
190 {
191  throw NotImplementedYetException("Sending event");
192  // QModelIndex index = treeBox->view()->currentIndex();
193  // if(treeBox->model()->itemData(index)[STATE_ITEM_TYPE] != StateItemModel::eInstanceStateItem){
194  // ARMARX_INFO << "You cannot send an event to this type of state! You can only send events to 'Requested Instances'." << flush;
195  // return;
196  // }
197 
198  // QVariant varStateId =getSelectedState();
199  // QVariant varComponentName =getSelectedComponentName();
200  // ARMARX_INFO << "event receiver: " << varComponentName.toString().toStdString() << ":" << varStateId.toString().toStdString() << flush;
201  // RemoteStateOffererInterfacePrx statePrx;
202  // EventPtr event = getSelectedEvent();
203  // if(!event)
204  // return;
205  // statePrx = getProxy<RemoteStateOffererInterfacePrx>(varComponentName.toString().toStdString());
206  // if(!statePrx){
207  // ARMARX_WARNING << "Proxy is NULL" << flush;
208  // return;
209  // }
210 
211  // statePrx->begin_issueEventWithGlobalIdStr(varStateId.toString().toStdString(), event);
212  // ARMARX_INFO << "sent event " << event->eventName << " to " << varComponentName.toString().toStdString() << flush;
213  // ARMARX_INFO << "event parameter count: " << event->properties.size() << flush;
214 }
215 
217 {
218  QString currentEventString = ui->CBEvent->currentText();
219  EventPtr event = new Event(EVENTTOALL, currentEventString.toStdString());
220  event->properties = ui->paramEditor->getStringValueMap();
221  // for(int row=0; row < ui->paramEditor->rowCount(); ++row)
222  // {
223 
224 
225  // if(!ui->paramEditor->item(row,0)){
226  // ArmarXWidgetController::showMessageBox("Please enter a key for the parameter with id #" + QString::number(row+1));
227  // return NULL;
228  // }
229  // std::string key = ui->paramEditor->item(row,0)->text().toStdString();
230  // QComboBox* CBvalueType = qobject_cast<QComboBox*>(ui->paramEditor->cellWidget(row,1));
231 
232  // if(!CBvalueType){
233  // ARMARX_WARNING << "CBvalueType pointer is NULL" << flush;
234  // continue;
235  // }
236  // int type = CBvalueType->itemData(CBvalueType->currentIndex()).toInt();
237  // QLineEdit* valueEdit = qobject_cast<QLineEdit*>(ui->paramEditor->cellWidget(row,2));
238 
239  // if( type == VariantType::Int)
240  // event->add(key, valueEdit->text().toInt());
241 
242  // else if( type == VariantType::Bool)
243  // if(valueEdit->text() == "true" || valueEdit->text() == "1")
244  // event->add(key, Variant(true));
245  // else
246  // event->add(key, Variant(false));
247 
248  // else if( type == VariantType::Float)
249  // event->add(key, valueEdit->text().toFloat());
250 
251  // else if( type == VariantType::String)
252  // event->add(key, valueEdit->text().toStdString());
253 
254  //// else if( type == VariantType::DataFieldIdentifier)
255  //// {
256  //// DataFieldIdentifierBasePtr id = new DataFieldIdentifier(valueEdit->text().toStdString());
257  //// event->add(key, id);
258 
259  //// }
260  //// else if( eLinkedPosition:
261  //// {
262  //// LinkedPosition pos(valueEdit->text().toStdString());
263  //// event->add(key, id);
264  //// break;
265  //// }
266  // else
267  // ARMARX_WARNING << "Datatype not implemented yet!" << flush;
268 
269  // }
270 
271 
272  return event;
273 }
274 
276 {
277  // EventSenderConfig config;
278  // // set test data
279  // config.componentName = "RobotStatechart";
280  // config.globalStateIdentifier = "RobotStatechart->RobotControl->Functional";
281  // config.event = new Event(EVENTTOALL, "EvLoadScenario");
282  // config.event->add("test", std::string("Visual"));
283 
284  ui->edtEventSenderName->setText(config.eventSenderName);
285  ui->edtDescription->setText(config.description);
286 
287  if (iceManager)
288  {
290  }
291 
292  ui->edtSelectedState->setText(config.globalStateIdentifier.c_str());
293  QModelIndex index = getRowOfItem(model, "", STATE_GLOBALSTATEID, QString(config.globalStateIdentifier.c_str()));
294 
295  if (index.isValid())
296  {
297  // we need to set the current index this way because QComboBox does
298  // not work well with hierarchical states
299  QModelIndex oldIndex = treeBox->rootModelIndex();
300  treeBox->setRootModelIndex(index.parent());
301  treeBox->setCurrentIndex(index.row());
302  treeBox->setRootModelIndex(oldIndex);
303  treeBox->view()->setCurrentIndex(index);
304 
305  stateSelected(-1); // update event list
306  }
307 
308  ui->CBEvent->setCurrentIndex(ui->CBEvent->findText(config.event->eventName.c_str())); // set correct event as selected
309 
310  // set parameters
311 
312  ui->paramEditor->setRowCount(0);
313  StringVariantContainerBaseMap::const_iterator it = config.event->properties.begin();
314 
315  for (; it != config.event->properties.end(); ++it)
316  {
317  SingleVariantPtr sVar = SingleVariantPtr::dynamicCast(it->second);
318  ui->paramEditor->addParameterRow(it->first.c_str(), QString::fromStdString(VariantContainerType::allTypesToString(sVar->getContainerType()))
319  , sVar->get()->getOutputValueOnly().c_str());
320  }
321 
322 
323 }
324 
325 const QModelIndex EventSenderConfigDialog::getRowOfItem(QStandardItemModel* model, QString searchString, int userDataRole, QVariant userData) const
326 {
327  QStandardItem* item = model->invisibleRootItem();
328  return getRowOfItem(item, searchString, userDataRole, userData);
329 }
330 
331 const QModelIndex EventSenderConfigDialog::getRowOfItem(QStandardItem* item, QString searchString, int userDataRole, QVariant userData) const
332 {
333  if (userDataRole == 0 && searchString.length() == 0)
334  {
335  throw LocalException("Either searchString or userDataRole must be given!");
336  }
337 
338  int i = -1;
339  QStandardItem* child;
340 
341  while (i++, child = item->child(i), child != NULL)
342  {
343  if (child->text() == ARMARXGUI_BASEINSTANCE_STR) // base instances are no valid event receivers
344  {
345  continue;
346  }
347 
348  if ((searchString.length() == 0 || child->text() == searchString)
349  && (userDataRole == 0 || child->data(userDataRole) == userData))
350  {
351  return child->index();
352  }
353 
354  QModelIndex result = getRowOfItem(child, searchString, userDataRole, userData);
355 
356  if (result.isValid())
357  {
358  return result;
359  }
360 
361  }
362 
363  return QModelIndex();
364 }
365 
366 
367 
369 {
370  this->iceManager = iceManager;
371 
372  if (iceManager)
373  {
374  ui->paramEditor->setCommunicator(iceManager->getCommunicator());
375  }
376 }
377 
378 QStringList EventSenderConfigDialog::getPossibleEvents(StateIceBasePtr state)
379 {
380  QStringList events;
381 
382  for (unsigned int i = 0; i < state->transitions.size(); i++)
383  {
384  TransitionIceBase& t = state->transitions[i];
385 
386  if (!events.contains(QString(t.evt->eventName.c_str())))
387  {
388  events.push_back(QString(t.evt->eventName.c_str()));
389  }
390  }
391 
392  return events;
393 }
394 
395 void EventSenderConfigDialog::setEventSender(QString first, QString second)
396 {
397  QSettings settings(first, second);
398  //ui->eventString->setText(settings.value("LineEdit").toString());
399  // for(int i = 0; i < settings.beginReadArray("ComboBox"); i++)
400  // {
401  // ui->eventComboBox->setItemText(i,settings.value("Event").toString());
402  // }
403  settings.endArray();
404  int rows = settings.beginReadArray("TableWidget");
405  ui->paramEditor->setRowCount(rows);
406 
407  for (int i = 0; i < rows; i++)
408  {
409  settings.setArrayIndex(i);
410  int columns = settings.beginReadArray("Column");
411  ui->paramEditor->setColumnCount(columns);
412 
413  for (int j = 0; j < columns; j++)
414  {
415  settings.setArrayIndex(j);
416 
417  if (j == 0)
418  {
419  ui->paramEditor->item(i, j)->setText(settings.value("Cell").toString());
420  }
421 
422  if (j == 1)
423  {
424  QComboBox* tempBox = new QComboBox;
425  int comboLength = settings.beginReadArray("ComboBox");
426 
427  for (int index = 0; index < comboLength; index++)
428  {
429  QString cell;
430  cell.setNum(index);
431  tempBox->insertItem(index, settings.value(cell).toString());
432  }
433 
434  ui->paramEditor->setCellWidget(i, j, tempBox);
435  // if(valueboxes.contains(tempBox->objectName()))
436  // {
437  // valueboxes.removeOne(tempBox->objectName);
438  // valueboxes.append(tempBox);
439  // }
440  settings.endArray();
441  }
442 
443  if (j == 2)
444  {
445  QLineEdit* tempEdit = new QLineEdit;
446  tempEdit->setText(settings.value("Cell").toString());
447  ui->paramEditor->setCellWidget(i, j, tempEdit);
448  }
449  }
450 
451  settings.endArray();
452  }
453 
454  settings.endArray();
455 }
456 
457 
458 
460 {
461  QSettings settings("armarx", "eventSender");
462  //settings.setValue("LineEdit", ui->eventString->text());
463  settings.beginWriteArray("ComboBox");
464  // for(int i = 0; i < ui->eventComboBox->count(); i++)
465  // {
466  // settings.setValue("Event", ui->eventComboBox->itemText(i));
467  // }
468  settings.endArray();
469  settings.beginWriteArray("TableWidget");
470 
471  for (int i = 0; i < ui->paramEditor->rowCount(); i++)
472  {
473  settings.setArrayIndex(i);
474  settings.beginWriteArray("Column");
475 
476  for (int j = 0; j < ui->paramEditor->columnCount(); j++)
477  {
478  settings.setArrayIndex(j);
479 
480  if (j == 0)
481  {
482  settings.setValue("Cell", ui->paramEditor->item(i, j)->text());
483  }
484 
485  if (j == 1)
486  {
487  QComboBox* tempBox = qobject_cast<QComboBox*>(ui->paramEditor->cellWidget(i, j));
488  settings.beginWriteArray("ComboBox");
489 
490  for (int index = 0; index < tempBox->count(); index++)
491  {
492  settings.setArrayIndex(index);
493  QString cell;
494  cell.setNum(index);
495  settings.setValue(cell, tempBox->itemText(index));
496  }
497 
498  settings.endArray();
499  }
500 
501  if (j == 2)
502  {
503  QLineEdit* tempEdit = qobject_cast<QLineEdit*>(ui->paramEditor->cellWidget(i, j));
504  settings.setValue("Cell", tempEdit->text());
505  }
506 
507  }
508 
509  settings.endArray();
510  }
511 
512  settings.endArray();
513 }
514 
516 {
517  ARMARX_VERBOSE << "Updating State tree" << flush;
518  std::vector<StateIceBasePtr> baseStateList;
519  std::vector<StateIceBasePtr> instanceStateList;
520  std::string stateSearchMask = ui->edtStateSearchMask->text().toStdString();
521  std::vector<std::string> remoteStateOffererList = iceManager->getIceGridSession()->getRegisteredObjectNames<RemoteStateOffererInterfacePrx>(stateSearchMask);
522  // RemoteStateOffererInterface::ice_staticId()
523  QStringList componentNames;// = ui->EDTComponentName->text().split(';');
524 
525  for (unsigned int i = 0; i < remoteStateOffererList.size(); ++i)
526  {
527  componentNames << QString::fromStdString(remoteStateOffererList.at(i));
528  }
529 
530  if (componentNames.size() == 0)
531  {
532  ARMARX_INFO << "No RemoteStateOfferer found.";
533  return;
534  }
535 
536  foreach (QString componentNameQStr, componentNames)
537  {
538  std::string componentName = componentNameQStr.trimmed().toStdString();
539 
540  try
541  {
542  getTopLevelStates(componentName, baseStateList, instanceStateList);
543  model->updateModel(componentName, baseStateList, instanceStateList);
544  }
545  catch (Ice::NotRegisteredException& e)
546  {
547  ARMARX_WARNING << "The entered component with name '" << componentName << "' was not found - maybe you forgot to start it?" << flush;
548  }
549  catch (IceUtil::NullHandleException& e)
550  {
551  ARMARX_ERROR << "IceUtil::NullHandleException: " << e.what() << "\nFile: " << e. ice_file() << e.ice_line() << "\nBacktrace:\n" << e.ice_stackTrace() << flush;
552  }
553  catch (armarx::UserException& e)
554  {
555  ARMARX_WARNING << "Found component but cannot communicate with component - probably it is a component of another type\nreason: " << e.reason << flush;
556  }
557  }
558 }
559 
560 
561 
562 void
563 EventSenderConfigDialog::getTopLevelStates(std::string componentName, std::vector<StateIceBasePtr>& baseStateList, std::vector<StateIceBasePtr>& instanceStateList)
564 {
565  RemoteStateOffererInterfacePrx statePrx;
566  statePrx = iceManager->getProxy< armarx::RemoteStateOffererInterfacePrx >(componentName);
567 
568  if (!statePrx)
569  {
570  ARMARX_WARNING << "Proxy is NULL" << flush;
571  return;
572  }
573 
574  Ice::StringSeq availableStates = statePrx->getAvailableStates();
575  baseStateList.clear();
576 
577  for (unsigned int i = 0; i < availableStates.size(); ++i)
578  {
579  baseStateList.push_back(statePrx->getStatechart(availableStates[i]));
580  }
581 
582  StateIdNameMap availableStateInstances = statePrx->getAvailableStateInstances();
583  instanceStateList.clear();
584  StateIdNameMap::iterator it = availableStateInstances.begin();
585 
586  for (; it != availableStateInstances.end(); ++it)
587  {
588  instanceStateList.push_back(statePrx->getStatechartInstance(it->first));
589  }
590 
591 }
592 
594 {
595  //send event
596  QModelIndex modelIndex = treeBox->view()->currentIndex();
597  // ARMARX_LOG << "row : " << modelIndex.row() << flush;
598  std::string globalStateId = treeBox->model()->itemData(modelIndex)[STATE_GLOBALSTATEID].toString().toStdString();
599  std::string componentName = treeBox->model()->itemData(modelIndex)[STATE_COMPONENT_NAME].toString().toStdString();
600 
601  // ARMARX_WARNING<< "State selection changed to "<< globalStateId << flush;
602  if (treeBox->model()->itemData(modelIndex)[STATE_ITEM_TYPE] != StateItemModel::eInstanceStateItem)
603  {
604  ui->CBEvent->clear();
605  ui->edtSelectedState->setText("");
606  return;
607  }
608 
609  StateIceBasePtr statePtr = model->getState(componentName, globalStateId);
610 
611  if (!statePtr)
612  {
613  ARMARX_WARNING << "Could not find state with id " << globalStateId << " of component '" << componentName << "'" << flush;
614  return;
615  }
616 
617  ui->edtSelectedState->setText(globalStateId.c_str());
618  ui->CBEvent->clear();
619  QStringList eventList = getPossibleEvents(statePtr);
620  ui->CBEvent->addItems(eventList);
621 
622 
623 }
624 
626 {
627  QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
628  QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
629 
630  model = new StateItemModel();
631  treeBox = new TreeBox(model, true, this);
632  ui->gridLayout->addWidget(treeBox, 3, 4, 1, 1);
633  ui->paramEditor->setColumnHidden(StateParameterEditor::eOptional, true);
634  ui->paramEditor->setColumnHidden(StateParameterEditor::eProvideDefaultValue, true);
635  ui->paramEditor->setDefaultValueState(Qt::Checked);
636  // ui->paramEditor = new StateParameterEditor(ui->groupBox);
637  // ui->verticalLayout->addWidget(ui->paramEditor);
638 
639  // addParameterRow();
640  // addParameterRow();
641  // if(ui->paramEditor->rowCount() < 2)
642  // return;
643  // if(!ui->paramEditor->item(0,0))
644  // return;
645  // ui->paramEditor->item(0,0)->setText("proxyName");
646  // ui->paramEditor->item(1,0)->setText("stateName");
647  // qobject_cast<QLineEdit*>(ui->paramEditor->cellWidget(0,2))->setText("VisualServoingExample");
648  // qobject_cast<QLineEdit*>(ui->paramEditor->cellWidget(1,2))->setText("VisualServoingExample");
649 
650  // QComboBox* cbox = qobject_cast<QComboBox*>(ui->paramEditor->cellWidget(0, 1));
651  // cbox->setCurrentIndex(8);
652  // cbox = qobject_cast<QComboBox*>(ui->paramEditor->cellWidget(1, 1));
653  // cbox->setCurrentIndex(8);
654 
655 
656 
657  // setup eventsender slots
658  connect(ui->addRowButton, SIGNAL(clicked()), ui->paramEditor, SLOT(addParameterRow()));
659  connect(ui->sendButton, SIGNAL(clicked()), this, SLOT(send()));
660 
661  connect(ui->actionSaveAs, SIGNAL(triggered()), this, SLOT(saveEventSender()));
662  connect(ui->BTNUpdateTreeView, SIGNAL(clicked()), this, SLOT(populateStateTreeList()));
663  connect(treeBox, SIGNAL(currentIndexChanged(int)), this, SLOT(stateSelected(int)));
664  ui->buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);
666 }
667 
669 {
670  QModelIndex index = treeBox->view()->currentIndex();
671  return treeBox->model()->itemData(index)[STATE_COMPONENT_NAME].toString();
672 }
673 
675 {
676  QModelIndex index = treeBox->view()->currentIndex();
677  return treeBox->model()->itemData(index)[STATE_GLOBALSTATEID].toString();
678 }
679 
680 
681 
682 
armarx::EventSenderConfigDialog::setupUi
void setupUi()
Definition: EventSenderConfig.cpp:625
armarx::Variant
The Variant class is described here: Variants.
Definition: Variant.h:224
ARMARX_VERBOSE
#define ARMARX_VERBOSE
Definition: Logging.h:180
armarx::StateParameterEditor::eOptional
@ eOptional
Definition: StateParameterEditor.h:49
armarx::EventSenderConfigDialog::ui
Ui::EventSenderConfigDialog * ui
Definition: EventSenderConfig.h:96
armarx::VariantType::Float
const VariantTypeId Float
Definition: Variant.h:918
armarx::EventSenderConfig::loadSettings
void loadSettings(QSettings *settings)
Definition: EventSenderConfig.cpp:101
armarx::EventSenderConfig::componentName
QString componentName
Definition: EventSenderConfig.h:56
index
uint8_t index
Definition: EtherCATFrame.h:59
STATE_COMPONENT_NAME
#define STATE_COMPONENT_NAME
Definition: StateItemModel.h:38
armarx::EventSenderConfigDialog::getRowOfItem
const QModelIndex getRowOfItem(QStandardItemModel *model, QString searchString, int userDataRole=0, QVariant userData=QVariant()) const
Definition: EventSenderConfig.cpp:325
armarx::EventSenderConfigDialog::saveEventSender
void saveEventSender()
Definition: EventSenderConfig.cpp:459
armarx::EventSenderConfig::eventSenderName
QString eventSenderName
Definition: EventSenderConfig.h:54
armarx::EventSenderConfig::saveSettings
void saveSettings(QSettings *settings)
Definition: EventSenderConfig.cpp:72
STATE_GLOBALSTATEID
#define STATE_GLOBALSTATEID
Definition: StateItemModel.h:41
armarx::StateItemModel
Definition: StateItemModel.h:50
armarx::StateItemModel::updateModel
void updateModel(const std::string &componentName, const std::vector< StateIceBasePtr > &topLevelBaseStates, const std::vector< StateIceBasePtr > &topLevelRequestedStates)
Definition: StateItemModel.cpp:38
armarx::VariantType::Bool
const VariantTypeId Bool
Definition: Variant.h:915
armarx::EventSenderConfigDialog::EventSenderConfigDialog
EventSenderConfigDialog(QWidget *parent=0)
Definition: EventSenderConfig.cpp:159
armarx::EventSenderConfig
Definition: EventSenderConfig.h:52
armarx::EventSenderConfigDialog::setIceManager
void setIceManager(IceManagerPtr iceManager)
Definition: EventSenderConfig.cpp:368
Statechart.h
StatechartObjectFactories.h
armarx::EventSenderConfigDialog::stateSelected
void stateSelected(int index)
Definition: EventSenderConfig.cpp:593
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::VariantType::Double
const VariantTypeId Double
Definition: Variant.h:919
ObserverObjectFactories.h
armarx::Event
An Event is used to communicate between e.g. condition handlers and statecharts.
Definition: Event.h:52
Ui
ArmarX Headers.
Definition: ArmarXMainWindow.h:54
armarx::EventSenderConfigDialog::~EventSenderConfigDialog
~EventSenderConfigDialog() override
Definition: EventSenderConfig.cpp:166
armarx::EventSenderConfigDialog::send
void send()
Definition: EventSenderConfig.cpp:189
armarx::SingleVariant
The SingleVariant class is required to store single Variant instances in VariantContainer subclasses.
Definition: VariantContainer.h:109
armarx::EventSenderConfig::globalStateIdentifier
std::string globalStateIdentifier
Definition: EventSenderConfig.h:58
armarx::flush
const LogSender::manipulator flush
Definition: LogSender.h:251
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
ARMARXGUI_BASEINSTANCE_STR
#define ARMARXGUI_BASEINSTANCE_STR
Definition: StateItemModel.h:43
armarx::VariantType::Long
const VariantTypeId Long
Definition: Variant.h:917
TreeBox
Definition: TreeBox.h:44
armarx::EventSenderConfigDialog::getSelectedState
QString getSelectedState()
Definition: EventSenderConfig.cpp:674
NotImplementedYetException.h
IceGridAdmin.h
armarx::EventSenderConfig::event
EventPtr event
Definition: EventSenderConfig.h:57
ARMARX_ERROR
#define ARMARX_ERROR
Definition: Logging.h:189
armarx::VariantTypeId
Ice::Int VariantTypeId
Definition: Variant.h:44
armarx::EventSenderConfigDialog
Definition: EventSenderConfig.h:86
armarx::StateParameterEditor::eProvideDefaultValue
@ eProvideDefaultValue
Definition: StateParameterEditor.h:50
armarx::EventSenderConfig::description
QString description
Definition: EventSenderConfig.h:55
CoreObjectFactories.h
ArmarXWidgetController.h
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::StateItemModel::eInstanceStateItem
@ eInstanceStateItem
Definition: StateItemModel.h:63
armarx::EventSenderConfigDialog::setEventSender
void setEventSender(QString first, QString second)
Definition: EventSenderConfig.cpp:395
IceUtil::Handle< IceManager >
armarx::StateItemModel::getState
StateIceBasePtr getState(std::string componentName, const std::string &globalStateIdStr)
Definition: StateItemModel.cpp:63
armarx::EventSenderConfig::EventSenderConfig
EventSenderConfig()
Definition: EventSenderConfig.cpp:66
armarx::exceptions::user::NotImplementedYetException
Throw this exception to indicate missing functionality.
Definition: NotImplementedYetException.h:39
StateParameterEditor.h
armarx::EventSenderConfigDialog::populateStateTreeList
void populateStateTreeList()
Definition: EventSenderConfig.cpp:515
armarx::VariantType::Int
const VariantTypeId Int
Definition: Variant.h:916
ARMARX_VERBOSE_S
#define ARMARX_VERBOSE_S
Definition: Logging.h:200
armarx::EventSenderConfigDialog::getPossibleEvents
QStringList getPossibleEvents(StateIceBasePtr state)
Definition: EventSenderConfig.cpp:378
EventSenderConfig.h
armarx::EventSenderConfigDialog::eventBox
void eventBox(int index)
Definition: EventSenderConfig.cpp:176
armarx::EventSenderConfigDialog::getTopLevelStates
void getTopLevelStates(std::string componentName, std::vector< StateIceBasePtr > &baseStateList, std::vector< StateIceBasePtr > &instanceStateList)
Definition: EventSenderConfig.cpp:563
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
armarx::VariantType::String
const VariantTypeId String
Definition: Variant.h:920
STATE_ITEM_TYPE
#define STATE_ITEM_TYPE
Definition: StateItemModel.h:36
armarx::EventSenderConfigDialog::setConfig
void setConfig(const EventSenderConfig &config)
Definition: EventSenderConfig.cpp:275
armarx::EventSenderConfigDialog::getSelectedEvent
EventPtr getSelectedEvent()
Definition: EventSenderConfig.cpp:216
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
EVENTTOALL
#define EVENTTOALL
Definition: StateBase.h:42
armarx::VariantContainerType::allTypesToString
static std::string allTypesToString(const ContainerTypePtr &type)
Definition: VariantContainer.cpp:232
armarx::EventSenderConfigDialog::getSelectedComponentName
QString getSelectedComponentName()
Definition: EventSenderConfig.cpp:668