mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 15:25:34 +08:00
Formatting
This commit is contained in:
@@ -119,7 +119,7 @@ namespace BlackGui
|
||||
}
|
||||
|
||||
this->m_matcher.setDefaultModel(CModelMatcherComponent::defaultModel());
|
||||
const CAircraftModel matched = this->m_matcher.getClosestMatch(remoteAircraft, &msgs);
|
||||
const CAircraftModel matched = this->m_matcher.getClosestMatch(remoteAircraft, &msgs); // test model matching
|
||||
ui->te_Results->setText(matched.toQString(true));
|
||||
ui->tvp_ResultMessages->updateContainer(msgs);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace BlackGui
|
||||
ui->setupUi(this);
|
||||
ui->le_Callsign->setValidator(new CUpperCaseValidator(this));
|
||||
ui->le_Callsign->setCompleter(new QCompleter(ui->le_Callsign));
|
||||
this->m_timer.setInterval(20 * 1000);
|
||||
this->m_updateCompleterTimer.setInterval(20 * 1000);
|
||||
this->initGui();
|
||||
this->m_text.setDefaultStyleSheet(CStatusMessageList::htmlStyleSheet());
|
||||
connect(ui->le_Callsign, &QLineEdit::returnPressed, this, &CModelMatcherLogComponent::ps_callsignEntered);
|
||||
@@ -48,7 +48,7 @@ namespace BlackGui
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::changedLogOrDebugSettings, this, &CModelMatcherLogComponent::ps_valuesChanged);
|
||||
connect(sGui->getIContextNetwork(), &IContextNetwork::connectionStatusChanged, this, &CModelMatcherLogComponent::ps_connectionStatusChanged);
|
||||
}
|
||||
connect(&this->m_timer, &QTimer::timeout, this, &CModelMatcherLogComponent::ps_updateCallsignCompleter);
|
||||
connect(&this->m_updateCompleterTimer, &QTimer::timeout, this, &CModelMatcherLogComponent::ps_updateCallsignCompleter);
|
||||
}
|
||||
|
||||
CModelMatcherLogComponent::~CModelMatcherLogComponent()
|
||||
@@ -57,14 +57,14 @@ namespace BlackGui
|
||||
void CModelMatcherLogComponent::initGui()
|
||||
{
|
||||
const bool needCallsigns = this->enabledMessages();
|
||||
if (needCallsigns && !this->m_timer.isActive())
|
||||
if (needCallsigns && !this->m_updateCompleterTimer.isActive())
|
||||
{
|
||||
this->m_timer.start();
|
||||
this->m_updateCompleterTimer.start();
|
||||
this->ps_updateCallsignCompleter();
|
||||
}
|
||||
else if (!needCallsigns)
|
||||
{
|
||||
this->m_timer.stop();
|
||||
this->m_updateCompleterTimer.stop();
|
||||
}
|
||||
|
||||
// avoid signal roundtrip
|
||||
|
||||
@@ -35,11 +35,11 @@ namespace BlackGui
|
||||
explicit CModelMatcherLogComponent(QWidget *parent = nullptr);
|
||||
|
||||
//! Constructor
|
||||
~CModelMatcherLogComponent();
|
||||
virtual ~CModelMatcherLogComponent();
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CModelMatcherLogComponent> ui;
|
||||
QTimer m_timer { this };
|
||||
QTimer m_updateCompleterTimer { this };
|
||||
QTextDocument m_text { this };
|
||||
|
||||
//! Init
|
||||
|
||||
Reference in New Issue
Block a user