mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
refs #799, overview page in settings component
This commit is contained in:
@@ -51,6 +51,15 @@ namespace BlackGui
|
||||
this->connect(ui->hs_SettingsGuiUserRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedUsersUpdateInterval);
|
||||
this->connect(ui->comp_SettingsGuiGeneral, &CSettingsGuiComponent::changedWindowsOpacity, this, &CSettingsComponent::changedWindowsOpacity);
|
||||
|
||||
connect(ui->pb_Advanced, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
connect(ui->pb_Audio, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
connect(ui->pb_Gui, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
connect(ui->pb_Hotkeys, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
connect(ui->pb_Network, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
connect(ui->pb_Servers, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
connect(ui->pb_Simulator, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
connect(ui->pb_SimulatorBasics, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
connect(ui->pb_SimulatorMessages, &QPushButton::released, this, &CSettingsComponent::ps_overviewButtonClicked);
|
||||
}
|
||||
|
||||
CSettingsComponent::~CSettingsComponent()
|
||||
@@ -85,5 +94,20 @@ namespace BlackGui
|
||||
{
|
||||
ui->comp_SettingsGuiGeneral->setGuiOpacity(value);
|
||||
}
|
||||
|
||||
void CSettingsComponent::ps_overviewButtonClicked()
|
||||
{
|
||||
const QObject *sender = QObject::sender();
|
||||
if (sender == ui->pb_Advanced) { this->setCurrentIndex(SettingTabAdvanced); return; }
|
||||
if (sender == ui->pb_Audio) { this->setCurrentIndex(SettingTabAudio); return; }
|
||||
if (sender == ui->pb_Gui) { this->setCurrentIndex(SettingTabGui); return; }
|
||||
if (sender == ui->pb_Hotkeys) { this->setCurrentIndex(SettingTabHotkeys); return; }
|
||||
if (sender == ui->pb_Network) { this->setCurrentIndex(SettingTabNetwork); return; }
|
||||
if (sender == ui->pb_Servers) { this->setCurrentIndex(SettingTabServers); return; }
|
||||
if (sender == ui->pb_Simulator) { this->setCurrentIndex(SettingTabSimulator); return; }
|
||||
if (sender == ui->pb_SimulatorBasics) { this->setCurrentIndex(SettingTabSimulatorBasics); return; }
|
||||
if (sender == ui->pb_SimulatorMessages) { this->setCurrentIndex(SettingTabSimulatorMessages); return; }
|
||||
this->setCurrentIndex(SettingTabOverview);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -33,15 +33,19 @@ namespace BlackGui
|
||||
public:
|
||||
|
||||
//! Tabs
|
||||
//! \remark needs to be in sync with tab order
|
||||
enum SettingTab
|
||||
{
|
||||
SettingTabNetworkServers = 0,
|
||||
SettingTabOverview = 0,
|
||||
SettingTabServers,
|
||||
SettingTabNetwork,
|
||||
SettingTabAircraftAudio,
|
||||
SettingTabAudio,
|
||||
SettingTabSimulator,
|
||||
SettingTabSimulatorBascis,
|
||||
SettingTabSimulatorBasics,
|
||||
SettingTabSimulatorMessages,
|
||||
SettingTabGui,
|
||||
SettingTabHotkeys
|
||||
SettingTabHotkeys,
|
||||
SettingTabAdvanced
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
@@ -82,6 +86,10 @@ namespace BlackGui
|
||||
//! GUI Opacity 0-100%
|
||||
void setGuiOpacity(double value);
|
||||
|
||||
private slots:
|
||||
//! An overview button was clicked
|
||||
void ps_overviewButtonClicked();
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CSettingsComponent> ui;
|
||||
};
|
||||
|
||||
@@ -22,6 +22,76 @@
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tb_SettingsOverview">
|
||||
<attribute name="title">
|
||||
<string>Overview</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pb_Servers">
|
||||
<property name="text">
|
||||
<string>Servers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pb_Network">
|
||||
<property name="text">
|
||||
<string>Network</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QPushButton" name="pb_Audio">
|
||||
<property name="text">
|
||||
<string>Audio</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QPushButton" name="pb_Simulator">
|
||||
<property name="text">
|
||||
<string>Simulator</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QPushButton" name="pb_SimulatorBasics">
|
||||
<property name="text">
|
||||
<string>Simulator (basics)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QPushButton" name="pb_SimulatorMessages">
|
||||
<property name="text">
|
||||
<string>Simulator (messages)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="pb_Gui">
|
||||
<property name="text">
|
||||
<string>GUI</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="pb_Hotkeys">
|
||||
<property name="text">
|
||||
<string>Hotkeys</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="pb_Advanced">
|
||||
<property name="text">
|
||||
<string>Advanced</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsTrafficNetworkServers">
|
||||
<attribute name="title">
|
||||
<string>Servers</string>
|
||||
@@ -168,7 +238,7 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsSimulatorBasics">
|
||||
<attribute name="title">
|
||||
<string>Simulator (Basics)</string>
|
||||
<string>Simulator (basics)</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsSimulatorBascis">
|
||||
<property name="spacing">
|
||||
|
||||
Reference in New Issue
Block a user