6 #include "ui_settingssimulatormessagescomponent.h"
11 using namespace swift::misc::simulation;
12 using namespace swift::misc::simulation::settings;
16 CSettingsSimulatorMessagesComponent::CSettingsSimulatorMessagesComponent(QWidget *parent)
20 connect(ui->pb_Save, &QPushButton::clicked,
this, &CSettingsSimulatorMessagesComponent::save,
21 Qt::QueuedConnection);
22 connect(ui->pb_Cancel, &QPushButton::clicked,
this, &CSettingsSimulatorMessagesComponent::load,
23 Qt::QueuedConnection);
30 void CSettingsSimulatorMessagesComponent::save()
36 else if (ui->rb_ErrorsAndWarnings->isChecked())
40 else if (ui->rb_ErrorWarningsInfo->isChecked())
46 CSimulatorMessagesSettings::TextMessageType mt = CSimulatorMessagesSettings::NoTextMessages;
48 if (ui->cb_PrivateMessages->isChecked()) { mt |= CSimulatorMessagesSettings::TextMessagePrivate; }
49 if (ui->cb_SupervisorMessages->isChecked()) { mt |= CSimulatorMessagesSettings::TextMessageSupervisor; }
50 if (ui->cb_Com1->isChecked()) { mt |= CSimulatorMessagesSettings::TextMessagesCom1; }
51 if (ui->cb_Com2->isChecked()) { mt |= CSimulatorMessagesSettings::TextMessagesCom2; };
58 void CSettingsSimulatorMessagesComponent::load()
Configure what messages are sent to simulator.
virtual ~CSettingsSimulatorMessagesComponent()
Destructor.
CStatusMessage setAndSave(const T &value, qint64 timestamp=0)
Write and save in the same step. Must be called from the thread in which the owner lives.
T get() const
Get a copy of the current value.
Settings regarding message handling. Driver independent part, related to network.
void disableTechnicalMessages()
No technical messages.
bool isRelayErrorsMessages() const
Relay (technical) error messages.
void setRelayGloballyEnabled(bool enabled)
Globally enable / disable.
bool isRelayWarningMessages() const
Relay (technical) warning messages.
bool isRelayTechnicalMessages() const
Relay any message.
bool isRelayCom1TextMessages() const
Relay COM1 text message.
bool isRelayInfoMessages() const
Relay (technical) info messages.
bool isRelayCom2TextMessages() const
Relay COM2 text message.
bool isRelayPrivateTextMessages() const
Relay private messages.
bool isRelaySupervisorTextMessages() const
Relay supervisor messages.
bool isRelayGloballyEnabled() const
Globally enabled?
void setTechnicalLogSeverity(CStatusMessage::StatusSeverity severity)
Log severity.
void setRelayTextMessages(CSimulatorMessagesSettings::TextMessageType messageType)
Relay the following message types.
High level reusable GUI components.
Free functions in swift::misc.