25 #include <QPushButton>
26 #include <QToolButton>
30 #include <QApplication>
39 qRegisterMetaType<VariantPtr>(
"VariantPtr");
40 plotter->setIceManager(iceManager);
41 this->variant = variant;
42 this->dataFieldIdentifier = dataFieldIdentifier;
43 this->description = description;
71 return dataFieldIdentifier->getDataFieldIdentifier();
94 QClipboard* clipboard = QApplication::clipboard();
105 void DataFieldPropertiesWidget::createUi()
109 addProperty(
"Identifier", dataFieldIdentifier->getDataFieldIdentifier()->getIdentifierStr().c_str());
113 addProperty(
"Type", variant->getTypeName().c_str());
126 plotter->
setSelectedDatafields(QStringList(QString::fromStdString(dataFieldIdentifier->getDataFieldIdentifier()->getIdentifierStr())), 100);
129 QToolBar* bar =
new QToolBar();
130 bar->setIconSize(QSize(16, 16));
131 QAction* refreshButton =
new QAction(bar);
132 refreshButton->setIcon(QIcon(
":/icons/view-refresh-7.png"));
133 refreshButton->setCheckable(
true);
134 refreshButton->setToolTip(
"Refresh value continuously");
135 refreshButton->setChecked(
true);
136 connect(refreshButton, SIGNAL(toggled(
bool)),
this, SLOT(
toggleAutoRefresh(
bool)));
137 bar->addAction(refreshButton);
139 QAction* copyButton =
new QAction(
"Copy", bar);
140 copyButton->setToolTip(
"Copy value to clipboard");
141 copyButton->setIcon(QIcon(
":/icons/edit-copy-4.svg"));
144 bar->addAction(copyButton);
152 variant = dataFieldIdentifier->getDataField();
155 QMetaObject::invokeMethod(variantWidget,
"setValue", Q_ARG(
VariantPtr, variant));
160 QString dateString = tvar->getInitialized() ?
161 QString::fromStdString(simestampStr) :
164 QMetaObject::invokeMethod(
this,
"setProperty", Q_ARG(QString,
"Timestamp"), Q_ARG(QString, dateString));
171 ARMARX_INFO <<
deactivateSpam(10) <<
"Failed to get current value for datafield " << dataFieldIdentifier->getDataFieldIdentifier() <<
" - Is the Observer still running?";