40 DEFAULT_SETTINGS_PLUGIN_NAME(
"PresenterViewWidgetGuiPlugin"),
41 DEFAULT_SETTINGS_CUSTOM_TEXT(
"custom text")
46 this->updateTimer =
new QTimer(
this);
48 this->updateTimer->start(50);
52 this->statusIndicationLabel->setTextWithScaling(
"testestset");
55 QLayout* existingLayout =
getWidget()->layout();
57 existingLayout->addWidget(this->statusIndicationLabel);
68 settings->value(
"demoStateProxyName", QString::fromStdString(demoStateProxyName))
78 settings->setValue(
"demoStateProxyName", QString::fromStdString(demoStateProxyName));
96 getProxy(demoStateManagerPrx, demoStateProxyName);
98 stopCheckStateTask.store(
false);
99 checkStateTask = std::thread([&] {
checkState(); });
115 while (not stopCheckStateTask.load())
120 auto stateAndSeverity = this->demoStateManagerPrx->getStateAndSeverity();
124 static_cast<int>(stateAndSeverity.severity));
126 catch (Ice::Exception
const&)
132 metronome.waitForNextTick();
140 std::string color = mapColor(
static_cast<armarx::severity::SeverityEnum
>(severity));
146 QString styleSheet2 = QString(
"color: %1;").arg(QString::fromStdString(color));
147 this->statusIndicationLabel->setTextWithScaling(state);
148 this->statusIndicationLabel->setStyleSheet(styleSheet2);
158 double elapsedMilliSeconds = elapsedMs;
159 if (elapsedMilliSeconds > 250)
161 QString styleSheet2 = QString(
"color: grey;");
162 this->statusIndicationLabel->setStyleSheet(styleSheet2);
167 PresenterViewWidgetController::mapColor(severity::SeverityEnum severity)
172 case severity::SeverityEnum::normal:
175 case severity::SeverityEnum::warning:
178 case severity::SeverityEnum::error:
181 case severity::SeverityEnum::fatal:
193 stopCheckStateTask.store(
true);
194 checkStateTask.join();
209 if (not m_config_dialog)
213 {
"DemoStateManager",
"Demo State Manager",
"*"});
215 return qobject_cast<QDialog*>(m_config_dialog);
225 demoStateProxyName = m_config_dialog->getProxyName(
"DemoStateManager");
SpamFilterDataPtr deactivateSpam(SpamFilterDataPtr const &spamFilter, float deactivationDurationSec, const std::string &identifier, bool deactivate)
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
A config-dialog containing one (or multiple) proxy finders.
void addProxyFinder(const std::vector< EntryData > &entryData)
static Frequency Hertz(std::int64_t hertz)
Simple rate limiter for use in loops to maintain a certain frequency given a clock.
#define ARMARX_INFO
The normal logging level.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
This file offers overloads of toIce() and fromIce() functions for STL container types.
const LogSender::manipulator flush