26 #include <QApplication>
29 #include <QPushButton>
31 #include <QToolButton>
47 qRegisterMetaType<VariantPtr>(
"VariantPtr");
48 plotter->setIceManager(iceManager);
49 this->variant = variant;
50 this->dataFieldIdentifier = dataFieldIdentifier;
51 this->description = description;
82 return dataFieldIdentifier->getDataFieldIdentifier();
108 QClipboard* clipboard = QApplication::clipboard();
120 DataFieldPropertiesWidget::createUi()
125 dataFieldIdentifier->getDataFieldIdentifier()->getIdentifierStr().c_str());
129 addProperty(
"Type", variant->getTypeName().c_str());
134 tvar->getTime().toDateTime() +
" (" +
146 QStringList(QString::fromStdString(
147 dataFieldIdentifier->getDataFieldIdentifier()->getIdentifierStr())),
151 QToolBar* bar =
new QToolBar();
152 bar->setIconSize(QSize(16, 16));
153 QAction* refreshButton =
new QAction(bar);
154 refreshButton->setIcon(QIcon(
":/icons/view-refresh-7.png"));
155 refreshButton->setCheckable(
true);
156 refreshButton->setToolTip(
"Refresh value continuously");
157 refreshButton->setChecked(
true);
158 connect(refreshButton, SIGNAL(toggled(
bool)),
this, SLOT(
toggleAutoRefresh(
bool)));
159 bar->addAction(refreshButton);
161 QAction* copyButton =
new QAction(
"Copy", bar);
162 copyButton->setToolTip(
"Copy value to clipboard");
163 copyButton->setIcon(QIcon(
":/icons/edit-copy-4.svg"));
166 bar->addAction(copyButton);
175 variant = dataFieldIdentifier->getDataField();
178 QMetaObject::invokeMethod(
179 variantWidget,
"setValue", Q_ARG(
VariantPtr, variant));
184 tvar->getTime().toDateTime() +
" (" +
187 QString dateString = tvar->getInitialized()
188 ? QString::fromStdString(simestampStr)
191 QMetaObject::invokeMethod(
this,
193 Q_ARG(QString,
"Timestamp"),
194 Q_ARG(QString, dateString));
201 << dataFieldIdentifier->getDataFieldIdentifier()
202 <<
" - Is the Observer still running?";