mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 08:36:52 +08:00
Overlay text message focus setting
This commit is contained in:
@@ -23,11 +23,12 @@ namespace BlackGui
|
||||
ui(new Ui::CSettingsTextMessageInlineComponent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(ui->cb_All, &QCheckBox::released, this, &CSettingsTextMessageInlineComponent::changeSettings);
|
||||
connect(ui->cb_Frequency, &QCheckBox::released, this, &CSettingsTextMessageInlineComponent::changeSettings);
|
||||
connect(ui->cb_Private, &QCheckBox::released, this, &CSettingsTextMessageInlineComponent::changeSettings);
|
||||
connect(ui->cb_All, &QCheckBox::released, this, &CSettingsTextMessageInlineComponent::changeSettings);
|
||||
connect(ui->cb_Frequency, &QCheckBox::released, this, &CSettingsTextMessageInlineComponent::changeSettings);
|
||||
connect(ui->cb_Private, &QCheckBox::released, this, &CSettingsTextMessageInlineComponent::changeSettings);
|
||||
connect(ui->cb_Supervisor, &QCheckBox::released, this, &CSettingsTextMessageInlineComponent::changeSettings);
|
||||
settingsChanged();
|
||||
connect(ui->cb_Focus, &QCheckBox::released, this, &CSettingsTextMessageInlineComponent::changeSettings);
|
||||
this->settingsChanged();
|
||||
}
|
||||
|
||||
CSettingsTextMessageInlineComponent::~CSettingsTextMessageInlineComponent()
|
||||
@@ -41,6 +42,7 @@ namespace BlackGui
|
||||
ui->cb_Frequency->setChecked(s.getPopupFrequencyMessages());
|
||||
ui->cb_Private->setChecked(s.getPopupPrivateMessages());
|
||||
ui->cb_Selcal->setChecked(s.getPopupSelcalMessages());
|
||||
ui->cb_Focus->setChecked(s.focusOverlayWindow());
|
||||
}
|
||||
|
||||
void CSettingsTextMessageInlineComponent::changeSettings()
|
||||
@@ -51,6 +53,7 @@ namespace BlackGui
|
||||
s.setPopupPrivateMessages(ui->cb_Private->isChecked());
|
||||
s.setSupervisorMessages(ui->cb_Supervisor->isChecked());
|
||||
s.setPopupSelcalMessages(ui->cb_Selcal->isChecked());
|
||||
s.setFocusOverlayWindows(ui->cb_Focus->isChecked());
|
||||
const CStatusMessage m = m_settings.setAndSave(s);
|
||||
CLogMessage::preformatted(m);
|
||||
}
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>266</width>
|
||||
<height>23</height>
|
||||
<width>283</width>
|
||||
<height>45</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
<string>Overlay message settings</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hl_TextMessageSettings">
|
||||
<layout class="QGridLayout" name="gl_OverlayMessages">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
@@ -26,7 +26,7 @@
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_Overlay">
|
||||
<property name="toolTip">
|
||||
<string>Overlay</string>
|
||||
@@ -36,41 +36,48 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QCheckBox" name="cb_Supervisor">
|
||||
<property name="toolTip">
|
||||
<string>supervisor</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>supervisor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="cb_Private">
|
||||
<property name="text">
|
||||
<string>private</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_Supervisor">
|
||||
<property name="toolTip">
|
||||
<string>supervisor</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>super.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QCheckBox" name="cb_Selcal">
|
||||
<property name="text">
|
||||
<string>SELCAL</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QCheckBox" name="cb_Frequency">
|
||||
<property name="toolTip">
|
||||
<string>frequency</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>freq.</string>
|
||||
<string>frequency</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QCheckBox" name="cb_Focus">
|
||||
<property name="text">
|
||||
<string>focus</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QCheckBox" name="cb_All">
|
||||
<property name="text">
|
||||
<string>all</string>
|
||||
@@ -79,6 +86,14 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
<tabstop>cb_Private</tabstop>
|
||||
<tabstop>cb_Supervisor</tabstop>
|
||||
<tabstop>cb_Selcal</tabstop>
|
||||
<tabstop>cb_Frequency</tabstop>
|
||||
<tabstop>cb_All</tabstop>
|
||||
<tabstop>cb_Focus</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -843,6 +843,8 @@ namespace BlackGui
|
||||
void CTextMessageComponent::focusTextEntry()
|
||||
{
|
||||
if (!ui->lep_TextMessages->isVisible()) { return; }
|
||||
const CTextMessageSettings s = m_messageSettings.get();
|
||||
if (m_usedAsOverlayWidget && !s.focusOverlayWindow()) { return; }
|
||||
ui->lep_TextMessages->setFocus();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user