Formatting, doxygen, typo aircrafts (to aircraft),

removed some debug output, {} in if statements
This commit is contained in:
Klaus Basan
2014-12-15 00:52:58 +01:00
parent ca19ee8053
commit 366769a6b8
43 changed files with 189 additions and 163 deletions

View File

@@ -90,7 +90,7 @@ namespace BlackCore
CUser user = station.getController();
users.push_back(user);
}
foreach(CAircraft aircraft, this->m_aircraftsInRange)
foreach(CAircraft aircraft, this->m_aircraftInRange)
{
CUser user = aircraft.getPilot();
users.push_back(user);
@@ -112,8 +112,8 @@ namespace BlackCore
users.push_back(ownAircraft.getPilot());
}
// do aircrafts first, this will handle most callsigns
foreach(CAircraft aircraft, this->m_aircraftsInRange)
// do aircraft first, this will handle most callsigns
foreach(CAircraft aircraft, this->m_aircraftInRange)
{
if (searchList.isEmpty()) break;
CCallsign callsign = aircraft.getCallsign();
@@ -210,7 +210,7 @@ namespace BlackCore
{
if (!this->m_network->isConnected()) return;
foreach(CAircraft aircraft, this->m_aircraftsInRange)
foreach(CAircraft aircraft, this->m_aircraftInRange)
{
this->m_network->sendFrequencyQuery(aircraft.getCallsign());
this->m_network->sendIcaoCodesQuery(aircraft.getCallsign());
@@ -244,7 +244,7 @@ namespace BlackCore
this->m_atcStationsBooked.applyIf(&CAtcStation::getCallsign, callsign, vm);
vm = CPropertyIndexVariantMap({CAircraft::IndexPilot, CUser::IndexRealName}, realname);
this->m_aircraftsInRange.applyIf(&CAircraft::getCallsign, callsign, vm);
this->m_aircraftInRange.applyIf(&CAircraft::getCallsign, callsign, vm);
// Client
vm = CPropertyIndexVariantMap({CClient::IndexUser, CUser::IndexRealName}, realname);
@@ -347,13 +347,14 @@ namespace BlackCore
m_atcStationsOnline.clear();
}
void CAirspaceMonitor::removeAllAircrafts()
void CAirspaceMonitor::removeAllAircraft()
{
m_aircraftWatchdog.removeAll();
for(CAircraft aircraft : m_aircraftsInRange)
for (CAircraft aircraft : m_aircraftInRange)
{
emit removedAircraft(aircraft.getCallsign());
m_aircraftsInRange.clear();
}
m_aircraftInRange.clear();
}
void CAirspaceMonitor::removeAllOtherClients()
@@ -521,20 +522,20 @@ namespace BlackCore
if (!icaoData.hasAircraftDesignator())
{
// empty so far, try to fetch from data file
qDebug() << "Empty ICAO info for " << callsign << icaoData;
CLogMessage(this).debug() << "Empty ICAO info for %1 %2" << callsign << icaoData;
CAircraftIcao icaoDataDataFile = this->m_vatsimDataFileReader->getIcaoInfo(callsign);
if (!icaoDataDataFile.hasAircraftDesignator()) return; // give up!
vm = CPropertyIndexVariantMap(CAircraft::IndexIcao, icaoData.toCVariant());
}
int changed = this->m_aircraftsInRange.applyIf(&CAircraft::getCallsign, callsign, vm, true);
if (changed > 0) {emit this->changedAircraftsInRange();}
int changed = this->m_aircraftInRange.applyIf(&CAircraft::getCallsign, callsign, vm, true);
if (changed > 0) { emit this->changedAircraftInRange(); }
}
void CAirspaceMonitor::ps_aircraftUpdateReceived(const CCallsign &callsign, const CAircraftSituation &situation, const CTransponder &transponder)
{
Q_ASSERT(BlackCore::isCurrentThreadCreatingThread(this));
CAircraftList list = this->m_aircraftsInRange.findByCallsign(callsign);
CAircraftList list = this->m_aircraftInRange.findByCallsign(callsign);
if (list.isEmpty())
{
// new aircraft
@@ -544,7 +545,7 @@ namespace BlackCore
aircraft.setTransponder(transponder);
aircraft.setCalculcatedDistanceToPosition(this->m_ownAircraft.getPosition()); // distance from myself
this->m_vatsimDataFileReader->updateWithVatsimDataFileData(aircraft);
this->m_aircraftsInRange.push_back(aircraft);
this->m_aircraftInRange.push_back(aircraft);
// and new client, there is a chance it has been created by
// custom packet first
@@ -579,22 +580,22 @@ namespace BlackCore
vm.addValue(CAircraft::IndexDistance, distance);
// here I expect always a changed value
this->m_aircraftsInRange.applyIf(&CAircraft::getCallsign, callsign, vm, false);
this->m_aircraftInRange.applyIf(&CAircraft::getCallsign, callsign, vm, false);
this->m_aircraftWatchdog.resetCallsign(callsign);
emit this->changedAircraftSituation(callsign, situation);
}
emit this->changedAircraftsInRange();
emit this->changedAircraftInRange();
}
void CAirspaceMonitor::ps_pilotDisconnected(const CCallsign &callsign)
{
Q_ASSERT(BlackCore::isCurrentThreadCreatingThread(this));
bool contains = this->m_aircraftsInRange.contains(&CAircraft::getCallsign, callsign);
bool contains = this->m_aircraftInRange.contains(&CAircraft::getCallsign, callsign);
this->m_aircraftWatchdog.removeCallsign(callsign);
if (contains)
{
this->m_aircraftsInRange.removeIf(&CAircraft::getCallsign, callsign);
this->m_aircraftInRange.removeIf(&CAircraft::getCallsign, callsign);
this->m_otherClients.removeIf(&CClient::getCallsign, callsign);
emit this->removedAircraft(callsign);
}
@@ -606,8 +607,8 @@ namespace BlackCore
// update
CPropertyIndexVariantMap vm({CAircraft::IndexCom1System, CComSystem::IndexActiveFrequency}, frequency.toCVariant());
int changed = this->m_aircraftsInRange.applyIf(&CAircraft::getCallsign, callsign, vm, true);
if (changed > 0) { emit this->changedAircraftsInRange(); }
int changed = this->m_aircraftInRange.applyIf(&CAircraft::getCallsign, callsign, vm, true);
if (changed > 0) { emit this->changedAircraftInRange(); }
}
} // namespace

View File

@@ -62,7 +62,7 @@ namespace BlackCore
BlackMisc::Aviation::CAtcStationList getAtcStationsBooked() const { return m_atcStationsBooked; }
//! Returns the current aircraft in range
BlackMisc::Aviation::CAircraftList getAircraftInRange() const { return m_aircraftsInRange; }
BlackMisc::Aviation::CAircraftList getAircraftInRange() const { return m_aircraftInRange; }
//! Returns the closest ATC station operating on the given frequency, if any
BlackMisc::Aviation::CAtcStation getAtcStationForComUnit(const BlackMisc::Aviation::CComSystem &comSystem);
@@ -86,8 +86,8 @@ namespace BlackCore
//! Connection status of an ATC station was changed
void changedAtcStationOnlineConnectionStatus(const BlackMisc::Aviation::CAtcStation &station, bool isConnected);
//! Aircrafts were changed
void changedAircraftsInRange();
//! Aircraft were changed
void changedAircraftInRange();
//! A new aircraft appeared
void addedAircraft(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &initialSituation);
@@ -98,8 +98,6 @@ namespace BlackCore
//! An aircraft disappeared
void removedAircraft(const BlackMisc::Aviation::CCallsign &callsign);
//! Sent a status message
void statusMessage(const BlackMisc::CStatusMessage &msg);
public slots:
//! Own aircraft updated
@@ -113,7 +111,7 @@ namespace BlackCore
void clear()
{
removeAllAtcStations();
removeAllAircrafts();
removeAllAircraft();
removeAllOtherClients();
m_metarCache.clear();
m_flightPlanCache.clear();
@@ -122,7 +120,7 @@ namespace BlackCore
private:
BlackMisc::Aviation::CAtcStationList m_atcStationsOnline;
BlackMisc::Aviation::CAtcStationList m_atcStationsBooked;
BlackMisc::Aviation::CAircraftList m_aircraftsInRange;
BlackMisc::Aviation::CAircraftList m_aircraftInRange;
BlackMisc::Network::CClientList m_otherClients;
QMap<BlackMisc::Aviation::CAirportIcao, BlackMisc::Aviation::CInformationMessage> m_metarCache;
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Aviation::CFlightPlan> m_flightPlanCache;
@@ -145,7 +143,7 @@ namespace BlackCore
void addVoiceCapabilitiesFromDataFile(BlackMisc::CPropertyIndexVariantMap &vm, const BlackMisc::Aviation::CCallsign &callsign);
void removeAllAtcStations();
void removeAllAircrafts();
void removeAllAircraft();
void removeAllOtherClients();
private slots:

View File

@@ -116,8 +116,6 @@ namespace BlackCore
//! Change settings
void changeSettings(uint typeValue);
private:
mutable QReadWriteLock m_lock; //!< thread safety
};
}

View File

@@ -81,10 +81,10 @@ namespace BlackCore
void changedAtcStationsBookedDigest();
//! Aircraft list has been changed
void changedAircraftsInRange();
void changedAircraftInRange();
//! Digest signal changedAircraftsInRange()
void changedAircraftsInRangeDigest();
//! Digest signal changedAircraftInRange()
void changedAircraftInRangeDigest();
//! Aircraft situation update
void changedAircraftSituation(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &situation);
@@ -128,7 +128,7 @@ namespace BlackCore
virtual const BlackMisc::Aviation::CAtcStationList getAtcStationsBooked() const = 0 ;
//! Aircraft list
virtual const BlackMisc::Aviation::CAircraftList getAircraftsInRange() const = 0;
virtual const BlackMisc::Aviation::CAircraftList getAircraftInRange() const = 0;
//! Get all users
virtual BlackMisc::Network::CUserList getUsers() const = 0;

View File

@@ -53,8 +53,8 @@ namespace BlackCore
return BlackMisc::Aviation::CAtcStationList();
}
//! \copydoc IContextNetwork::getAircraftsInRange()
virtual const BlackMisc::Aviation::CAircraftList getAircraftsInRange() const override
//! \copydoc IContextNetwork::getAircraftInRange()
virtual const BlackMisc::Aviation::CAircraftList getAircraftInRange() const override
{
logEmptyContextWarning(Q_FUNC_INFO);
return BlackMisc::Aviation::CAircraftList();

View File

@@ -74,7 +74,7 @@ namespace BlackCore
connect(this->m_airspace, &CAirspaceMonitor::changedAtcStationsOnline, this, &CContextNetwork::changedAtcStationsOnline);
connect(this->m_airspace, &CAirspaceMonitor::changedAtcStationsBooked, this, &CContextNetwork::changedAtcStationsBooked);
connect(this->m_airspace, &CAirspaceMonitor::changedAtcStationOnlineConnectionStatus, this, &CContextNetwork::changedAtcStationOnlineConnectionStatus);
connect(this->m_airspace, &CAirspaceMonitor::changedAircraftsInRange, this, &CContextNetwork::changedAircraftsInRange);
connect(this->m_airspace, &CAirspaceMonitor::changedAircraftInRange, this, &CContextNetwork::changedAircraftInRange);
connect(this->m_airspace, &CAirspaceMonitor::changedAircraftSituation, this, &CContextNetwork::changedAircraftSituation);
connect(this->getIContextOwnAircraft(), &IContextOwnAircraft::changedAircraft, this->m_airspace, &CAirspaceMonitor::setOwnAircraft);
connect(this->getIContextSimulator(), &IContextSimulator::ownAircraftModelChanged, this->m_airspace, &CAirspaceMonitor::setOwnAircraftModel);

View File

@@ -67,8 +67,8 @@ namespace BlackCore
return this->m_airspace->getAtcStationsBooked();
}
//! \copydoc IContextNetwork::getAircraftsInRange()
virtual const BlackMisc::Aviation::CAircraftList getAircraftsInRange() const override
//! \copydoc IContextNetwork::getAircraftInRange()
virtual const BlackMisc::Aviation::CAircraftList getAircraftInRange() const override
{
BlackMisc::CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
return this->m_airspace->getAircraftInRange();
@@ -163,7 +163,7 @@ namespace BlackCore
BlackMisc::CDigestSignal m_dsAtcStationsBookedChanged { this, &IContextNetwork::changedAtcStationsBooked, &IContextNetwork::changedAtcStationsBookedDigest, 750, 2 };
BlackMisc::CDigestSignal m_dsAtcStationsOnlineChanged { this, &IContextNetwork::changedAtcStationsOnline, &IContextNetwork::changedAtcStationsOnlineDigest, 750, 4 };
BlackMisc::CDigestSignal m_dsAircraftsInRangeChanged { this, &IContextNetwork::changedAircraftsInRange, &IContextNetwork::changedAircraftsInRangeDigest, 750, 4 };
BlackMisc::CDigestSignal m_dsAircraftsInRangeChanged { this, &IContextNetwork::changedAircraftInRange, &IContextNetwork::changedAircraftInRangeDigest, 750, 4 };
// for reading XML and VATSIM data files
CVatsimBookingReader *m_vatsimBookingReader = nullptr;

View File

@@ -44,13 +44,13 @@ namespace BlackCore
"changedAtcStationsOnlineDigest", this, SIGNAL(changedAtcStationsOnlineDigest()));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"changedAircraftsInRange", this, SIGNAL(changedAircraftsInRange()));
"changedAircraftInRange", this, SIGNAL(changedAircraftInRange()));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"changedAtcStationOnlineConnectionStatus", this, SIGNAL(changedAtcStationOnlineConnectionStatus(BlackMisc::Aviation::CAtcStation, bool)));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"changedAircraftsInRangeDigest", this, SIGNAL(changedAircraftsInRangeDigest()));
"changedAircraftInRangeDigest", this, SIGNAL(changedAircraftInRangeDigest()));
Q_ASSERT(s);
s = connection.connect(serviceName, IContextNetwork::ObjectPath(), IContextNetwork::InterfaceName(),
"connectionTerminated", this, SIGNAL(connectionTerminated()));
@@ -82,9 +82,9 @@ namespace BlackCore
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAtcStationList>(QLatin1Literal("getAtcStationsBooked"));
}
const BlackMisc::Aviation::CAircraftList CContextNetworkProxy::getAircraftsInRange() const
const BlackMisc::Aviation::CAircraftList CContextNetworkProxy::getAircraftInRange() const
{
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAircraftList>(QLatin1Literal("getAircraftsInRange"));
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CAircraftList>(QLatin1Literal("getAircraftInRange"));
}
BlackMisc::Network::CUserList CContextNetworkProxy::getUsers() const

View File

@@ -62,8 +62,8 @@ namespace BlackCore
//! \copydoc IContextNetwork::getAtcStationsBooked()
virtual const BlackMisc::Aviation::CAtcStationList getAtcStationsBooked() const override;
//! \copydoc IContextNetwork::getAircraftsInRange()
virtual const BlackMisc::Aviation::CAircraftList getAircraftsInRange() const override;
//! \copydoc IContextNetwork::getAircraftInRange()
virtual const BlackMisc::Aviation::CAircraftList getAircraftInRange() const override;
//! \copydoc IContextNetwork::connectToNetwork
virtual BlackMisc::CStatusMessage connectToNetwork(const BlackMisc::Network::CServer &server, uint mode) override;

View File

@@ -11,41 +11,29 @@
namespace BlackCore
{
//! \brief Interpolator, calculation inbetween positions
//! Interpolator, calculation inbetween positions
class IInterpolator
{
public:
//! \brief Default constructor
//! Default constructor
IInterpolator() {}
//! \brief Virtual destructor
//! Virtual destructor
virtual ~IInterpolator() {}
//! \brief Init object
//! Init object
virtual void initialize() = 0;
/*!
* \brief Add new aircraft situation
* \param situation
*/
//! Add new aircraft situation
virtual void addAircraftSituation(const BlackMisc::Aviation::CAircraftSituation &situation) = 0;
/*!
* \brief Do we have enough situations to start calculating?
* \return
*/
//! Do we have enough situations to start calculating?
virtual bool hasEnoughAircraftSituations() const = 0;
/*!
* \brief Get current aircraft situation
* \return
*/
//! Get current aircraft situation
virtual BlackMisc::Aviation::CAircraftSituation getCurrentSituation() = 0;
/*!
* \brief Get timestamp of the last received aircraft situation
* \return
*/
//! Get timestamp of the last received aircraft situation
virtual const QDateTime &getTimeOfLastReceivedSituation() const = 0;
};

View File

@@ -1,11 +1,13 @@
/* Copyright (C) 2013 VATSIM Community / authors
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
/*!
\file
*/
//! \file
#ifndef BLACKCORE_NETWORK_H
#define BLACKCORE_NETWORK_H

View File

@@ -49,7 +49,6 @@ namespace BlackCore
virtual bool isConnected() const = 0;
//! Can we connect?
//! \todo currently some code in XPlane implementation prevents to make the function const, can we fix this
virtual bool canConnect() const = 0;
//! Is time synchronization on?

View File

@@ -52,10 +52,10 @@ namespace BlackCore
this->setPendingNetworkReply(r);
}
CAircraftList CVatsimDataFileReader::getAircrafts() const
CAircraftList CVatsimDataFileReader::getAircraft() const
{
QReadLocker rl(&this->m_lock);
return this->m_aircrafts;
return this->m_aircraft;
}
CAtcStationList CVatsimDataFileReader::getAtcStations() const
@@ -78,7 +78,7 @@ namespace BlackCore
CUserList CVatsimDataFileReader::getPilotsForCallsigns(const CCallsignList &callsigns)
{
return this->getAircrafts().findByCallsigns(callsigns).transform(Predicates::MemberTransform(&CAircraft::getPilot));
return this->getAircraft().findByCallsigns(callsigns).transform(Predicates::MemberTransform(&CAircraft::getPilot));
}
CUserList CVatsimDataFileReader::getPilotsForCallsign(const CCallsign &callsign)
@@ -90,7 +90,7 @@ namespace BlackCore
CAircraftIcao CVatsimDataFileReader::getIcaoInfo(const CCallsign &callsign)
{
CAircraft aircraft = this->getAircrafts().findFirstByCallsign(callsign);
CAircraft aircraft = this->getAircraft().findFirstByCallsign(callsign);
return aircraft.getIcaoInfo();
}
@@ -109,7 +109,7 @@ namespace BlackCore
void CVatsimDataFileReader::updateWithVatsimDataFileData(CAircraft &aircraftToBeUdpated) const
{
this->getAircrafts().updateWithVatsimDataFileData(aircraftToBeUdpated);
this->getAircraft().updateWithVatsimDataFileData(aircraftToBeUdpated);
}
CUserList CVatsimDataFileReader::getControllersForCallsign(const CCallsign &callsign)
@@ -188,7 +188,7 @@ namespace BlackCore
CServerList voiceServers;
CServerList fsdServers;
CAtcStationList atcStations;
CAircraftList aircrafts;
CAircraftList aircraft;
QMap<CCallsign, CVoiceCapabilities> voiceCapabilities;
QDateTime updateTimestampFromFile;
@@ -259,7 +259,7 @@ namespace BlackCore
double groundspeed = clientPartsMap["groundspeed"].toDouble();
CAircraftSituation situation(position, altitude);
situation.setGroundspeed(CSpeed(groundspeed, CSpeedUnit::kts()));
CAircraft aircraft(user.getCallsign().getStringAsSet(), user, situation);
CAircraft currentAircraft(user.getCallsign().getStringAsSet(), user, situation);
QString icaoCode = clientPartsMap["planned_aircraft"];
if (!icaoCode.isEmpty())
@@ -270,7 +270,7 @@ namespace BlackCore
icaoCode = icaoCode.replace(reg, "").trimmed().toUpper();
if (CAircraftIcao::isValidDesignator(icaoCode))
{
aircraft.setIcaoInfo(CAircraftIcao(icaoCode));
currentAircraft.setIcaoInfo(CAircraftIcao(icaoCode));
}
else
{
@@ -278,7 +278,7 @@ namespace BlackCore
}
}
aircrafts.push_back(aircraft);
aircraft.push_back(currentAircraft);
}
else if (clientType.startsWith('a'))
{
@@ -340,7 +340,7 @@ namespace BlackCore
{
QWriteLocker wl(&this->m_lock);
this->setUpdateTimestamp(updateTimestampFromFile);
this->m_aircrafts = aircrafts;
this->m_aircraft = aircraft;
this->m_atcStations = atcStations;
this->m_voiceServers = voiceServers;
this->m_fsdServers = fsdServers;

View File

@@ -43,7 +43,7 @@ namespace BlackCore
//! Get aircrafts
//! \threadsafe
BlackMisc::Aviation::CAircraftList getAircrafts() const;
BlackMisc::Aviation::CAircraftList getAircraft() const;
//! Get aircrafts
//! \threadsafe
@@ -104,7 +104,7 @@ namespace BlackCore
BlackMisc::Network::CServerList m_voiceServers;
BlackMisc::Network::CServerList m_fsdServers;
BlackMisc::Aviation::CAtcStationList m_atcStations;
BlackMisc::Aviation::CAircraftList m_aircrafts;
BlackMisc::Aviation::CAircraftList m_aircraft;
QMap<BlackMisc::Aviation::CCallsign, BlackMisc::Network::CVoiceCapabilities> m_voiceCapabilities;
//! Split line and assign values to their corresponding attribute names

View File

@@ -61,12 +61,7 @@ namespace BlackGui
bool visible = (this->isVisibleWidget() && this->currentWidget() == this->ui->tb_AircraftsInRange);
if (this->countAircrafts() < 1 || visible)
{
this->ui->tvp_AircraftsInRange->updateContainer(this->getIContextNetwork()->getAircraftsInRange());
}
else
{
// KWB remove: qDebug() will be removed soon
qDebug() << this->objectName() << "Skipping update (aircrafts)";
this->ui->tvp_AircraftsInRange->updateContainer(this->getIContextNetwork()->getAircraftInRange());
}
}
if (this->getIContextSimulator()->isConnected())
@@ -76,10 +71,6 @@ namespace BlackGui
{
this->ui->tvp_AirportsInRange->updateContainer(this->getIContextSimulator()->getAirportsInRange());
}
else
{
qDebug() << this->objectName() << "Skipping update (airports)";
}
}
}

View File

@@ -27,7 +27,7 @@ namespace BlackGui
{
CAtcStationComponent::CAtcStationComponent(QWidget *parent) :
QTabWidget(parent),
ui(new Ui::CAtcStationComponent), m_updateTimer(nullptr)
ui(new Ui::CAtcStationComponent)
{
ui->setupUi(this);
this->tabBar()->setExpanding(false);

View File

@@ -113,7 +113,7 @@ namespace BlackGui
private:
QScopedPointer<Ui::CAtcStationComponent> ui;
CUpdateTimer *m_updateTimer;
CUpdateTimer *m_updateTimer = nullptr;
QDateTime m_timestampLastReadOnlineStations = CUpdateTimer::epoch(); //!< stations read
QDateTime m_timestampOnlineStationsChanged = CUpdateTimer::epoch(); //!< stations marked as changed
QDateTime m_timestampLastReadBookedStations = CUpdateTimer::epoch(); //!< stations read

View File

@@ -105,7 +105,7 @@ namespace BlackGui
// 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_SettingsGuiAircraftRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedAircraftUpdateInterval);
this->connect(this->ui->hs_SettingsGuiAtcRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedAtcStationsUpdateInterval);
this->connect(this->ui->hs_SettingsGuiUserRefreshTime, &QSlider::valueChanged, this, &CSettingsComponent::changedUsersUpdateInterval);

View File

@@ -76,7 +76,7 @@ namespace BlackGui
void changedAtcStationsUpdateInterval(int seconds);
//! Update interval changed (aircrafts)
void changedAircraftsUpdateInterval(int seconds);
void changedAircraftUpdateInterval(int seconds);
//! Update interval changed (users)
void changedUsersUpdateInterval(int seconds);

View File

@@ -103,6 +103,9 @@
<property name="documentTitle">
<string>UNICOM</string>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
<property name="readOnly">
<bool>true</bool>
</property>

View File

@@ -22,9 +22,7 @@ namespace BlackGui
namespace Models
{
/*!
* Aircraft list model
*/
//! Aircraft list model
class CAircraftListModel : public CListModelBase<BlackMisc::Aviation::CAircraft, BlackMisc::Aviation::CAircraftList>
{

View File

@@ -22,5 +22,5 @@ namespace BlackGui
{
this->standardInit(new CClientListModel(this));
}
}
}
} // namespace
} // namespace

View File

@@ -64,11 +64,11 @@ namespace BlackMisc
bool CAircraftIcao::matchesWildcardIcao(const CAircraftIcao &otherIcao) const
{
if ((*this) == otherIcao) return true;
if (otherIcao.hasAircraftDesignator() && otherIcao.getAircraftDesignator() != this->getAircraftDesignator()) return false;
if (otherIcao.hasAirlineDesignator() && otherIcao.getAirlineDesignator() != this->getAirlineDesignator()) return false;
if (otherIcao.hasAircraftCombinedType() && otherIcao.getAircraftCombinedType() != this->getAircraftCombinedType()) return false;
if (otherIcao.hasLivery() && otherIcao.getLivery() != this->getLivery()) return false;
if (otherIcao.hasAircraftColor() && otherIcao.getAircraftColor() != this->getAircraftColor()) return false;
if (otherIcao.hasAircraftDesignator() && otherIcao.getAircraftDesignator() != this->getAircraftDesignator()) { return false; }
if (otherIcao.hasAirlineDesignator() && otherIcao.getAirlineDesignator() != this->getAirlineDesignator()) { return false; }
if (otherIcao.hasAircraftCombinedType() && otherIcao.getAircraftCombinedType() != this->getAircraftCombinedType()) { return false; }
if (otherIcao.hasLivery() && otherIcao.getLivery() != this->getLivery()) { return false; }
if (otherIcao.hasAircraftColor() && otherIcao.getAircraftColor() != this->getAircraftColor()) { return false; }
return true;
}

View File

@@ -25,9 +25,7 @@ namespace BlackMisc
{
namespace Aviation
{
/*!
* Value object encapsulating a list of aircrafts.
*/
//! Value object encapsulating a list of aircrafts.
class CAircraftList : public CSequence<CAircraft>
{
public:

View File

@@ -103,10 +103,6 @@ namespace BlackMisc
ICoordinateGeodetic::propertyByIndex(index) :
CValueObject::propertyByIndex(index);
}
Q_ASSERT_X(false, "CAirport", "index unknown");
QString m = QString("no property, index ").append(index.toQString());
return CVariant::fromValue(m);
}
/*

View File

@@ -30,9 +30,7 @@ inline void initBlackMiscResources()
Q_INIT_RESOURCE(blackmisc);
}
/*!
* Free functions in BlackMisc
*/
//! Free functions in BlackMisc
namespace BlackMisc
{
namespace PhysicalQuantities
@@ -103,9 +101,7 @@ namespace BlackMisc
//! Init resources
void initResources();
/*!
* Checked version from QVariant
*/
//! Checked version from QVariant
template <class T> void setFromQVariant(T *value, const QVariant &variant)
{
Q_ASSERT(variant.canConvert<T>());
@@ -135,10 +131,8 @@ namespace BlackMisc
*/
QVariant complexQtTypeFromDbusArgument(const QDBusArgument &argument, int type);
/*!
* \brief Display all user metatypes
* \remarks Used in order to debug code, do not remove
*/
//! brief Display all user metatypes
//! \remarks Used in order to debug code, do not remove
void displayAllUserMetatypesTypes();
/*!

View File

@@ -13,11 +13,6 @@
namespace BlackMisc
{
/*
* Constructor
*/
CPropertyIndex::CPropertyIndex() = default;
/*
* Non nested index
*/

View File

@@ -59,7 +59,7 @@ namespace BlackMisc
};
//! Default constructor.
CPropertyIndex();
CPropertyIndex() = default;
//! Non nested index
CPropertyIndex(int singleProperty);

View File

@@ -1,21 +1,23 @@
/* Copyright (C) 2013 VATSIM Community / contributors
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKSIM_FREEFUNCTIONS_H
#define BLACKSIM_FREEFUNCTIONS_H
/*!
* Free functions in BlackSim
*/
//! Free functions in BlackSim
namespace BlackSim
{
/*!
* \brief Register all relevant metadata in BlackMisc
*/
//! Register all relevant metadata in BlackMisc
void registerMetadata();
} // BlackSim
} // namespace
#endif // guard

View File

@@ -1,3 +1,12 @@
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "bcdconversions.h"
using namespace BlackMisc::PhysicalQuantities;

View File

@@ -1,3 +1,14 @@
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKSIM_FSCOMMON_BCDCONVERSIONS_H
#define BLACKSIM_FSCOMMON_BCDCONVERSIONS_H
@@ -10,9 +21,7 @@ namespace BlackSim
namespace FsCommon
{
/*!
* \brief BCD conversions for FS
*/
//! BCD conversions for FS
class CBcdConversions
{
public:

View File

@@ -1,3 +1,12 @@
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "fsxsimulatorsetup.h"
#include "../../blackmisc/project.h"

View File

@@ -1,3 +1,12 @@
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "simconnectutilities.h"
#include <QFile>
#include <QTextStream>

View File

@@ -7,8 +7,6 @@
* contained in the LICENSE file.
*/
//! \file
#include "simulatorinfo.h"
#include "blackmisc/blackmiscfreefunctions.h"

View File

@@ -7,6 +7,8 @@
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKSIM_SIMULATORINFO_H
#define BLACKSIM_SIMULATORINFO_H

View File

@@ -1,7 +1,11 @@
/* Copyright (C) 2013 VATSIM Community / authors
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "simulatorinfolist.h"

View File

@@ -1,7 +1,11 @@
/* Copyright (C) 2013 VATSIM Community / authors
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
//! \file

View File

@@ -1,3 +1,12 @@
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "simulatormodelmappings.h"
namespace BlackSim

View File

@@ -17,9 +17,7 @@
namespace BlackSim
{
/*!
* \brief Model mappings
*/
//! Model mappings
class ISimulatorModelMappings : public QObject
{
Q_OBJECT

View File

@@ -1,3 +1,12 @@
/* Copyright (C) 2013
* swift Project Community / Contributors
*
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#include "simulatorsetup.h"
namespace BlackSim

View File

@@ -6,6 +6,7 @@
* including this file, may be copied, modified, propagated, or distributed except according to the terms
* contained in the LICENSE file.
*/
#ifndef BLACKSIMPLUGIN_FS9_HOST_NODE_H
#define BLACKSIMPLUGIN_FS9_HOST_NODE_H

View File

@@ -46,14 +46,16 @@ namespace BlackSimPlugin
virtual BlackSim::CSimulatorInfo getSimulatorInfo() const override;
};
//! \brief FSX Simulator Implementation
//! FSX Simulator Implementation
class CSimulatorFs9 : public BlackCore::ISimulator
{
Q_OBJECT
public:
//! \brief Constructor
//! Constructor
CSimulatorFs9(QObject *parent = nullptr);
//! Destructor
virtual ~CSimulatorFs9();
//! \copydoc ISimulator::isConnected()

View File

@@ -167,7 +167,7 @@ void SwiftGuiStd::initGuiSignals()
// sliders
connect(this->ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedUsersUpdateInterval, this->ui->comp_MainInfoArea->getUserComponent(), &CUserComponent::setUpdateIntervalSeconds);
connect(this->ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedAircraftsUpdateInterval, this->ui->comp_MainInfoArea->getAircraftComponent(), &CAircraftComponent::setUpdateIntervalSeconds);
connect(this->ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedAircraftUpdateInterval, this->ui->comp_MainInfoArea->getAircraftComponent(), &CAircraftComponent::setUpdateIntervalSeconds);
connect(this->ui->comp_MainInfoArea->getSettingsComponent(), &CSettingsComponent::changedAtcStationsUpdateInterval, this->ui->comp_MainInfoArea->getAtcStationComponent(), &::CAtcStationComponent::setUpdateIntervalSeconds);
// login