11 #include "ui_settingstextmessageinlinecomponent.h"
16 using namespace swift::gui::settings;
21 CSettingsTextMessageInlineComponent::CSettingsTextMessageInlineComponent(QWidget *parent)
25 connect(ui->cb_All, &QCheckBox::released,
this, &CSettingsTextMessageInlineComponent::changeSettings);
26 connect(ui->cb_Frequency, &QCheckBox::released,
this, &CSettingsTextMessageInlineComponent::changeSettings);
27 connect(ui->cb_Private, &QCheckBox::released,
this, &CSettingsTextMessageInlineComponent::changeSettings);
28 connect(ui->cb_Supervisor, &QCheckBox::released,
this, &CSettingsTextMessageInlineComponent::changeSettings);
29 connect(ui->cb_Focus, &QCheckBox::released,
this, &CSettingsTextMessageInlineComponent::changeSettings);
30 connect(ui->pb_Disable, &QPushButton::released,
this,
31 &CSettingsTextMessageInlineComponent::disableAllOverlayMessages);
32 connect(ui->pb_Reset, &QPushButton::released,
this, &CSettingsTextMessageInlineComponent::resetOverlayMessages);
34 this->settingsChanged();
39 void CSettingsTextMessageInlineComponent::settingsChanged()
42 ui->cb_All->setChecked(s.getPopupAllMessages());
43 ui->cb_Supervisor->setChecked(s.getPopupSupervisorMessages());
44 ui->cb_Frequency->setChecked(s.getPopupFrequencyMessages());
45 ui->cb_Private->setChecked(s.getPopupPrivateMessages());
46 ui->cb_Selcal->setChecked(s.getPopupSelcalMessages());
47 ui->cb_Focus->setChecked(s.focusOverlayWindow());
50 void CSettingsTextMessageInlineComponent::changeSettings()
53 s.setPopupAllMessages(ui->cb_All->isChecked());
54 s.setPopupFrequencyMessages(ui->cb_Frequency->isChecked());
55 s.setPopupPrivateMessages(ui->cb_Private->isChecked());
56 s.setSupervisorMessages(ui->cb_Supervisor->isChecked());
57 s.setPopupSelcalMessages(ui->cb_Selcal->isChecked());
58 s.setFocusOverlayWindows(ui->cb_Focus->isChecked());
60 CLogMessage::preformatted(m);
63 void CSettingsTextMessageInlineComponent::disableAllOverlayMessages()
68 CLogMessage::preformatted(m);
70 QPointer<CSettingsTextMessageInlineComponent> myself(
this);
72 if (myself) { myself->settingsChanged(); }
76 void CSettingsTextMessageInlineComponent::resetOverlayMessages()
80 CLogMessage::preformatted(m);
82 QPointer<CSettingsTextMessageInlineComponent> myself(
this);
84 if (myself) { myself->settingsChanged(); }
Settings for text messages.
virtual ~CSettingsTextMessageInlineComponent()
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.
Streamable status message, e.g.
High level reusable GUI components.
Free functions in swift::misc.
auto singleShot(int msec, QObject *target, F &&task)
Starts a single-shot timer which will call a task in the thread of the given object when it times out...