mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 17:35:34 +08:00
refs #273, encapsulated settings GUI into own component
This removed a considerable amount of code from mainwindow
This commit is contained in:
405
src/blackgui/settingscomponent.cpp
Normal file
405
src/blackgui/settingscomponent.cpp
Normal file
@@ -0,0 +1,405 @@
|
||||
#include "settingscomponent.h"
|
||||
#include "ui_settingscomponent.h"
|
||||
#include "blackgui/atcstationlistmodel.h"
|
||||
#include "blackcore/dbus_server.h"
|
||||
#include "blackcore/context_network.h"
|
||||
#include "blackmisc/hwkeyboardkeylist.h"
|
||||
#include "blackmisc/setaudio.h"
|
||||
|
||||
using namespace BlackCore;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackGui;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Audio;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::Settings;
|
||||
using namespace BlackMisc::Hardware;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
|
||||
CSettingsComponent::CSettingsComponent(QWidget *parent) :
|
||||
QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CSettingsComponent),
|
||||
m_audioTestRunning(NoAudioTest)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->ui->prb_SettingsAudioTestProgress->setVisible(false);
|
||||
this->m_timerAudioTests = new QTimer(this);
|
||||
}
|
||||
|
||||
CSettingsComponent::~CSettingsComponent()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update own ICAO data from GUI
|
||||
*/
|
||||
void CSettingsComponent::setOwnAircraftIcaoDataFromGui(CAircraftIcao &icao) const
|
||||
{
|
||||
icao.setAirlineDesignator(this->ui->le_SettingsIcaoAirlineDesignator->text());
|
||||
icao.setAircraftDesignator(this->ui->le_SettingsIcaoAircraftDesignator->text());
|
||||
icao.setAircraftCombinedType(this->ui->le_SettingsIcaoCombinedType->text());
|
||||
}
|
||||
|
||||
void CSettingsComponent::setGuiOpacity(double value)
|
||||
{
|
||||
this->ui->hs_SettingsGuiOpacity->setValue(value);
|
||||
}
|
||||
|
||||
bool CSettingsComponent::loginAsObserver() const
|
||||
{
|
||||
return this->ui->rb_SettingsLoginStealthMode->isChecked();
|
||||
}
|
||||
|
||||
bool CSettingsComponent::loginStealth() const
|
||||
{
|
||||
return this->ui->rb_SettingsLoginStealthMode->isChecked();
|
||||
}
|
||||
|
||||
bool CSettingsComponent::playNotificationSounds() const
|
||||
{
|
||||
return this->ui->cb_SettingsAudioPlayNotificationSounds->isChecked();
|
||||
}
|
||||
|
||||
int CSettingsComponent::getAtcUpdateIntervalSeconds() const
|
||||
{
|
||||
return this->ui->hs_SettingsGuiAtcRefreshTime->value();
|
||||
}
|
||||
|
||||
int CSettingsComponent::getAircraftUpdateIntervalSeconds() const
|
||||
{
|
||||
return this->ui->hs_SettingsGuiAircraftRefreshTime->value();
|
||||
}
|
||||
|
||||
int CSettingsComponent::getUsersUpdateIntervalSeconds() const
|
||||
{
|
||||
return this->ui->hs_SettingsGuiUserRefreshTime->value();
|
||||
}
|
||||
|
||||
QString CSettingsComponent::getOwnCallsignFromGui() const
|
||||
{
|
||||
return this->ui->le_SettingsAircraftCallsign->text();
|
||||
}
|
||||
|
||||
/*
|
||||
* Reload settings
|
||||
*/
|
||||
void CSettingsComponent::reloadSettings()
|
||||
{
|
||||
// local copy
|
||||
CSettingsNetwork nws = this->getIContextSettings()->getNetworkSettings();
|
||||
CSettingsAudio as = this->getIContextSettings()->getAudioSettings();
|
||||
|
||||
// update servers
|
||||
this->ui->tvp_SettingsTnServers->setSelectedServer(nws.getCurrentTrafficNetworkServer());
|
||||
this->ui->tvp_SettingsTnServers->update(nws.getTrafficNetworkServers());
|
||||
|
||||
// update hot keys
|
||||
this->ui->tvp_SettingsMiscHotkeys->update(this->getIContextSettings()->getHotkeys());
|
||||
|
||||
// fake setting for sound notifications
|
||||
this->ui->cb_SettingsAudioPlayNotificationSounds->setChecked(true);
|
||||
this->ui->cb_SettingsAudioNotificationTextMessage->setChecked(as.getNotificationFlag(BlackSound::CNotificationSounds::NotificationTextMessagePrivate));
|
||||
this->ui->cb_SettingsAudioNotificationVoiceRoom->setChecked(as.getNotificationFlag(BlackSound::CNotificationSounds::NotificationVoiceRoomJoined));
|
||||
}
|
||||
|
||||
void CSettingsComponent::runtimeHasBeenSet()
|
||||
{
|
||||
if (!this->getIContextSettings()) qFatal("Settings missing");
|
||||
|
||||
this->connect(this->getIContextSettings(), &IContextSettings::changedSettings, this, &CSettingsComponent::changedSettings);
|
||||
this->connect(this->m_timerAudioTests, &QTimer::timeout, this, &CSettingsComponent::audioTestUpdate);
|
||||
|
||||
// based on audio context
|
||||
Q_ASSERT(this->getIContextAudio());
|
||||
if (this->getIContextAudio())
|
||||
{
|
||||
this->initAudioDeviceLists();
|
||||
bool connected = this->connect(this->getIContextAudio(), &IContextAudio::audioTestCompleted, this, &CSettingsComponent::audioTestUpdate);
|
||||
Q_ASSERT(connected);
|
||||
connected = this->connect(this->ui->cb_SettingsAudioInputDevice, SIGNAL(currentIndexChanged(int)), this, SLOT(audioDeviceSelected(int)));
|
||||
Q_ASSERT(connected);
|
||||
connected = this->connect(this->ui->cb_SettingsAudioOutputDevice, SIGNAL(currentIndexChanged(int)), this, SLOT(audioDeviceSelected(int)));
|
||||
Q_ASSERT(connected);
|
||||
this->connect(this->ui->pb_SettingsAudioMicrophoneTest, &QPushButton::clicked, this, &CSettingsComponent::startAudioTest);
|
||||
this->connect(this->ui->pb_SettingsAudioSquelchTest, &QPushButton::clicked, this, &CSettingsComponent::startAudioTest);
|
||||
}
|
||||
|
||||
// Opacity, intervals
|
||||
this->connect(this->ui->hs_SettingsGuiOpacity, &QSlider::valueChanged, this, &CSettingsComponent::changedWindowsOpacity);
|
||||
this->connect(this->ui->hs_SettingsGuiAircraftRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedAircraftsUpdateInterval);
|
||||
this->connect(this->ui->hs_SettingsGuiAtcRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedAtcStationsUpdateInterval);
|
||||
this->connect(this->ui->hs_SettingsGuiUserRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedUsersUpdateInterval);
|
||||
|
||||
// Settings server
|
||||
this->connect(this->ui->pb_SettingsTnCurrentServer, &QPushButton::released, this, &CSettingsComponent::alterTrafficServer);
|
||||
this->connect(this->ui->pb_SettingsTnRemoveServer, &QPushButton::released, this, &CSettingsComponent::alterTrafficServer);
|
||||
this->connect(this->ui->pb_SettingsTnSaveServer, &QPushButton::released, this, &CSettingsComponent::alterTrafficServer);
|
||||
this->connect(this->ui->tvp_SettingsTnServers, &QTableView::clicked, this, &CSettingsComponent::networkServerSelected);
|
||||
|
||||
// Settings hotkeys
|
||||
this->connect(this->ui->pb_SettingsMiscCancel, &QPushButton::clicked, this, &CSettingsComponent::reloadSettings);
|
||||
this->connect(this->ui->pb_SettingsMiscSave, &QPushButton::clicked, this, &CSettingsComponent::saveHotkeys);
|
||||
this->connect(this->ui->pb_SettingsMiscRemove, &QPushButton::clicked, this, &CSettingsComponent::clearHotkey);
|
||||
}
|
||||
|
||||
/*
|
||||
* Network has been selected
|
||||
*/
|
||||
void CSettingsComponent::networkServerSelected(QModelIndex index)
|
||||
{
|
||||
const CServer clickedServer = this->ui->tvp_SettingsTnServers->at<CServer>(index);
|
||||
this->updateGuiSelectedServerTextboxes(clickedServer);
|
||||
}
|
||||
|
||||
/*
|
||||
* Alter server
|
||||
*/
|
||||
void CSettingsComponent::alterTrafficServer()
|
||||
{
|
||||
CServer server = this->selectedServerFromTextboxes();
|
||||
if (!server.isValidForLogin())
|
||||
{
|
||||
const CStatusMessage validation = CStatusMessage::getValidationError("Wrong settings for server");
|
||||
this->sendStatusMessage(validation);
|
||||
return;
|
||||
}
|
||||
|
||||
const QString path = CSettingUtilities::appendPaths(IContextSettings::PathNetworkSettings(), CSettingsNetwork::ValueTrafficServers());
|
||||
QObject *sender = QObject::sender();
|
||||
CStatusMessageList msgs;
|
||||
if (sender == this->ui->pb_SettingsTnCurrentServer)
|
||||
{
|
||||
msgs = this->getIContextSettings()->value(path, CSettingsNetwork::CmdSetCurrentServer(), server.toQVariant());
|
||||
}
|
||||
else if (sender == this->ui->pb_SettingsTnRemoveServer)
|
||||
{
|
||||
msgs = this->getIContextSettings()->value(path, CSettingUtilities::CmdRemove(), server.toQVariant());
|
||||
}
|
||||
else if (sender == this->ui->pb_SettingsTnSaveServer)
|
||||
{
|
||||
msgs = this->getIContextSettings()->value(path, CSettingUtilities::CmdUpdate(), server.toQVariant());
|
||||
}
|
||||
|
||||
// status messages
|
||||
this->sendStatusMessages(msgs);
|
||||
}
|
||||
|
||||
/*
|
||||
* Settings did changed
|
||||
*/
|
||||
void CSettingsComponent::changedSettings(uint typeValue)
|
||||
{
|
||||
IContextSettings::SettingsType type = static_cast<IContextSettings::SettingsType>(typeValue);
|
||||
this->reloadSettings();
|
||||
Q_UNUSED(type);
|
||||
}
|
||||
|
||||
/*
|
||||
* Textboxes from server
|
||||
*/
|
||||
void CSettingsComponent::updateGuiSelectedServerTextboxes(const CServer &server)
|
||||
{
|
||||
this->ui->le_SettingsTnCsName->setText(server.getName());
|
||||
this->ui->le_SettingsTnCsDescription->setText(server.getDescription());
|
||||
this->ui->le_SettingsTnCsAddress->setText(server.getAddress());
|
||||
this->ui->le_SettingsTnCsPort->setText(QString::number(server.getPort()));
|
||||
this->ui->le_SettingsTnCsRealName->setText(server.getUser().getRealName());
|
||||
this->ui->le_SettingsTnCsNetworkId->setText(server.getUser().getId());
|
||||
this->ui->le_SettingsTnCsPassword->setText(server.getUser().getPassword());
|
||||
}
|
||||
|
||||
/*
|
||||
* Server settings from textboxes
|
||||
*/
|
||||
CServer CSettingsComponent::selectedServerFromTextboxes() const
|
||||
{
|
||||
CServer server;
|
||||
bool portOk = false;
|
||||
server.setName(this->ui->le_SettingsTnCsName->text());
|
||||
server.setDescription(this->ui->le_SettingsTnCsDescription->text());
|
||||
server.setAddress(this->ui->le_SettingsTnCsAddress->text());
|
||||
server.setPort(this->ui->le_SettingsTnCsPort->text().toInt(&portOk));
|
||||
if (!portOk) server.setPort(-1);
|
||||
|
||||
CUser user;
|
||||
user.setRealName(this->ui->le_SettingsTnCsRealName->text());
|
||||
user.setId(this->ui->le_SettingsTnCsNetworkId->text());
|
||||
user.setPassword(this->ui->le_SettingsTnCsPassword->text());
|
||||
server.setUser(user);
|
||||
|
||||
return server;
|
||||
}
|
||||
|
||||
/*
|
||||
* Save the hotkeys
|
||||
*/
|
||||
void CSettingsComponent::saveHotkeys()
|
||||
{
|
||||
const QString path = CSettingUtilities::appendPaths(IContextSettings::PathRoot(), IContextSettings::PathHotkeys());
|
||||
CStatusMessageList msgs = this->getIContextSettings()->value(path, CSettingUtilities::CmdUpdate(), this->ui->tvp_SettingsMiscHotkeys->derivedModel()->getContainer().toQVariant());
|
||||
|
||||
// status messages
|
||||
this->sendStatusMessages(msgs);
|
||||
}
|
||||
|
||||
/*
|
||||
* Clear particular hotkey
|
||||
*/
|
||||
void CSettingsComponent::clearHotkey()
|
||||
{
|
||||
QModelIndex i = this->ui->tvp_SettingsMiscHotkeys->currentIndex();
|
||||
if (i.row() < 0 || i.row() >= this->ui->tvp_SettingsMiscHotkeys->rowCount()) return;
|
||||
BlackMisc::Hardware::CKeyboardKey key = this->ui->tvp_SettingsMiscHotkeys->at<BlackMisc::Hardware::CKeyboardKey>(i);
|
||||
BlackMisc::Hardware::CKeyboardKey defaultKey;
|
||||
defaultKey.setFunction(key.getFunction());
|
||||
this->ui->tvp_SettingsMiscHotkeys->derivedModel()->update(i, defaultKey);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set audio device lists
|
||||
*/
|
||||
void CSettingsComponent::initAudioDeviceLists()
|
||||
{
|
||||
if (!this->getIContextAudio()) return;
|
||||
this->ui->cb_SettingsAudioOutputDevice->clear();
|
||||
this->ui->cb_SettingsAudioInputDevice->clear();
|
||||
|
||||
foreach(CAudioDevice device, this->getIContextAudio()->getAudioDevices())
|
||||
{
|
||||
if (device.getType() == CAudioDevice::InputDevice)
|
||||
{
|
||||
this->ui->cb_SettingsAudioInputDevice->addItem(device.toQString(true));
|
||||
}
|
||||
else if (device.getType() == CAudioDevice::OutputDevice)
|
||||
{
|
||||
this->ui->cb_SettingsAudioOutputDevice->addItem(device.toQString(true));
|
||||
}
|
||||
}
|
||||
|
||||
foreach(CAudioDevice device, this->getIContextAudio()->getCurrentAudioDevices())
|
||||
{
|
||||
if (device.getType() == CAudioDevice::InputDevice)
|
||||
{
|
||||
this->ui->cb_SettingsAudioInputDevice->setCurrentText(device.toQString(true));
|
||||
}
|
||||
else if (device.getType() == CAudioDevice::OutputDevice)
|
||||
{
|
||||
this->ui->cb_SettingsAudioOutputDevice->setCurrentText(device.toQString(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Start the voice tests
|
||||
*/
|
||||
void CSettingsComponent::startAudioTest()
|
||||
{
|
||||
if (!this->getIContextAudio())
|
||||
{
|
||||
CStatusMessage m(CStatusMessage::TypeAudio, CStatusMessage::SeverityError, "voice context not available");
|
||||
this->sendStatusMessage(m);
|
||||
return;
|
||||
}
|
||||
if (this->m_timerAudioTests->isActive())
|
||||
{
|
||||
CStatusMessage m(CStatusMessage::TypeAudio, CStatusMessage::SeverityError, "test running, wait until completed");
|
||||
this->sendStatusMessage(m);
|
||||
return;
|
||||
}
|
||||
|
||||
QObject *sender = QObject::sender();
|
||||
this->m_timerAudioTests->start(600); // I let this run for <x>ms, so there is enough overhead to really complete it
|
||||
this->ui->prb_SettingsAudioTestProgress->setValue(0);
|
||||
this->ui->pte_SettingsAudioTestActionAndResult->clear();
|
||||
if (sender == this->ui->pb_SettingsAudioMicrophoneTest)
|
||||
{
|
||||
this->m_audioTestRunning = MicrophoneTest;
|
||||
this->getIContextAudio()->runMicrophoneTest();
|
||||
this->ui->pte_SettingsAudioTestActionAndResult->appendPlainText("Speak normally for 5 seconds");
|
||||
}
|
||||
else if (sender == this->ui->pb_SettingsAudioSquelchTest)
|
||||
{
|
||||
this->m_audioTestRunning = SquelchTest;
|
||||
this->getIContextAudio()->runSquelchTest();
|
||||
this->ui->pte_SettingsAudioTestActionAndResult->appendPlainText("Silence for 5 seconds");
|
||||
}
|
||||
this->ui->prb_SettingsAudioTestProgress->setVisible(true);
|
||||
this->ui->pb_SettingsAudioMicrophoneTest->setEnabled(false);
|
||||
this->ui->pb_SettingsAudioSquelchTest->setEnabled(false);
|
||||
}
|
||||
|
||||
/*
|
||||
* Start the voice tests
|
||||
*/
|
||||
void CSettingsComponent::audioTestUpdate()
|
||||
{
|
||||
Q_ASSERT(this->getIContextAudio());
|
||||
if (!this->getIContextAudio()) return;
|
||||
int v = this->ui->prb_SettingsAudioTestProgress->value();
|
||||
QObject *sender = this->sender();
|
||||
|
||||
if (v < 100 && (sender == m_timerAudioTests))
|
||||
{
|
||||
// timer update, increasing progress
|
||||
this->ui->prb_SettingsAudioTestProgress->setValue(v + 10);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->m_timerAudioTests->stop();
|
||||
this->ui->prb_SettingsAudioTestProgress->setValue(100);
|
||||
if (sender == m_timerAudioTests) return; // just timer update
|
||||
|
||||
// getting here we assume the audio test finished signal
|
||||
// fetch results
|
||||
this->ui->pte_SettingsAudioTestActionAndResult->clear();
|
||||
if (this->m_audioTestRunning == SquelchTest)
|
||||
{
|
||||
double s = this->getIContextAudio()->getSquelchValue();
|
||||
this->ui->pte_SettingsAudioTestActionAndResult->appendPlainText(QString::number(s));
|
||||
}
|
||||
else if (this->m_audioTestRunning == MicrophoneTest)
|
||||
{
|
||||
QString m = this->getIContextAudio()->getMicrophoneTestResult();
|
||||
this->ui->pte_SettingsAudioTestActionAndResult->appendPlainText(m);
|
||||
}
|
||||
this->m_audioTestRunning = NoAudioTest;
|
||||
this->m_timerAudioTests->stop();
|
||||
this->ui->pb_SettingsAudioMicrophoneTest->setEnabled(true);
|
||||
this->ui->pb_SettingsAudioSquelchTest->setEnabled(true);
|
||||
this->ui->prb_SettingsAudioTestProgress->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Select audio device
|
||||
*/
|
||||
void CSettingsComponent::audioDeviceSelected(int index)
|
||||
{
|
||||
if (!this->getIContextAudio()) return;
|
||||
if (index < 0)return;
|
||||
|
||||
CAudioDeviceList devices = this->getIContextAudio()->getAudioDevices();
|
||||
if (devices.isEmpty()) return;
|
||||
CAudioDevice selectedDevice;
|
||||
QObject *sender = QObject::sender();
|
||||
if (sender == this->ui->cb_SettingsAudioInputDevice)
|
||||
{
|
||||
CAudioDeviceList inputDevices = devices.getInputDevices();
|
||||
if (index >= inputDevices.size()) return;
|
||||
selectedDevice = inputDevices[index];
|
||||
this->getIContextAudio()->setCurrentAudioDevice(selectedDevice);
|
||||
}
|
||||
else if (sender == this->ui->cb_SettingsAudioOutputDevice)
|
||||
{
|
||||
CAudioDeviceList outputDevices = devices.getOutputDevices();
|
||||
if (index >= outputDevices.size()) return;
|
||||
selectedDevice = outputDevices[index];
|
||||
this->getIContextAudio()->setCurrentAudioDevice(selectedDevice);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace
|
||||
130
src/blackgui/settingscomponent.h
Normal file
130
src/blackgui/settingscomponent.h
Normal file
@@ -0,0 +1,130 @@
|
||||
#ifndef BLACKGUI_SETTINGSCOMPONENT_H
|
||||
#define BLACKGUI_SETTINGSCOMPONENT_H
|
||||
|
||||
#include "blackgui/runtimebasedcomponent.h"
|
||||
#include <QTabWidget>
|
||||
#include <QModelIndex>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
namespace Ui { class CSettingsComponent; }
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
//! Settings component
|
||||
class CSettingsComponent : public QTabWidget, public CRuntimeBasedComponent
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CSettingsComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CSettingsComponent();
|
||||
|
||||
//! ICAO data from GUI
|
||||
void setOwnAircraftIcaoDataFromGui(BlackMisc::Aviation::CAircraftIcao &icao) const;
|
||||
|
||||
//! GUI Opacity 0-100%
|
||||
void setGuiOpacity(double value);
|
||||
|
||||
//! Login as observer
|
||||
bool loginAsObserver() const;
|
||||
|
||||
//! Login as observer
|
||||
bool loginStealth() const;
|
||||
|
||||
//! Play notification sounds (at all)
|
||||
bool playNotificationSounds() const;
|
||||
|
||||
//! ATC refresh time
|
||||
int getAtcUpdateIntervalSeconds() const;
|
||||
|
||||
//! Aircraft refresh time
|
||||
int getAircraftUpdateIntervalSeconds() const;
|
||||
|
||||
//! Aircraft refresh time
|
||||
int getUsersUpdateIntervalSeconds() const;
|
||||
|
||||
//! Own callsign
|
||||
QString getOwnCallsignFromGui() const;
|
||||
|
||||
signals:
|
||||
//! Change the windows opacity 0..100
|
||||
void changedWindowsOpacity(int opacity);
|
||||
|
||||
//! Update interval changed (ATC)
|
||||
void changedAtcStationsUpdateInterval(int seconds);
|
||||
|
||||
//! Update interval changed (aircrafts)
|
||||
void changedAircraftsUpdateInterval(int seconds);
|
||||
|
||||
//! Update interval changed (users)
|
||||
void changedUsersUpdateInterval(int seconds);
|
||||
|
||||
public slots:
|
||||
//! Reload settings
|
||||
void reloadSettings();
|
||||
|
||||
protected:
|
||||
//! \copydoc CRuntimeBasedComponent::runtimeHasBeenSet
|
||||
virtual void runtimeHasBeenSet() override;
|
||||
|
||||
private slots:
|
||||
|
||||
//! Network server selected
|
||||
void networkServerSelected(QModelIndex index);
|
||||
|
||||
//! Alter traffic server
|
||||
void alterTrafficServer();
|
||||
|
||||
/*!
|
||||
* \brief Update the selected server textboxes
|
||||
* \param server to be displayed
|
||||
*/
|
||||
void updateGuiSelectedServerTextboxes(const BlackMisc::Network::CServer &server);
|
||||
|
||||
//! Selected server from textboxes
|
||||
BlackMisc::Network::CServer selectedServerFromTextboxes() const;
|
||||
|
||||
//! Settings have been changed
|
||||
void changedSettings(uint typeValue);
|
||||
|
||||
//! Save the Hotkeys
|
||||
void saveHotkeys();
|
||||
|
||||
//! Clear single hotkey
|
||||
void clearHotkey();
|
||||
|
||||
//! start the MIC tests (Squelch)
|
||||
void startAudioTest();
|
||||
|
||||
//! Audio test updates (timer) for progressbar and fetching results
|
||||
void audioTestUpdate();
|
||||
|
||||
/*!
|
||||
* \brief Audio device selected
|
||||
* \param index audio device index (COM1, COM2)
|
||||
*/
|
||||
void audioDeviceSelected(int index);
|
||||
|
||||
private:
|
||||
//! Audio test modes
|
||||
enum AudioTest
|
||||
{
|
||||
NoAudioTest,
|
||||
SquelchTest,
|
||||
MicrophoneTest
|
||||
};
|
||||
|
||||
Ui::CSettingsComponent *ui;
|
||||
QTimer *m_timerAudioTests; //!< audio tests: progress bar, disable/enable buttons
|
||||
AudioTest m_audioTestRunning;
|
||||
|
||||
//! Audio device lists from settings
|
||||
void initAudioDeviceLists();
|
||||
};
|
||||
} // namespace
|
||||
|
||||
#endif // guard
|
||||
754
src/blackgui/settingscomponent.ui
Normal file
754
src/blackgui/settingscomponent.ui
Normal file
@@ -0,0 +1,754 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CSettingsComponent</class>
|
||||
<widget class="QTabWidget" name="CSettingsComponent">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>323</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>TabWidget</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tb_SettingsTrafficNetwork">
|
||||
<attribute name="title">
|
||||
<string>Traffic Network</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsTrafficNetwork">
|
||||
<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::CServerView" name="tvp_SettingsTnServers">
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed</set>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="fl_SettingsTnCurrentServer">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsTnCsName">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsTnCsName">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsTnCsDescription">
|
||||
<property name="text">
|
||||
<string>Description</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsTnCsDescription"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsTnCsAddress">
|
||||
<property name="text">
|
||||
<string>Address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsTnCsAddress"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsTnCsPort">
|
||||
<property name="text">
|
||||
<string>Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsTnCsPort">
|
||||
<property name="maxLength">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsTnCsRealName">
|
||||
<property name="text">
|
||||
<string>Real name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsTnCsRealName">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsTnCsNetworkId">
|
||||
<property name="text">
|
||||
<string>Id:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsTnCsNetworkId">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsTnCsPassword">
|
||||
<property name="text">
|
||||
<string>Password</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsTnCsPassword">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>32</number>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="fr_SettingsTnButtons">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="hl_SettingsBottomBar">
|
||||
<property name="topMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SettingsTnSaveServer">
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SettingsTnRemoveServer">
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SettingsTnCurrentServer">
|
||||
<property name="text">
|
||||
<string>Current server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsAircraft">
|
||||
<attribute name="title">
|
||||
<string>Aircraft</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="fl_SettingsAircraft">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsAircraftCallsign">
|
||||
<property name="text">
|
||||
<string>Callsign</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsAircraftCallsign">
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhLatinOnly|Qt::ImhUppercaseOnly</set>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>BLACK</string>
|
||||
</property>
|
||||
<property name="maxLength">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsIcaoAircraftDesignator">
|
||||
<property name="text">
|
||||
<string>ICAO type (e.g. A320)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsIcaoAircraftDesignator">
|
||||
<property name="inputMethodHints">
|
||||
<set>Qt::ImhUppercaseOnly</set>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>C172</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsIcaoAirlineDesignator">
|
||||
<property name="text">
|
||||
<string>ICAO airline (e.g.DLH)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsIcaoAirlineDesignator">
|
||||
<property name="text">
|
||||
<string>SGN</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsIcaoCombinedType">
|
||||
<property name="text">
|
||||
<string>Aircraft type (e.g. L2J)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="le_SettingsIcaoCombinedType">
|
||||
<property name="text">
|
||||
<string>L1P</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsModes">
|
||||
<property name="text">
|
||||
<string>Login modes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QGroupBox" name="gb_LoginModes">
|
||||
<property name="title">
|
||||
<string/>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rb_SetttingsNormalLoginMode">
|
||||
<property name="text">
|
||||
<string>Normal</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rb_SettingsLoginStealthMode">
|
||||
<property name="text">
|
||||
<string>Stealth mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rb_SettingsLoginObserver">
|
||||
<property name="text">
|
||||
<string>Observer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsAudio">
|
||||
<attribute name="title">
|
||||
<string>Audio</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_14">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QFormLayout" name="fl_SettingsAudio">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsAudioInputDevice">
|
||||
<property name="text">
|
||||
<string>In</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cb_SettingsAudioInputDevice"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsAudioOutputDevice">
|
||||
<property name="text">
|
||||
<string>Out</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cb_SettingsAudioOutputDevice"/>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<spacer name="vs_SettingsAudioVoiceTests">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsAudioVoiceTests">
|
||||
<property name="text">
|
||||
<string>Tests</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QWidget" name="wi_SettingsAudioTests" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</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>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="hl_SettingsAudioTests">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SettingsAudioSquelchTest">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start squelch test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SettingsAudioMicrophoneTest">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Start microphone test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsAudioTestActionAndResult">
|
||||
<property name="text">
|
||||
<string>Result</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QPlainTextEdit" name="pte_SettingsAudioTestActionAndResult">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QProgressBar" name="prb_SettingsAudioTestProgress">
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<spacer name="vs_SettingsAudioMisc">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<widget class="QCheckBox" name="cb_SettingsAudioPlayNotificationSounds">
|
||||
<property name="text">
|
||||
<string>play notification sounds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<widget class="QCheckBox" name="cb_SettingsAudioNotificationTextMessage">
|
||||
<property name="text">
|
||||
<string>notification for text messages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="2">
|
||||
<widget class="QLabel" name="lbl_SettingsAudioNotificationSounds">
|
||||
<property name="text">
|
||||
<string>Notification sounds</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1">
|
||||
<widget class="QCheckBox" name="cb_SettingsAudioNotificationVoiceRoom">
|
||||
<property name="text">
|
||||
<string>notification for join/leave voice room</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsSimulatorFsx">
|
||||
<attribute name="title">
|
||||
<string>Simulator</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="BlackGui::CSettingsFsxComponent" name="comp_SettingsSimulatorFsx">
|
||||
<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_SettingsGui">
|
||||
<attribute name="title">
|
||||
<string>GUI</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_7">
|
||||
<item>
|
||||
<layout class="QFormLayout" name="fl_SettingsGui">
|
||||
<property name="fieldGrowthPolicy">
|
||||
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsGuiOpacity">
|
||||
<property name="text">
|
||||
<string>Opacity (0-100%)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSlider" name="hs_SettingsGuiOpacity">
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsGuiAircraftRefreshTime">
|
||||
<property name="text">
|
||||
<string>Aircraft refresh time (5-30s)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSlider" name="hs_SettingsGuiAircraftRefreshTime">
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="tickPosition">
|
||||
<enum>QSlider::NoTicks</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsGuiAtcRefreshTime">
|
||||
<property name="text">
|
||||
<string>ATC refresh time (5-30s)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSlider" name="hs_SettingsGuiAtcRefreshTime">
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbl_SettingsGuiUserRefreshTime">
|
||||
<property name="text">
|
||||
<string>User refresh time (5-30s)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSlider" name="hs_SettingsGuiUserRefreshTime">
|
||||
<property name="minimum">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tb_SettingsMisc">
|
||||
<attribute name="title">
|
||||
<string>Misc</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_SettingsMisc">
|
||||
<property name="spacing">
|
||||
<number>3</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::CKeyboardKeyView" name="tvp_SettingsMiscHotkeys">
|
||||
<property name="cornerButtonEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="verticalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="fr_SettingsMisc">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SettingsMiscSave">
|
||||
<property name="text">
|
||||
<string>Save</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SettingsMiscRemove">
|
||||
<property name="text">
|
||||
<string>Remove</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_SettingsMiscCancel">
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BlackGui::CKeyboardKeyView</class>
|
||||
<extends>QTableView</extends>
|
||||
<header>blackgui/keyboardkeyview.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::CServerView</class>
|
||||
<extends>QTableView</extends>
|
||||
<header>blackgui/serverview.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::CSettingsFsxComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/settingsfsxcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user