! *\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 */
| 609 | * \param type the selected will update type |
| 610 | */ |
| 611 | void 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 |
nothing calls this directly
no test coverage detected