mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
Feature request based on new VATSIM code of conduct, allow empty homebase
This commit is contained in:
committed by
Mat Sutcliffe
parent
4030a1a730
commit
740cb5a536
@@ -76,6 +76,11 @@ namespace BlackGui
|
||||
return ui->le_Icao->text().trimmed().toUpper();
|
||||
}
|
||||
|
||||
bool CAirportSmallCompleter::isEmpty() const
|
||||
{
|
||||
return ui->le_Icao->text().isEmpty();
|
||||
}
|
||||
|
||||
void CAirportSmallCompleter::setReadOnly(bool readOnly)
|
||||
{
|
||||
ui->le_Icao->setReadOnly(readOnly);
|
||||
@@ -88,6 +93,15 @@ namespace BlackGui
|
||||
m_current = CAirport();
|
||||
}
|
||||
|
||||
void CAirportSmallCompleter::clearIfInvalidCode(bool strictValidation)
|
||||
{
|
||||
const CAirportIcaoCode icao = this->getAirportIcaoCode();
|
||||
if (!icao.hasValidIcaoCode(strictValidation))
|
||||
{
|
||||
this->clear();
|
||||
}
|
||||
}
|
||||
|
||||
void CAirportSmallCompleter::onIcaoChanged()
|
||||
{
|
||||
if (!sGui && !sGui->hasWebDataServices()) { return; }
|
||||
|
||||
@@ -49,12 +49,18 @@ namespace BlackGui
|
||||
//! The raw ICAO code text
|
||||
QString getIcaoText() const;
|
||||
|
||||
//! Empty field
|
||||
bool isEmpty() const;
|
||||
|
||||
//! Read only
|
||||
void setReadOnly(bool readOnly);
|
||||
|
||||
//! Clear
|
||||
void clear();
|
||||
|
||||
//! Clear if code not valid
|
||||
void clearIfInvalidCode(bool strictValidation);
|
||||
|
||||
signals:
|
||||
//! Airport has been changed
|
||||
void changedAirport(const BlackMisc::Aviation::CAirport &airport);
|
||||
|
||||
Reference in New Issue
Block a user