MCPcopy Create free account
hub / github.com/KDE/labplot / willUpdateTypeChanged

Method willUpdateTypeChanged

src/frontend/dockwidgets/LiveDataDock.cpp:611–623  ·  view source on GitHub ↗

! *\brief called when the selected update type for the will message is changed in the will settings widget * sets the will update type for the m_mqttClient * * \param type the selected will update type */

Source from the content-addressed store, hash-verified

609 * \param type the selected will update type
610 */
611void LiveDataDock::willUpdateTypeChanged(int updateType) {
612 m_mqttClient->setWillUpdateType(static_cast<MQTTClient::WillUpdateType>(updateType));
613
614 if (updateType == static_cast<int>(MQTTClient::WillUpdateType::TimePeriod)) {
615 ui.bWillUpdateNow->hide();
616 m_mqttClient->startWillTimer();
617 } else if (updateType == static_cast<int>(MQTTClient::WillUpdateType::OnClick)) {
618 ui.bWillUpdateNow->show();
619
620 // if update type is on click we stop the will timer
621 m_mqttClient->stopWillTimer();
622 }
623}
624
625/*!
626 *\brief called when the will update now button is pressed

Callers

nothing calls this directly

Calls 4

setWillUpdateTypeMethod · 0.80
startWillTimerMethod · 0.80
showMethod · 0.80
stopWillTimerMethod · 0.80

Tested by

no test coverage detected