mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
Ref T298, matching setup form added
This commit is contained in:
@@ -62,8 +62,9 @@ namespace BlackGui
|
||||
connect(ui->pb_Servers, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||
connect(ui->pb_Simulator, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||
connect(ui->pb_SimulatorBasics, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||
connect(ui->pb_DataLoadAndCaches, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||
connect(ui->pb_SimulatorMessages, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||
connect(ui->pb_Matching, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||
connect(ui->pb_DataLoadAndCaches, &QPushButton::released, this, &CSettingsComponent::onOverviewButtonClicked);
|
||||
|
||||
this->initActions();
|
||||
}
|
||||
@@ -122,6 +123,13 @@ namespace BlackGui
|
||||
ui->pb_Simulator->setToolTip(a->shortcut().toString());
|
||||
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||
this->addAction(a);
|
||||
|
||||
a = new QAction(this);
|
||||
a->setObjectName("matching");
|
||||
a->setShortcut(QKeySequence(Qt::ALT + Qt::Key_S, Qt::Key_M));
|
||||
ui->pb_Matching->setToolTip(a->shortcut().toString());
|
||||
connect(a, &QAction::triggered, this, &CSettingsComponent::onActionTriggered);
|
||||
this->addAction(a);
|
||||
}
|
||||
|
||||
bool CSettingsComponent::playNotificationSounds() const
|
||||
@@ -162,6 +170,7 @@ namespace BlackGui
|
||||
if (sender == ui->pb_SimulatorBasics) { this->setCurrentIndex(SettingTabSimulatorBasics); return; }
|
||||
if (sender == ui->pb_DataLoadAndCaches) { this->setCurrentIndex(SettingTabDataAndCaches); return; }
|
||||
if (sender == ui->pb_SimulatorMessages) { this->setCurrentIndex(SettingTabSimulatorMessages); return; }
|
||||
if (sender == ui->pb_Matching) { this->setCurrentIndex(SettingTabMatching); return; }
|
||||
this->setCurrentIndex(SettingTabOverview);
|
||||
}
|
||||
|
||||
@@ -176,6 +185,8 @@ namespace BlackGui
|
||||
if (a.contains("network")) { this->setCurrentIndex(SettingTabNetwork); return; }
|
||||
if (a.contains("overview")) { this->setCurrentIndex(SettingTabOverview); return; }
|
||||
if (a.contains("simulator")) { this->setCurrentIndex(SettingTabSimulator); return; }
|
||||
if (a.contains("matching")) { this->setCurrentIndex(SettingTabMatching); return; }
|
||||
if (a.contains("advanced")) { this->setCurrentIndex(SettingTabAdvanced); return; }
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -38,14 +38,15 @@ namespace BlackGui
|
||||
{
|
||||
SettingTabOverview,
|
||||
SettingTabServers,
|
||||
SettingTabGui,
|
||||
SettingTabNetwork,
|
||||
SettingTabHotkeys,
|
||||
SettingTabAudio,
|
||||
SettingTabDataAndCaches,
|
||||
SettingTabSimulator,
|
||||
SettingTabSimulatorBasics,
|
||||
SettingTabSimulatorMessages,
|
||||
SettingTabGui,
|
||||
SettingTabHotkeys,
|
||||
SettingTabDataAndCaches,
|
||||
SettingTabMatching,
|
||||
SettingTabAdvanced
|
||||
};
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>204</width>
|
||||
<height>340</height>
|
||||
<width>211</width>
|
||||
<height>378</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -30,7 +30,46 @@
|
||||
<property name="verticalSpacing">
|
||||
<number>20</number>
|
||||
</property>
|
||||
<item row="8" column="0" colspan="2">
|
||||
<item row="6" column="0">
|
||||
<widget class="QPushButton" name="pb_SimulatorBasics">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Simulator (basics)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QPushButton" name="pb_Simulator">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Simulator</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="pb_Network">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0" colspan="2">
|
||||
<spacer name="vs_OverviewBottom">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -56,45 +95,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QPushButton" name="pb_Advanced">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Advanced</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="pb_Network">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QPushButton" name="pb_SimulatorBasics">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Simulator (basics)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QPushButton" name="pb_Audio">
|
||||
<property name="sizePolicy">
|
||||
@@ -121,6 +121,19 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="pb_Hotkeys">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hotkeys</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QPushButton" name="pb_DataLoadAndCaches">
|
||||
<property name="sizePolicy">
|
||||
@@ -150,8 +163,15 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPushButton" name="pb_Hotkeys">
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="lbl_Hint">
|
||||
<property name="text">
|
||||
<string>Hint: see tooltips for shortcuts.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QPushButton" name="pb_Advanced">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -159,11 +179,24 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hotkeys</string>
|
||||
<string>Advanced</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="9" column="0">
|
||||
<widget class="QPushButton" name="pb_Matching">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Matching</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QPushButton" name="pb_SimulatorMessages">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
@@ -176,26 +209,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QPushButton" name="pb_Simulator">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Simulator</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QLabel" name="lbl_Hint">
|
||||
<property name="text">
|
||||
<string>Hint: see tooltips for shortcuts.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsTrafficNetworkServers">
|
||||
@@ -246,6 +259,52 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsGui">
|
||||
<attribute name="title">
|
||||
<string>GUI</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsGui">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsGuiComponent" name="comp_SettingsGuiGeneral"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsViewUpdateTimes" name="comp_SettingsGuiRefreshTimes"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="qw_SettingsGuiFont" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_SettingsGuiFontColor">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsTrafficNetwork">
|
||||
<attribute name="title">
|
||||
<string>Network</string>
|
||||
@@ -278,6 +337,44 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsHotkeys">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Hotkeys</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsHotkeys">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsHotkeyComponent" name="comp_SettingsHotkeysComponent">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsAudio">
|
||||
<attribute name="title">
|
||||
<string>Audio</string>
|
||||
@@ -310,11 +407,11 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsSimulator">
|
||||
<widget class="QWidget" name="tb_DataLoad">
|
||||
<attribute name="title">
|
||||
<string>Simulator</string>
|
||||
<string>Data and caches</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsSimulator">
|
||||
<layout class="QVBoxLayout" name="vl_DataLoad">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
@@ -328,16 +425,50 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
<number>15</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsSimulatorComponent" name="comp_SettingsSimulator">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
<widget class="QScrollArea" name="sa_DataLoad">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="wi_DataLoadScrollable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>203</width>
|
||||
<height>336</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_DataLoadOverview">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="BlackGui::Components::CDbLoadOverviewComponent" name="comp_DataLoadOverview">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>250</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -387,6 +518,38 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsSimulator">
|
||||
<attribute name="title">
|
||||
<string>Simulator</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsSimulator">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsSimulatorComponent" name="comp_SettingsSimulator">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsSimulatorMessages">
|
||||
<attribute name="title">
|
||||
<string>Simulator (messages)</string>
|
||||
@@ -425,66 +588,11 @@
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsGui">
|
||||
<widget class="QWidget" name="tb_Matching">
|
||||
<attribute name="title">
|
||||
<string>GUI</string>
|
||||
<string>Matching</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsGui">
|
||||
<property name="leftMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsGuiComponent" name="comp_SettingsGuiGeneral"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsViewUpdateTimes" name="comp_SettingsGuiRefreshTimes"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="qw_SettingsGuiFont" native="true">
|
||||
<layout class="QHBoxLayout" name="hl_SettingsGuiFontColor">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsHotkeys">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<attribute name="title">
|
||||
<string>Hotkeys</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsHotkeys">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_Matching">
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
@@ -498,80 +606,27 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsHotkeyComponent" name="comp_SettingsHotkeysComponent">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<widget class="BlackGui::Editors::CMatchingForm" name="editor_MatchingSetup">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_DataLoad">
|
||||
<attribute name="title">
|
||||
<string>Data and caches</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_DataLoad">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>15</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QScrollArea" name="sa_DataLoad">
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
<spacer name="vs_Matching">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="wi_DataLoadScrollable">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>196</width>
|
||||
<height>298</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_DataLoadOverview">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="BlackGui::Components::CDbLoadOverviewComponent" name="comp_DataLoadOverview">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>250</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
@@ -675,7 +730,27 @@
|
||||
<header>blackgui/components/settingsviewupdatetimes.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Editors::CMatchingForm</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/editors/matchingform.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>pb_Servers</tabstop>
|
||||
<tabstop>pb_Gui</tabstop>
|
||||
<tabstop>pb_Network</tabstop>
|
||||
<tabstop>pb_Hotkeys</tabstop>
|
||||
<tabstop>pb_Audio</tabstop>
|
||||
<tabstop>pb_DataLoadAndCaches</tabstop>
|
||||
<tabstop>pb_SimulatorBasics</tabstop>
|
||||
<tabstop>pb_Simulator</tabstop>
|
||||
<tabstop>pb_SimulatorMessages</tabstop>
|
||||
<tabstop>pb_Matching</tabstop>
|
||||
<tabstop>pb_Advanced</tabstop>
|
||||
<tabstop>sa_DataLoad</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
73
src/blackgui/editors/matchingform.cpp
Normal file
73
src/blackgui/editors/matchingform.cpp
Normal file
@@ -0,0 +1,73 @@
|
||||
/* Copyright (C) 2018
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "ui_matchingform.h"
|
||||
#include "matchingform.h"
|
||||
#include "guiutility.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackCore;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
{
|
||||
CMatchingForm::CMatchingForm(QWidget *parent) :
|
||||
CForm(parent),
|
||||
ui(new Ui::CMatchingForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
CMatchingForm::~CMatchingForm()
|
||||
{ }
|
||||
|
||||
void CMatchingForm::setReadOnly(bool readonly)
|
||||
{
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_ByModelString, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_ByICAOdata, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_ByFamily, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_ByLivery, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_ByCombinedCode, readonly);
|
||||
}
|
||||
|
||||
CStatusMessageList CMatchingForm::validate(bool withNestedForms) const
|
||||
{
|
||||
Q_UNUSED(withNestedForms);
|
||||
return CStatusMessageList();
|
||||
}
|
||||
|
||||
void CMatchingForm::setValue(const CAircraftMatcherSetup &setup)
|
||||
{
|
||||
const CAircraftMatcherSetup::MatchingMode mode = setup.getMatchingMode();
|
||||
ui->cb_ByModelString->setChecked(mode.testFlag(CAircraftMatcherSetup::ByModelString));
|
||||
ui->cb_ByCombinedCode->setChecked(mode.testFlag(CAircraftMatcherSetup::ByCombinedType));
|
||||
ui->cb_ByICAOdata->setChecked(mode.testFlag(CAircraftMatcherSetup::ByIcaoData));
|
||||
ui->cb_ByLivery->setChecked(mode.testFlag(CAircraftMatcherSetup::ByLivery));
|
||||
ui->cb_ByFamily->setChecked(mode.testFlag(CAircraftMatcherSetup::ByFamily));
|
||||
}
|
||||
|
||||
CAircraftMatcherSetup CMatchingForm::value() const
|
||||
{
|
||||
CAircraftMatcherSetup setup;
|
||||
setup.setMatchingMode(matchingMode());
|
||||
return setup;
|
||||
}
|
||||
|
||||
CAircraftMatcherSetup::MatchingMode CMatchingForm::matchingMode() const
|
||||
{
|
||||
return CAircraftMatcherSetup::matchingMode(
|
||||
ui->cb_ByModelString->isChecked(), ui->cb_ByICAOdata->isChecked(),
|
||||
ui->cb_ByFamily->isChecked(), ui->cb_ByLivery->isChecked(),
|
||||
ui->cb_ByCombinedCode->isChecked()
|
||||
);
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
61
src/blackgui/editors/matchingform.h
Normal file
61
src/blackgui/editors/matchingform.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/* Copyright (C) 2018
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKGUI_EDITORS_MATCHINGFORM_H
|
||||
#define BLACKGUI_EDITORS_MATCHINGFORM_H
|
||||
|
||||
#include "form.h"
|
||||
#include "blackmisc/simulation/aircraftmatchersetup.h"
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CMatchingForm; }
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
{
|
||||
//! Matching form
|
||||
class CMatchingForm : public CForm
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CMatchingForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CMatchingForm() override;
|
||||
|
||||
//! \name Form class implementations
|
||||
//! @{
|
||||
virtual void setReadOnly(bool readonly) override;
|
||||
virtual BlackMisc::CStatusMessageList validate(bool withNestedForms) const override;
|
||||
//! @}
|
||||
|
||||
//! Set valued
|
||||
void setValue(const BlackMisc::Simulation::CAircraftMatcherSetup &setup);
|
||||
|
||||
//! Value
|
||||
BlackMisc::Simulation::CAircraftMatcherSetup value() const;
|
||||
|
||||
//! Clear data
|
||||
void clear();
|
||||
|
||||
private:
|
||||
//! Mode
|
||||
BlackMisc::Simulation::CAircraftMatcherSetup::MatchingMode matchingMode() const;
|
||||
|
||||
QScopedPointer<Ui::CMatchingForm> ui;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
|
||||
#endif // guard
|
||||
65
src/blackgui/editors/matchingform.ui
Normal file
65
src/blackgui/editors/matchingform.ui
Normal file
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CMatchingForm</class>
|
||||
<widget class="QFrame" name="CMatchingForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>287</width>
|
||||
<height>87</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_MatchingForm">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_Mode">
|
||||
<property name="title">
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_Mode">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="cb_ByModelString">
|
||||
<property name="text">
|
||||
<string>by model string</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QCheckBox" name="cb_ByICAOdata">
|
||||
<property name="text">
|
||||
<string>by ICAO data</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="cb_ByFamily">
|
||||
<property name="text">
|
||||
<string>by family</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="cb_ByCombinedCode">
|
||||
<property name="text">
|
||||
<string>combined code</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QCheckBox" name="cb_ByLivery">
|
||||
<property name="text">
|
||||
<string>by livery</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user