mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 08:55:43 +08:00
Some minor tweaks and fixes
* added names to timers * Some DBus code formatting * missing GUI element names
This commit is contained in:
@@ -69,7 +69,7 @@ namespace BlackCore
|
|||||||
this->initDBusConnection(dbusAddress);
|
this->initDBusConnection(dbusAddress);
|
||||||
if (!this->m_dbusConnection.isConnected())
|
if (!this->m_dbusConnection.isConnected())
|
||||||
{
|
{
|
||||||
QString notConnected("DBus connection failed");
|
QString notConnected("DBus connection failed:");
|
||||||
QString e = this->m_dbusConnection.lastError().message();
|
QString e = this->m_dbusConnection.lastError().message();
|
||||||
if (!e.isEmpty()) notConnected.append(" ").append(e);
|
if (!e.isEmpty()) notConnected.append(" ").append(e);
|
||||||
Q_ASSERT_X(false, "CRuntime::init", notConnected.toUtf8().constData());
|
Q_ASSERT_X(false, "CRuntime::init", notConnected.toUtf8().constData());
|
||||||
@@ -311,13 +311,19 @@ namespace BlackCore
|
|||||||
|
|
||||||
void CRuntime::initDBusConnection(const QString &address)
|
void CRuntime::initDBusConnection(const QString &address)
|
||||||
{
|
{
|
||||||
if (this->m_initDBusConnection) return;
|
if (this->m_initDBusConnection) { return; }
|
||||||
if (address.isEmpty() || address == CDBusServer::sessionDBusServer())
|
if (address.isEmpty() || address == CDBusServer::sessionDBusServer())
|
||||||
|
{
|
||||||
this->m_dbusConnection = QDBusConnection::sessionBus();
|
this->m_dbusConnection = QDBusConnection::sessionBus();
|
||||||
|
}
|
||||||
else if (address == CDBusServer::systemDBusServer())
|
else if (address == CDBusServer::systemDBusServer())
|
||||||
|
{
|
||||||
this->m_dbusConnection = QDBusConnection::sessionBus();
|
this->m_dbusConnection = QDBusConnection::sessionBus();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
this->m_dbusConnection = QDBusConnection::connectToPeer(address, "BlackBoxRuntime");
|
this->m_dbusConnection = QDBusConnection::connectToPeer(address, "BlackBoxRuntime");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const IContextApplication *CRuntime::getIContextApplication() const
|
const IContextApplication *CRuntime::getIContextApplication() const
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
this->m_logoffCountdownTimer = new QTimer(this);
|
this->m_logoffCountdownTimer = new QTimer(this);
|
||||||
|
this->m_logoffCountdownTimer->setObjectName("CLoginComponent:m_logoffCountdownTimer");
|
||||||
this->ui->pb_LogoffTimeout->setMaximum(LogoffIntervalSeconds);
|
this->ui->pb_LogoffTimeout->setMaximum(LogoffIntervalSeconds);
|
||||||
this->ui->pb_LogoffTimeout->setValue(LogoffIntervalSeconds);
|
this->ui->pb_LogoffTimeout->setValue(LogoffIntervalSeconds);
|
||||||
connect(this->m_logoffCountdownTimer, &QTimer::timeout, this, &CLoginComponent::ps_logoffCountdown);
|
connect(this->m_logoffCountdownTimer, &QTimer::timeout, this, &CLoginComponent::ps_logoffCountdown);
|
||||||
|
|||||||
@@ -309,7 +309,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="vs_SettingsSimulatorComponent">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
@@ -322,25 +322,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="BlackGui::Components::CSettingsFsxComponent" name="comp_SettingsSimulatorFsx">
|
<widget class="BlackGui::Components::CSettingsFsxComponent" name="comp_SettingsSimulatorFsx"/>
|
||||||
<layout class="QVBoxLayout" name="vl_SettingsSimulatorSpecific">
|
|
||||||
<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>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
connect(m_redrawTimer, &QTimer::timeout, this, &CLevelMeter::ps_redrawTimerExpired);
|
connect(m_redrawTimer, &QTimer::timeout, this, &CLevelMeter::ps_redrawTimerExpired);
|
||||||
m_redrawTimer->start(RedrawInterval);
|
m_redrawTimer->start(RedrawInterval);
|
||||||
|
m_redrawTimer->setObjectName("CLevelMeter");
|
||||||
}
|
}
|
||||||
|
|
||||||
CLevelMeter::~CLevelMeter()
|
CLevelMeter::~CLevelMeter()
|
||||||
|
|||||||
@@ -20,17 +20,15 @@
|
|||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
//! Widget which displays a vertical audio level meter, indicating the
|
||||||
* Widget which displays a vertical audio level meter, indicating the
|
//! RMS and peak levels of the window of audio samples most recently analyzed
|
||||||
* RMS and peak levels of the window of audio samples most recently analyzed
|
//! by the Engine.
|
||||||
* by the Engine.
|
|
||||||
*/
|
|
||||||
class CLevelMeter : public QWidget
|
class CLevelMeter : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CLevelMeter(QWidget *parent = 0);
|
CLevelMeter(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
~CLevelMeter();
|
~CLevelMeter();
|
||||||
@@ -76,7 +74,7 @@ namespace BlackGui
|
|||||||
//! Time at which m_peakHoldLevel was last changed.
|
//! Time at which m_peakHoldLevel was last changed.
|
||||||
QTime m_peakHoldLevelChanged;
|
QTime m_peakHoldLevelChanged;
|
||||||
|
|
||||||
QTimer *m_redrawTimer;
|
QTimer *m_redrawTimer = nullptr;
|
||||||
QColor m_rmsColor;
|
QColor m_rmsColor;
|
||||||
QColor m_peakColor;
|
QColor m_peakColor;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
// timer
|
// timer
|
||||||
this->m_timerStatusBar = new QTimer(this);
|
this->m_timerStatusBar = new QTimer(this);
|
||||||
|
this->m_timerStatusBar->setObjectName(this->objectName().append(":m_timerStatusBar"));
|
||||||
this->m_timerStatusBar->setSingleShot(true);
|
this->m_timerStatusBar->setSingleShot(true);
|
||||||
connect(this->m_timerStatusBar, &QTimer::timeout, this, &CManagedStatusBar::ps_clearStatusBar);
|
connect(this->m_timerStatusBar, &QTimer::timeout, this, &CManagedStatusBar::ps_clearStatusBar);
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ namespace BlackGui
|
|||||||
CTransponderModeSelector::CTransponderModeSelector(QWidget *parent) : QComboBox(parent)
|
CTransponderModeSelector::CTransponderModeSelector(QWidget *parent) : QComboBox(parent)
|
||||||
{
|
{
|
||||||
QComboBox::insertItems(0, CTransponderModeSelector::modes());
|
QComboBox::insertItems(0, CTransponderModeSelector::modes());
|
||||||
|
this->m_resetTimer.setObjectName(this->objectName().append(":m_resetTimer"));
|
||||||
connect(&this->m_resetTimer, &QTimer::timeout, this, &CTransponderModeSelector::resetTransponderMode);
|
connect(&this->m_resetTimer, &QTimer::timeout, this, &CTransponderModeSelector::resetTransponderMode);
|
||||||
connect(this, &CTransponderModeSelector::currentTextChanged, this, &CTransponderModeSelector::setSelectedTransponderModeAsString);
|
connect(this, &CTransponderModeSelector::currentTextChanged, this, &CTransponderModeSelector::setSelectedTransponderModeAsString);
|
||||||
this->m_resetTimer.setInterval(5000);
|
this->m_resetTimer.setInterval(5000);
|
||||||
|
|||||||
@@ -7,6 +7,8 @@
|
|||||||
* contained in the LICENSE file.
|
* contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKMISC_NETWORK_USERLIST_H
|
#ifndef BLACKMISC_NETWORK_USERLIST_H
|
||||||
#define BLACKMISC_NETWORK_USERLIST_H
|
#define BLACKMISC_NETWORK_USERLIST_H
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user