mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-08 18:55:36 +08:00
refs #396 subfolders and renamed callsign list to callsign set
* subfolder audio * subfolder geo * adjusted samples, tests ....
This commit is contained in:
committed by
Roland Winklmeier
parent
32f60722c8
commit
0ab755d510
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "samplesperformance.h"
|
||||
#include "blackmisc/aviation/aircraftsituationlist.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/aviation/altitude.h"
|
||||
#include "blackmisc/testing.h"
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blacksim/blacksimfreefunctions.h"
|
||||
#include "servicetool.h"
|
||||
#include "blackcore/dbus_server.h"
|
||||
#include <QDBusMetaType>
|
||||
@@ -27,7 +26,6 @@ int main(int argc, char *argv[])
|
||||
// is just for testing, I did not split it up
|
||||
|
||||
BlackMisc::registerMetadata();
|
||||
BlackSim::registerMetadata();
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
// trying to get the arguments into a list
|
||||
|
||||
@@ -8,16 +8,14 @@ TEMPLATE = app
|
||||
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += blackmisc blackcore blacksim
|
||||
CONFIG += blackmisc blackcore
|
||||
|
||||
DEPENDPATH += . ../../src/blackmisc ../../src/blackcore ../../src/blacksim
|
||||
DEPENDPATH += . ../../src/blackmisc ../../src/blackcore
|
||||
INCLUDEPATH += . ../../src
|
||||
|
||||
win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib \
|
||||
../../lib/blacksim.lib \
|
||||
../../lib/blackcore.lib
|
||||
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a \
|
||||
../../lib/libblacksim.a \
|
||||
../../lib/libblackcore.a
|
||||
|
||||
DESTDIR = ../../bin
|
||||
|
||||
@@ -25,7 +25,7 @@ using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Math;
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackSim::FsCommon;
|
||||
using namespace BlackMisc::Simulation::FsCommon;
|
||||
using namespace BlackMiscTest;
|
||||
|
||||
namespace BlackMiscTest
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/airportlist.h"
|
||||
#include "blackmisc/nwclientlist.h"
|
||||
#include "blacksim/fscommon/aircraftcfgentrieslist.h"
|
||||
#include "blackmisc/simulation/fscommon/aircraftcfgentrieslist.h"
|
||||
#include <QCoreApplication>
|
||||
#include <QProcess>
|
||||
#include <QDBusConnection>
|
||||
@@ -101,7 +101,7 @@ namespace BlackMiscTest
|
||||
* \param number
|
||||
* \return
|
||||
*/
|
||||
static BlackSim::FsCommon::CAircraftCfgEntriesList getAircraftCfgEntries(int number);
|
||||
static BlackMisc::Simulation::FsCommon::CAircraftCfgEntriesList getAircraftCfgEntries(int number);
|
||||
|
||||
/*!
|
||||
* \brief Get airports
|
||||
|
||||
@@ -15,7 +15,7 @@ using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
using namespace BlackMisc::Network;
|
||||
using namespace BlackSim::FsCommon;
|
||||
using namespace BlackMisc::Simulation::FsCommon;
|
||||
|
||||
namespace BlackMiscTest
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "blackmisc/pqallquantities.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/math/math.h"
|
||||
#include "blacksim/fscommon/aircraftcfgentrieslist.h"
|
||||
#include "blackmisc/simulation/fscommon/aircraftcfgentrieslist.h"
|
||||
#include "servicetool.h"
|
||||
#include <QObject>
|
||||
#include <QDebug>
|
||||
@@ -149,7 +149,7 @@ namespace BlackMiscTest
|
||||
BlackMisc::Aviation::CAtcStationList getAtcStationList(int number) const;
|
||||
|
||||
//! return n aircraft cfg entries
|
||||
BlackSim::FsCommon::CAircraftCfgEntriesList getAircraftCfgEntriesList(int number) const;
|
||||
BlackMisc::Simulation::FsCommon::CAircraftCfgEntriesList getAircraftCfgEntriesList(int number) const;
|
||||
|
||||
//! Get object paths
|
||||
QList<QDBusObjectPath> getObjectPaths(int number) const;
|
||||
|
||||
@@ -13,8 +13,15 @@
|
||||
#define BLACKMISCTEST_TESTSERVICE_INTERFACE_H
|
||||
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/blackmiscallvalueclasses.h"
|
||||
#include "blacksim/fscommon/aircraftcfgentrieslist.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/track.h"
|
||||
#include "blackmisc/aviation/transponder.h"
|
||||
#include "blackmisc/aviation/aircraftlist.h"
|
||||
#include "blackmisc/aviation/airportlist.h"
|
||||
#include "blackmisc/simulation/fscommon/aircraftcfgentrieslist.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/nwclientlist.h"
|
||||
#include "blackmisc/variantlist.h"
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtCore/QList>
|
||||
@@ -27,26 +34,25 @@
|
||||
namespace BlackMiscTest
|
||||
{
|
||||
|
||||
/*!
|
||||
* Proxy class for interface blackmisctest.testservice
|
||||
*/
|
||||
//! Proxy class for interface blackmisctest.testservice
|
||||
class TestServiceInterface: public QDBusAbstractInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Interface name
|
||||
static inline const char *staticInterfaceName() { return "blackmisctest.testservice"; }
|
||||
|
||||
public:
|
||||
//! \brief Constructor
|
||||
//! Constructor
|
||||
TestServiceInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);
|
||||
|
||||
//! \brief Destructor
|
||||
//! Destructor
|
||||
~TestServiceInterface();
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
//! \brief DBus calls
|
||||
//! DBus calls
|
||||
//! @{
|
||||
inline QDBusPendingReply<BlackMisc::Aviation::CAtcStation> getAtcStation()
|
||||
{
|
||||
@@ -54,7 +60,7 @@ namespace BlackMiscTest
|
||||
return asyncCallWithArgumentList(QLatin1String("getAtcStation"), argumentList);
|
||||
}
|
||||
|
||||
inline QDBusPendingReply<BlackSim::FsCommon::CAircraftCfgEntriesList> getAircraftCfgEntriesList(int number)
|
||||
inline QDBusPendingReply<BlackMisc::Simulation::FsCommon::CAircraftCfgEntriesList> getAircraftCfgEntriesList(int number)
|
||||
{
|
||||
QList<QVariant> argumentList;
|
||||
argumentList << QVariant::fromValue(number);
|
||||
@@ -287,7 +293,7 @@ namespace BlackMiscTest
|
||||
|
||||
|
||||
Q_SIGNALS:
|
||||
//! \brief send message
|
||||
//! send message
|
||||
void sendStringMessage(const QString &message);
|
||||
};
|
||||
} // namespace
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "samplesgeo.h"
|
||||
#include "blackmisc/geolatitude.h"
|
||||
#include "blackmisc/geolongitude.h"
|
||||
#include "blackmisc/geo/latitude.h"
|
||||
#include "blackmisc/geo/longitude.h"
|
||||
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
@@ -9,23 +9,17 @@
|
||||
namespace BlackMiscTest
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Samples for vector / matrix
|
||||
*/
|
||||
class CSamplesGeo
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Run the samples
|
||||
*/
|
||||
static int samples();
|
||||
//! Samples for geo
|
||||
class CSamplesGeo
|
||||
{
|
||||
public:
|
||||
//! Run the samples
|
||||
static int samples();
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief Avoid init
|
||||
*/
|
||||
CSamplesGeo();
|
||||
};
|
||||
private:
|
||||
//! Constructor
|
||||
CSamplesGeo();
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blacksim/blacksimfreefunctions.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "samplesfscommon.h"
|
||||
#include "samplesfsx.h"
|
||||
@@ -29,7 +28,6 @@ int main(int argc, char *argv[])
|
||||
QTextStream streamIn(stdin);
|
||||
QTextStream streamOut(stdout);
|
||||
BlackMisc::registerMetadata();
|
||||
BlackSim::registerMetadata();
|
||||
|
||||
streamOut << "Run samples:" << endl;
|
||||
streamOut << "1 .. FS common / Simulation" << endl;
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
#include "samplesfscommon.h"
|
||||
#include "blackmisc/sampleutils.h"
|
||||
#include "blacksim/fscommon/aircraftcfgentrieslist.h"
|
||||
#include "blacksim/fscommon/aircraftmapper.h"
|
||||
#include "blackmisc/simulation/fscommon/aircraftcfgentrieslist.h"
|
||||
#include "blackmisc/simulation/fscommon/aircraftmapper.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QFuture>
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <QTemporaryFile>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackSim::FsCommon;
|
||||
using namespace BlackMisc::Simulation::FsCommon;
|
||||
|
||||
namespace BlackSimTest
|
||||
{
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
*/
|
||||
|
||||
#include "samplesfsx.h"
|
||||
#include "blacksim/blacksimfreefunctions.h"
|
||||
#include "blacksim/fsx/simconnectutilities.h"
|
||||
#include "blackmisc/simulation/fsx/simconnectutilities.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include <QDebug>
|
||||
|
||||
using namespace BlackSim::Fsx;
|
||||
using namespace BlackMisc::Simulation::Fsx;
|
||||
|
||||
namespace BlackSimTest
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace BlackSimTest
|
||||
*/
|
||||
int CSamplesFsx::samplesMisc(QTextStream &streamOut)
|
||||
{
|
||||
BlackSim::registerMetadata();
|
||||
BlackMisc::registerMetadata();
|
||||
streamOut << CSimConnectUtilities::simConnectExceptionToString(CSimConnectUtilities::SIMCONNECT_EXCEPTION_ALREADY_SUBSCRIBED) << endl;
|
||||
streamOut << CSimConnectUtilities::simConnectExceptionToString(CSimConnectUtilities::SIMCONNECT_EXCEPTION_ILLEGAL_OPERATION) << endl;
|
||||
streamOut << CSimConnectUtilities::simConnectSurfaceTypeToString(CSimConnectUtilities::Bituminus) << endl;
|
||||
|
||||
@@ -10,17 +10,16 @@
|
||||
#include "samplesmodelmapping.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/sampleutils.h"
|
||||
#include "blacksim/blacksimfreefunctions.h"
|
||||
#include "blacksim/fscommon/vpilotmodelmappings.h"
|
||||
#include "blacksim/fscommon/aircraftmapper.h"
|
||||
#include "blackmisc/simulation/fscommon/vpilotmodelmappings.h"
|
||||
#include "blackmisc/simulation/fscommon/aircraftmapper.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackSim;
|
||||
using namespace BlackSim::FsCommon;
|
||||
using namespace BlackMisc::Simulation;
|
||||
using namespace BlackMisc::Simulation::FsCommon;
|
||||
using namespace BlackMisc::Aviation;
|
||||
|
||||
namespace BlackSimTest
|
||||
@@ -32,7 +31,6 @@ namespace BlackSimTest
|
||||
int CSamplesModelMapping::samples(QTextStream &streamOut, QTextStream &streamIn)
|
||||
{
|
||||
BlackMisc::registerMetadata();
|
||||
BlackSim::registerMetadata();
|
||||
|
||||
std::unique_ptr<ISimulatorModelMappings> cvm(new CVPilotModelMappings(true));
|
||||
bool s = cvm->read();
|
||||
|
||||
@@ -8,7 +8,7 @@ TEMPLATE = app
|
||||
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += blackmisc blackcore blacksim
|
||||
CONFIG += blackmisc blackcore
|
||||
|
||||
DEPENDPATH += . ../../src
|
||||
INCLUDEPATH += . ../../src
|
||||
@@ -17,11 +17,10 @@ SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib \
|
||||
../../lib/blackcore.lib \
|
||||
../../lib/blacksim.lib
|
||||
../../lib/blackcore.lib
|
||||
|
||||
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a \
|
||||
../../lib/libblackcore.a \
|
||||
../../lib/libblacksim.a
|
||||
../../lib/libblackcore.a
|
||||
|
||||
DESTDIR = ../../bin
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
#include "client.h"
|
||||
#include "blackcore/voice_vatlib.h"
|
||||
#include "blackmisc/audiodeviceinfolist.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include <QDateTime>
|
||||
|
||||
using namespace BlackMisc::Audio;
|
||||
@@ -112,7 +112,7 @@ void Client::setCallsignCmd(QTextStream &args)
|
||||
{
|
||||
QString callsign;
|
||||
args >> callsign;
|
||||
m_channelCom1->setMyAircraftCallsign(BlackMisc::Aviation::CCallsign(callsign));
|
||||
m_channelCom1->setOwnAircraftCallsign(BlackMisc::Aviation::CCallsign(callsign));
|
||||
}
|
||||
|
||||
void Client::initiateConnectionCmd(QTextStream &args)
|
||||
@@ -159,7 +159,7 @@ void Client::outputDevicesCmd(QTextStream & /** args **/)
|
||||
void Client::listCallsignsCmd(QTextStream &args)
|
||||
{
|
||||
Q_UNUSED(args)
|
||||
CCallsignList callsigns = m_channelCom1->getVoiceRoomCallsigns();
|
||||
CCallsignSet callsigns = m_channelCom1->getVoiceRoomCallsigns();
|
||||
foreach(CCallsign callsign, callsigns)
|
||||
{
|
||||
m_stdout << " " << callsign << endl;
|
||||
|
||||
@@ -204,11 +204,11 @@ namespace BlackCore
|
||||
return users;
|
||||
}
|
||||
|
||||
CUserList CAirspaceMonitor::getUsersForCallsigns(const CCallsignList &callsigns) const
|
||||
CUserList CAirspaceMonitor::getUsersForCallsigns(const CCallsignSet &callsigns) const
|
||||
{
|
||||
CUserList users;
|
||||
if (callsigns.isEmpty()) { return users; }
|
||||
CCallsignList searchList(callsigns);
|
||||
CCallsignSet searchList(callsigns);
|
||||
|
||||
// myself, which is not in the lists below
|
||||
if (!ownAircraft().getCallsign().isEmpty() && searchList.contains(ownAircraft().getCallsign()))
|
||||
@@ -261,7 +261,7 @@ namespace BlackCore
|
||||
return users;
|
||||
}
|
||||
|
||||
CClientList CAirspaceMonitor::getOtherClientsForCallsigns(const CCallsignList &callsigns) const
|
||||
CClientList CAirspaceMonitor::getOtherClientsForCallsigns(const CCallsignSet &callsigns) const
|
||||
{
|
||||
CClientList clients;
|
||||
if (callsigns.isEmpty()) return clients;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "blackmisc/nwclientlist.h"
|
||||
#include "blackmisc/aviation/flightplan.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "network.h"
|
||||
#include "vatsimbookingreader.h"
|
||||
#include "vatsimdatafilereader.h"
|
||||
@@ -75,7 +75,7 @@ namespace BlackCore
|
||||
BlackMisc::Network::CUserList getUsers() const;
|
||||
|
||||
//! Returns a list of the users corresponding to the given callsigns
|
||||
BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const;
|
||||
BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const;
|
||||
|
||||
//! Returns the flightplan for the given callsign
|
||||
//! \remarks pseudo synchronous, call the async functions and waits for result
|
||||
@@ -85,7 +85,7 @@ namespace BlackCore
|
||||
BlackMisc::Network::CClientList getOtherClients() const;
|
||||
|
||||
//! Returns a list of other clients corresponding to the given callsigns
|
||||
BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const;
|
||||
BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const;
|
||||
|
||||
//! Returns a METAR for the given airport, if available
|
||||
BlackMisc::Aviation::CInformationMessage getMetar(const BlackMisc::Aviation::CAirportIcao &airportIcaoCode);
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
#ifndef BLACKCORE_AUDIODEVICE_H
|
||||
#define BLACKCORE_AUDIODEVICE_H
|
||||
|
||||
#include "blackmisc/audiodeviceinfo.h"
|
||||
#include "blackmisc/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/audiodeviceinfo.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include <QObject>
|
||||
|
||||
//! \file
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#define BLACKCORE_AUDIODEVICEVATLIB_H
|
||||
|
||||
#include "audio_device.h"
|
||||
#include "blackmisc/audiodeviceinfo.h"
|
||||
#include "blackmisc/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/audiodeviceinfo.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "vatlib/vatlib2.h"
|
||||
#include <QObject>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "blackcore/context.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/eveventhotkeyfunction.h"
|
||||
#include "blackmisc/evoriginator.h"
|
||||
#include <QObject>
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
|
||||
#include "blackcore/context.h"
|
||||
#include "blackmisc/genericdbusinterface.h"
|
||||
#include "blackmisc/audiodeviceinfolist.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/aviation/aircraft.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
#include <QObject>
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace BlackCore
|
||||
virtual void leaveAllVoiceRooms() = 0;
|
||||
|
||||
//! Room user callsigns
|
||||
virtual BlackMisc::Aviation::CCallsignList getRoomCallsigns(int comUnit) const = 0;
|
||||
virtual BlackMisc::Aviation::CCallsignSet getRoomCallsigns(int comUnit) const = 0;
|
||||
|
||||
//! Room users
|
||||
virtual BlackMisc::Network::CUserList getRoomUsers(int comUnit) const = 0;
|
||||
|
||||
@@ -67,11 +67,11 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::getRoomCallsigns()
|
||||
virtual BlackMisc::Aviation::CCallsignList getRoomCallsigns(int comUnitValue) const override
|
||||
virtual BlackMisc::Aviation::CCallsignSet getRoomCallsigns(int comUnitValue) const override
|
||||
{
|
||||
Q_UNUSED(comUnitValue);
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return BlackMisc::Aviation::CCallsignList();
|
||||
return BlackMisc::Aviation::CCallsignSet();
|
||||
}
|
||||
|
||||
//! \copydoc IContextAudio::getRoomUsers()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
#include "blacksound/soundgenerator.h"
|
||||
#include "blackmisc/notificationsounds.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/hotkeyfunction.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/simplecommandparser.h"
|
||||
@@ -47,12 +47,12 @@ namespace BlackCore
|
||||
m_handlePtt = m_inputManager->registerHotkeyFunc(CHotkeyFunction::Ptt(), this, &CContextAudio::ps_setVoiceTransmission);
|
||||
|
||||
m_channel1 = m_voice->createVoiceChannel();
|
||||
m_channel1->setMyAircraftCallsign(ownCallsign);
|
||||
m_channel1->setOwnAircraftCallsign(ownCallsign);
|
||||
connect(m_channel1.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_connectionStatusChanged);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userJoinedRoom, this, &CContextAudio::ps_userJoinedRoom);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userLeftRoom, this, &CContextAudio::ps_userLeftRoom);
|
||||
m_channel2 = m_voice->createVoiceChannel();
|
||||
m_channel2->setMyAircraftCallsign(ownCallsign);
|
||||
m_channel2->setOwnAircraftCallsign(ownCallsign);
|
||||
connect(m_channel2.data(), &IVoiceChannel::connectionStatusChanged, this, &CContextAudio::ps_connectionStatusChanged);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userJoinedRoom, this, &CContextAudio::ps_userJoinedRoom);
|
||||
connect(m_channel1.data(), &IVoiceChannel::userLeftRoom, this, &CContextAudio::ps_userLeftRoom);
|
||||
@@ -321,7 +321,7 @@ namespace BlackCore
|
||||
if (newRoomCom1.isValid())
|
||||
{
|
||||
auto newVoiceChannel = getVoiceChannelBy(newRoomCom1);
|
||||
newVoiceChannel->setMyAircraftCallsign(ownCallsign);
|
||||
newVoiceChannel->setOwnAircraftCallsign(ownCallsign);
|
||||
bool inUse = m_voiceChannelMapping.values().contains(newVoiceChannel);
|
||||
m_voiceChannelMapping.insert(Com1, newVoiceChannel);
|
||||
|
||||
@@ -361,7 +361,7 @@ namespace BlackCore
|
||||
if (newRoomCom2.isValid())
|
||||
{
|
||||
auto newVoiceChannel = getVoiceChannelBy(newRoomCom2);
|
||||
newVoiceChannel->setMyAircraftCallsign(ownCallsign);
|
||||
newVoiceChannel->setOwnAircraftCallsign(ownCallsign);
|
||||
bool inUse = m_voiceChannelMapping.values().contains(newVoiceChannel);
|
||||
m_voiceChannelMapping.insert(Com2, newVoiceChannel);
|
||||
|
||||
@@ -385,11 +385,11 @@ namespace BlackCore
|
||||
|
||||
void CContextAudio::setOwnCallsignForRooms(const CCallsign &callsign)
|
||||
{
|
||||
if (m_channel1) { m_channel1->setMyAircraftCallsign(callsign); }
|
||||
if (m_channel2) { m_channel2->setMyAircraftCallsign(callsign); }
|
||||
if (m_channel1) { m_channel1->setOwnAircraftCallsign(callsign); }
|
||||
if (m_channel2) { m_channel2->setOwnAircraftCallsign(callsign); }
|
||||
}
|
||||
|
||||
CCallsignList CContextAudio::getRoomCallsigns(int comUnitValue) const
|
||||
CCallsignSet CContextAudio::getRoomCallsigns(int comUnitValue) const
|
||||
{
|
||||
Q_ASSERT(this->m_voice);
|
||||
CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO;
|
||||
@@ -398,7 +398,7 @@ namespace BlackCore
|
||||
if (voiceChannel)
|
||||
return voiceChannel->getVoiceRoomCallsigns();
|
||||
else
|
||||
return CCallsignList();
|
||||
return CCallsignSet();
|
||||
}
|
||||
|
||||
Network::CUserList CContextAudio::getRoomUsers(int comUnitValue) const
|
||||
@@ -541,8 +541,8 @@ namespace BlackCore
|
||||
if (this->getIContextOwnAircraft())
|
||||
{
|
||||
// good chance to update aircraft
|
||||
m_channel1->setMyAircraftCallsign(this->getIContextOwnAircraft()->getOwnAircraft().getCallsign());
|
||||
m_channel2->setMyAircraftCallsign(this->getIContextOwnAircraft()->getOwnAircraft().getCallsign());
|
||||
m_channel1->setOwnAircraftCallsign(this->getIContextOwnAircraft()->getOwnAircraft().getCallsign());
|
||||
m_channel2->setOwnAircraftCallsign(this->getIContextOwnAircraft()->getOwnAircraft().getCallsign());
|
||||
}
|
||||
emit this->changedVoiceRooms(getComVoiceRooms(), false);
|
||||
break;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "audio_mixer.h"
|
||||
#include "input_manager.h"
|
||||
#include "blackinput/keyboard.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
|
||||
#include <QThread>
|
||||
#include <QQueue>
|
||||
@@ -64,7 +64,7 @@ namespace BlackCore
|
||||
virtual void setOwnCallsignForRooms(const BlackMisc::Aviation::CCallsign &callsign) override;
|
||||
|
||||
//! \copydoc IContextAudio::getRoomCallsigns()
|
||||
virtual BlackMisc::Aviation::CCallsignList getRoomCallsigns(int comUnitValue) const override;
|
||||
virtual BlackMisc::Aviation::CCallsignSet getRoomCallsigns(int comUnitValue) const override;
|
||||
|
||||
//! \copydoc IContextAudio::getRoomUsers()
|
||||
virtual BlackMisc::Network::CUserList getRoomUsers(int comUnitValue) const override;
|
||||
|
||||
@@ -61,9 +61,9 @@ namespace BlackCore
|
||||
/*
|
||||
* COM1 callsigns
|
||||
*/
|
||||
BlackMisc::Aviation::CCallsignList CContextAudioProxy::getRoomCallsigns(int comUnitValue) const
|
||||
BlackMisc::Aviation::CCallsignSet CContextAudioProxy::getRoomCallsigns(int comUnitValue) const
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CCallsignList>(QLatin1Literal("getRoomCallsigns"), comUnitValue);
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Aviation::CCallsignSet>(QLatin1Literal("getRoomCallsigns"), comUnitValue);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
#include "context_audio.h"
|
||||
|
||||
#include "blackmisc/genericdbusinterface.h"
|
||||
#include "blackmisc/audiodeviceinfolist.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/aviation/aircraft.h"
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BlackCore
|
||||
virtual void setOwnCallsignForRooms(const BlackMisc::Aviation::CCallsign &callsign) override;
|
||||
|
||||
//! \copydoc IContextAudio::getRoomCallsigns()
|
||||
virtual BlackMisc::Aviation::CCallsignList getRoomCallsigns(int comUnitValue) const override;
|
||||
virtual BlackMisc::Aviation::CCallsignSet getRoomCallsigns(int comUnitValue) const override;
|
||||
|
||||
//! \copydoc IContextAudio::getRoomUsers()
|
||||
virtual BlackMisc::Network::CUserList getRoomUsers(int comUnitValue) const override;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "blackmisc/nwtextmessagelist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/nwclientlist.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackcore/network.h"
|
||||
|
||||
//! \addtogroup dbus
|
||||
@@ -162,7 +162,7 @@ namespace BlackCore
|
||||
virtual BlackMisc::Network::CUserList getUsers() const = 0;
|
||||
|
||||
//! Users for given callsigns, e.g. for voice room resolution
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const = 0;
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const = 0;
|
||||
|
||||
//! User for given callsign, e.g. for text messages
|
||||
virtual BlackMisc::Network::CUser getUserForCallsign(const BlackMisc::Aviation::CCallsign &callsign) const = 0;
|
||||
@@ -171,7 +171,7 @@ namespace BlackCore
|
||||
virtual BlackMisc::Network::CClientList getOtherClients() const = 0;
|
||||
|
||||
//! Clients for given callsign, e.g. to test/fetch direct aircraft model
|
||||
virtual BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const = 0;
|
||||
virtual BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const = 0;
|
||||
|
||||
//! Known voice servers, available when data file was first read
|
||||
virtual BlackMisc::Network::CServerList getVatsimVoiceServers() const = 0;
|
||||
@@ -186,10 +186,10 @@ namespace BlackCore
|
||||
virtual void enableFastPositionSending(bool enable) = 0;
|
||||
|
||||
//! Callsigns enabled for fast position updates
|
||||
virtual void setFastPositionEnabledCallsigns(BlackMisc::Aviation::CCallsignList &callsigns) = 0;
|
||||
virtual void setFastPositionEnabledCallsigns(BlackMisc::Aviation::CCallsignSet &callsigns) = 0;
|
||||
|
||||
//! Callsigns enabled for fast position updates
|
||||
virtual BlackMisc::Aviation::CCallsignList getFastPositionEnabledCallsigns() = 0;
|
||||
virtual BlackMisc::Aviation::CCallsignSet getFastPositionEnabledCallsigns() = 0;
|
||||
|
||||
/*!
|
||||
* Connect to Network
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
//! \copydoc IContextNetwork::getUsersForCallsigns
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const override
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const override
|
||||
{
|
||||
Q_UNUSED(callsigns);
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
@@ -172,7 +172,7 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
//! \copydoc IContextNetwork::getOtherClientForCallsigns
|
||||
virtual BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const override
|
||||
virtual BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const override
|
||||
{
|
||||
Q_UNUSED(callsigns);
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
@@ -274,17 +274,17 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
//! \copydoc IContextNetwork::setFastPositionEnabledCallsigns
|
||||
virtual void setFastPositionEnabledCallsigns(BlackMisc::Aviation::CCallsignList &callsigns) override
|
||||
virtual void setFastPositionEnabledCallsigns(BlackMisc::Aviation::CCallsignSet &callsigns) override
|
||||
{
|
||||
Q_UNUSED(callsigns);
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
}
|
||||
|
||||
//! \copydoc IContextNetwork::getFastPositionEnabledCallsigns
|
||||
virtual BlackMisc::Aviation::CCallsignList getFastPositionEnabledCallsigns() override
|
||||
virtual BlackMisc::Aviation::CCallsignSet getFastPositionEnabledCallsigns() override
|
||||
{
|
||||
logEmptyContextWarning(Q_FUNC_INFO);
|
||||
return BlackMisc::Aviation::CCallsignList();
|
||||
return BlackMisc::Aviation::CCallsignSet();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -338,7 +338,7 @@ namespace BlackCore
|
||||
return this->m_airspace->getUsers();
|
||||
}
|
||||
|
||||
CUserList CContextNetwork::getUsersForCallsigns(const CCallsignList &callsigns) const
|
||||
CUserList CContextNetwork::getUsersForCallsigns(const CCallsignSet &callsigns) const
|
||||
{
|
||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
CUserList users;
|
||||
@@ -349,7 +349,7 @@ namespace BlackCore
|
||||
CUser CContextNetwork::getUserForCallsign(const CCallsign &callsign) const
|
||||
{
|
||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
CCallsignList callsigns;
|
||||
CCallsignSet callsigns;
|
||||
callsigns.push_back(callsign);
|
||||
CUserList users = this->getUsersForCallsigns(callsigns);
|
||||
if (users.size() < 1) return CUser();
|
||||
@@ -362,7 +362,7 @@ namespace BlackCore
|
||||
return this->m_airspace->getOtherClients();
|
||||
}
|
||||
|
||||
CClientList CContextNetwork::getOtherClientsForCallsigns(const CCallsignList &callsigns) const
|
||||
CClientList CContextNetwork::getOtherClientsForCallsigns(const CCallsignSet &callsigns) const
|
||||
{
|
||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
return this->m_airspace->getOtherClientsForCallsigns(callsigns);
|
||||
@@ -565,18 +565,18 @@ namespace BlackCore
|
||||
m_network->enableFastPositionSending(enable);
|
||||
}
|
||||
|
||||
void CContextNetwork::setFastPositionEnabledCallsigns(CCallsignList &callsigns)
|
||||
void CContextNetwork::setFastPositionEnabledCallsigns(CCallsignSet &callsigns)
|
||||
{
|
||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << callsigns; }
|
||||
Q_ASSERT(this->m_network);
|
||||
}
|
||||
|
||||
CCallsignList CContextNetwork::getFastPositionEnabledCallsigns()
|
||||
CCallsignSet CContextNetwork::getFastPositionEnabledCallsigns()
|
||||
{
|
||||
if (this->isDebugEnabled()) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO; }
|
||||
Q_ASSERT(this->m_network);
|
||||
//! \todo Fast position updates in vatlib
|
||||
return CCallsignList();
|
||||
return CCallsignSet();
|
||||
}
|
||||
|
||||
void CContextNetwork::testCreateDummyOnlineAtcStations(int number)
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace BlackCore
|
||||
virtual BlackMisc::Network::CUserList getUsers() const override;
|
||||
|
||||
//! \copydoc IContextNetwork::getUsersForCallsigns
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const override;
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const override;
|
||||
|
||||
//! \copydoc IContextNetwork::getUsersForCallsign
|
||||
virtual BlackMisc::Network::CUser getUserForCallsign(const BlackMisc::Aviation::CCallsign &callsign) const override;
|
||||
@@ -161,7 +161,7 @@ namespace BlackCore
|
||||
virtual BlackMisc::Network::CClientList getOtherClients() const override;
|
||||
|
||||
//! \copydoc IContextNetwork::getOtherClientForCallsigns
|
||||
virtual BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const override;
|
||||
virtual BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const override;
|
||||
|
||||
//! \copydoc IContextNetwork::getVatsimFsdServers
|
||||
virtual BlackMisc::Network::CServerList getVatsimFsdServers() const override;
|
||||
@@ -191,10 +191,10 @@ namespace BlackCore
|
||||
virtual void enableFastPositionSending(bool enable) override;
|
||||
|
||||
//! \copydoc IContextNetwork::setFastPositionEnabledCallsigns
|
||||
virtual void setFastPositionEnabledCallsigns(BlackMisc::Aviation::CCallsignList &callsigns) override;
|
||||
virtual void setFastPositionEnabledCallsigns(BlackMisc::Aviation::CCallsignSet &callsigns) override;
|
||||
|
||||
//! \copydoc IContextNetwork::getFastPositionEnabledCallsigns
|
||||
virtual BlackMisc::Aviation::CCallsignList getFastPositionEnabledCallsigns() override;
|
||||
virtual BlackMisc::Aviation::CCallsignSet getFastPositionEnabledCallsigns() override;
|
||||
|
||||
//! \copydoc IContextNetwork::testCreateDummyOnlineAtcStations
|
||||
virtual void testCreateDummyOnlineAtcStations(int number) override;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "blackcore/context_network_proxy.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include <QObject>
|
||||
#include <QMetaEnum>
|
||||
#include <QDBusConnection>
|
||||
@@ -128,7 +128,7 @@ namespace BlackCore
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUserList>(QLatin1Literal("getUsers"));
|
||||
}
|
||||
|
||||
BlackMisc::Network::CUserList CContextNetworkProxy::getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const
|
||||
BlackMisc::Network::CUserList CContextNetworkProxy::getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CUserList>(QLatin1Literal("getUsersForCallsigns"), callsigns);
|
||||
}
|
||||
@@ -153,7 +153,7 @@ namespace BlackCore
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CServerList>(QLatin1Literal("getVatsimVoiceServers"));
|
||||
}
|
||||
|
||||
BlackMisc::Network::CClientList CContextNetworkProxy::getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const
|
||||
BlackMisc::Network::CClientList CContextNetworkProxy::getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<BlackMisc::Network::CClientList>(QLatin1Literal("getOtherClientsForCallsigns"), callsigns);
|
||||
}
|
||||
@@ -203,14 +203,14 @@ namespace BlackCore
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("enableFastPositionSending"), enable);
|
||||
}
|
||||
|
||||
void CContextNetworkProxy::setFastPositionEnabledCallsigns(CCallsignList &callsigns)
|
||||
void CContextNetworkProxy::setFastPositionEnabledCallsigns(CCallsignSet &callsigns)
|
||||
{
|
||||
this->m_dBusInterface->callDBus(QLatin1Literal("setFastPositionEnabledCallsigns"), callsigns);
|
||||
}
|
||||
|
||||
CCallsignList CContextNetworkProxy::getFastPositionEnabledCallsigns()
|
||||
CCallsignSet CContextNetworkProxy::getFastPositionEnabledCallsigns()
|
||||
{
|
||||
return this->m_dBusInterface->callDBusRet<CCallsignList>(QLatin1Literal("getFastPositionEnabledCallsigns"));
|
||||
return this->m_dBusInterface->callDBusRet<CCallsignSet>(QLatin1Literal("getFastPositionEnabledCallsigns"));
|
||||
}
|
||||
|
||||
void CContextNetworkProxy::testCreateDummyOnlineAtcStations(int number)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "blackmisc/nwtextmessagelist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/genericdbusinterface.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
|
||||
namespace BlackCore
|
||||
{
|
||||
@@ -105,7 +105,7 @@ namespace BlackCore
|
||||
virtual BlackMisc::Network::CUserList getUsers() const override;
|
||||
|
||||
//! \copydoc IContextNetwork::getUsersForCallsigns
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const override;
|
||||
virtual BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const override;
|
||||
|
||||
//! \copydoc IContextNetwork::getUserForCallsign
|
||||
virtual BlackMisc::Network::CUser getUserForCallsign(const BlackMisc::Aviation::CCallsign &callsign) const override;
|
||||
@@ -120,7 +120,7 @@ namespace BlackCore
|
||||
virtual BlackMisc::Network::CServerList getVatsimFsdServers() const override;
|
||||
|
||||
//! \copydoc IContextNetwork::getOtherClientForCallsigns
|
||||
virtual BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns) const override;
|
||||
virtual BlackMisc::Network::CClientList getOtherClientsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns) const override;
|
||||
|
||||
//! \copydoc IContextNetwork::requestDataUpdates
|
||||
virtual void requestDataUpdates()override;
|
||||
@@ -144,10 +144,10 @@ namespace BlackCore
|
||||
virtual void enableFastPositionSending(bool enable) override;
|
||||
|
||||
//! \copydoc IContextNetwork::setFastPositionEnabledCallsigns
|
||||
virtual void setFastPositionEnabledCallsigns(BlackMisc::Aviation::CCallsignList &callsigns) override;
|
||||
virtual void setFastPositionEnabledCallsigns(BlackMisc::Aviation::CCallsignSet &callsigns) override;
|
||||
|
||||
//! \copydoc IContextNetwork::getFastPositionEnabledCallsigns
|
||||
virtual BlackMisc::Aviation::CCallsignList getFastPositionEnabledCallsigns() override;
|
||||
virtual BlackMisc::Aviation::CCallsignSet getFastPositionEnabledCallsigns() override;
|
||||
|
||||
//! \copydoc IContextNetwork::testCreateDummyOnlineAtcStations
|
||||
virtual void testCreateDummyOnlineAtcStations(int number) override;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "blackcore/context.h"
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/aviation/aircrafticao.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
|
||||
//! \addtogroup dbus
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace BlackCore
|
||||
|
||||
bool m_withDebugMsg = false; //!< allows to disable debug messages
|
||||
bool m_forceSortWhenAddingValues = false; //!< force sorting (latest first) when adding values
|
||||
BlackMisc::Aviation::CCallsignList m_aircraftSupportingParts; //!< aircraft supporting parts
|
||||
BlackMisc::Aviation::CCallsignSet m_aircraftSupportingParts; //!< aircraft supporting parts
|
||||
|
||||
// hashs, because not sorted by key but keeping order
|
||||
CSituationsPerCallsign m_situationsByCallsign; //!< situations
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||
#include "blackmisc/aviation/aircraft.h"
|
||||
#include "blackmisc/pqfrequency.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/pqlength.h"
|
||||
#include "blackmisc/pqtime.h"
|
||||
#include "blackmisc/nwserverlist.h"
|
||||
|
||||
@@ -87,9 +87,9 @@ namespace BlackCore
|
||||
|
||||
//! \todo Simulator, why is there no difference on CSequence?
|
||||
CSimulatedAircraftList newAircraftInRange(remoteAircraft().getClosestObjects(getMaxRenderedAircraft()));
|
||||
CCallsignList newAircraftCallsigns(newAircraftInRange.getCallsigns());
|
||||
CCallsignList toBeRemovedCallsigns(m_callsignsToBeRendered.difference(newAircraftCallsigns));
|
||||
CCallsignList toBeAddedCallsigns(newAircraftCallsigns.difference(m_callsignsToBeRendered));
|
||||
CCallsignSet newAircraftCallsigns(newAircraftInRange.getCallsigns());
|
||||
CCallsignSet toBeRemovedCallsigns(m_callsignsToBeRendered.difference(newAircraftCallsigns));
|
||||
CCallsignSet toBeAddedCallsigns(newAircraftCallsigns.difference(m_callsignsToBeRendered));
|
||||
for (const CCallsign &cs : toBeRemovedCallsigns)
|
||||
{
|
||||
removeRemoteAircraft(cs);
|
||||
|
||||
@@ -335,7 +335,7 @@ namespace BlackCore
|
||||
int m_timerCounter = 0; //!< allows to calculate n seconds
|
||||
QTimer *m_oneSecondTimer = nullptr; //!< timer
|
||||
BlackMisc::Simulation::CSimulatedAircraftList m_highlightedAircraft; //!< all other aircraft are to be ignored
|
||||
BlackMisc::Aviation::CCallsignList m_callsignsToBeRendered; //!< callsigns which will be rendered
|
||||
BlackMisc::Aviation::CCallsignSet m_callsignsToBeRendered; //!< callsigns which will be rendered
|
||||
int m_maxRenderedAircraft = MaxAircraftInfinite; //!< max.rendered aircraft
|
||||
BlackMisc::PhysicalQuantities::CLength m_maxRenderedDistance { 0.0, BlackMisc::PhysicalQuantities::CLengthUnit::nullUnit()}; //!< max.distance for rendering
|
||||
};
|
||||
|
||||
@@ -57,14 +57,14 @@ namespace BlackCore
|
||||
return this->m_fsdServers;
|
||||
}
|
||||
|
||||
CUserList CVatsimDataFileReader::getPilotsForCallsigns(const CCallsignList &callsigns)
|
||||
CUserList CVatsimDataFileReader::getPilotsForCallsigns(const CCallsignSet &callsigns)
|
||||
{
|
||||
return this->getAircraft().findByCallsigns(callsigns).transform(Predicates::MemberTransform(&CAircraft::getPilot));
|
||||
}
|
||||
|
||||
CUserList CVatsimDataFileReader::getPilotsForCallsign(const CCallsign &callsign)
|
||||
{
|
||||
CCallsignList callsigns;
|
||||
CCallsignSet callsigns;
|
||||
callsigns.push_back(callsign);
|
||||
return this->getPilotsForCallsigns(callsigns);
|
||||
}
|
||||
@@ -95,24 +95,24 @@ namespace BlackCore
|
||||
|
||||
CUserList CVatsimDataFileReader::getControllersForCallsign(const CCallsign &callsign)
|
||||
{
|
||||
CCallsignList callsigns;
|
||||
CCallsignSet callsigns;
|
||||
callsigns.push_back(callsign);
|
||||
return this->getControllersForCallsigns(callsigns);
|
||||
}
|
||||
|
||||
CUserList CVatsimDataFileReader::getUsersForCallsign(const CCallsign &callsign)
|
||||
{
|
||||
CCallsignList callsigns;
|
||||
CCallsignSet callsigns;
|
||||
callsigns.push_back(callsign);
|
||||
return this->getUsersForCallsigns(callsigns);
|
||||
}
|
||||
|
||||
CUserList CVatsimDataFileReader::getControllersForCallsigns(const CCallsignList &callsigns)
|
||||
CUserList CVatsimDataFileReader::getControllersForCallsigns(const CCallsignSet &callsigns)
|
||||
{
|
||||
return this->getAtcStations().findByCallsigns(callsigns).transform(Predicates::MemberTransform(&CAtcStation::getController));
|
||||
}
|
||||
|
||||
CUserList CVatsimDataFileReader::getUsersForCallsigns(const CCallsignList &callsigns)
|
||||
CUserList CVatsimDataFileReader::getUsersForCallsigns(const CCallsignSet &callsigns)
|
||||
{
|
||||
CUserList users;
|
||||
if (callsigns.isEmpty()) return users;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "blackmisc/nwserverlist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/nwvoicecapabilities.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
@@ -56,7 +56,7 @@ namespace BlackCore
|
||||
|
||||
//! Users for callsign(s)
|
||||
//! \threadsafe
|
||||
BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns);
|
||||
BlackMisc::Network::CUserList getUsersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns);
|
||||
|
||||
//! User for callsign
|
||||
//! \threadsafe
|
||||
@@ -64,7 +64,7 @@ namespace BlackCore
|
||||
|
||||
//! Controllers for callsigns
|
||||
//! \threadsafe
|
||||
BlackMisc::Network::CUserList getControllersForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns);
|
||||
BlackMisc::Network::CUserList getControllersForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns);
|
||||
|
||||
//! Controllers for callsign
|
||||
//! \threadsafe
|
||||
@@ -72,7 +72,7 @@ namespace BlackCore
|
||||
|
||||
//! Users for callsigns
|
||||
//! \threadsafe
|
||||
BlackMisc::Network::CUserList getPilotsForCallsigns(const BlackMisc::Aviation::CCallsignList &callsigns);
|
||||
BlackMisc::Network::CUserList getPilotsForCallsigns(const BlackMisc::Aviation::CCallsignSet &callsigns);
|
||||
|
||||
//! Users for callsign
|
||||
//! \threadsafe
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
#include "voice_channel.h"
|
||||
#include "audio_mixer.h"
|
||||
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
#include "../blackmisc/nwuserlist.h"
|
||||
#include "../blackmisc/voiceroomlist.h"
|
||||
#include "../blackmisc/audiodeviceinfolist.h"
|
||||
#include "../blackmisc/audio/voiceroomlist.h"
|
||||
#include "../blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "../blackmisc/statusmessage.h"
|
||||
|
||||
#include <QObject>
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#define BLACKCORE_VOICE_CHANNEL_H
|
||||
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include <QObject>
|
||||
#include <QScopedPointer>
|
||||
|
||||
@@ -52,10 +52,10 @@ namespace BlackCore
|
||||
virtual void leaveVoiceRoom() = 0;
|
||||
|
||||
//! Get voice room callsings
|
||||
virtual BlackMisc::Aviation::CCallsignList getVoiceRoomCallsigns() const = 0;
|
||||
virtual BlackMisc::Aviation::CCallsignSet getVoiceRoomCallsigns() const = 0;
|
||||
|
||||
//! Set own aircraft's callsign
|
||||
virtual void setMyAircraftCallsign(const BlackMisc::Aviation::CCallsign &callsign) = 0;
|
||||
virtual void setOwnAircraftCallsign(const BlackMisc::Aviation::CCallsign &callsign) = 0;
|
||||
|
||||
//! Get voice room
|
||||
virtual BlackMisc::Audio::CVoiceRoom getVoiceRoom() const = 0;
|
||||
|
||||
@@ -62,12 +62,12 @@ namespace BlackCore
|
||||
m_listCallsigns = {};
|
||||
}
|
||||
|
||||
CCallsignList CVoiceChannelVatlib::getVoiceRoomCallsigns() const
|
||||
CCallsignSet CVoiceChannelVatlib::getVoiceRoomCallsigns() const
|
||||
{
|
||||
return m_listCallsigns;
|
||||
}
|
||||
|
||||
void CVoiceChannelVatlib::setMyAircraftCallsign(const CCallsign &callsign)
|
||||
void CVoiceChannelVatlib::setOwnAircraftCallsign(const CCallsign &callsign)
|
||||
{
|
||||
m_callsign = callsign;
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
#include "voice_channel.h"
|
||||
#include "voice_vatlib.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include <QObject>
|
||||
#include <QSharedPointer>
|
||||
|
||||
@@ -44,10 +44,10 @@ namespace BlackCore
|
||||
virtual void leaveVoiceRoom() override;
|
||||
|
||||
//! \copydoc IVoiceChannel::getVoiceRoomCallsigns
|
||||
virtual BlackMisc::Aviation::CCallsignList getVoiceRoomCallsigns() const override;
|
||||
virtual BlackMisc::Aviation::CCallsignSet getVoiceRoomCallsigns() const override;
|
||||
|
||||
//! \copydoc IVoiceChannel::setMyAircraftCallsign
|
||||
virtual void setMyAircraftCallsign(const BlackMisc::Aviation::CCallsign &callsign) override;
|
||||
virtual void setOwnAircraftCallsign(const BlackMisc::Aviation::CCallsign &callsign) override;
|
||||
|
||||
//! \copydoc IVoiceChannel::getVoiceRoom
|
||||
virtual BlackMisc::Audio::CVoiceRoom getVoiceRoom() const override;
|
||||
@@ -89,7 +89,7 @@ namespace BlackCore
|
||||
|
||||
BlackMisc::Aviation::CCallsign m_callsign; // Own callsign
|
||||
BlackMisc::Audio::CVoiceRoom m_voiceRoom; // Voice Room
|
||||
BlackMisc::Aviation::CCallsignList m_listCallsigns; // Callsigns connected to room
|
||||
BlackMisc::Aviation::CCallsignSet m_listCallsigns; // Callsigns connected to room
|
||||
IVoiceChannel::ConnectionStatus m_roomStatus = IVoiceChannel::Disconnected; // Room connection status
|
||||
|
||||
VatAudioService m_audioService;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define BLACKGUI_AUDIOSETUPCOMPONENT_H
|
||||
|
||||
#include "enableforruntime.h"
|
||||
#include "blackmisc/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include <QFrame>
|
||||
#include <QScopedPointer>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "blackcore/context_ownaircraft.h"
|
||||
#include "blackcore/context_audio.h"
|
||||
#include "blackmisc/aviation/aircraft.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
|
||||
#include <QDoubleSpinBox>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "enableforruntime.h"
|
||||
#include "blackmisc/aviation/aircraft.h"
|
||||
#include "blackmisc/aviation/transponder.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include <QFrame>
|
||||
#include <QScopedPointer>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define BLACKGUI_VOICEROOMSCOMPONENT_H
|
||||
|
||||
#include "enableforruntime.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
#include <QFrame>
|
||||
#include <QScopedPointer>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "atcstationlistmodel.h"
|
||||
#include "blackmisc/voiceroom.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/nwuser.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "columnformatters.h"
|
||||
#include "blackmisc/geolatitude.h"
|
||||
#include "blackmisc/geo/latitude.h"
|
||||
#include "blackmisc/variant.h"
|
||||
#include "blackmisc/iconlist.h"
|
||||
#include "blackmisc/icons.h"
|
||||
|
||||
25
src/blackmisc/audio/audio.h
Normal file
25
src/blackmisc/audio/audio.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/* 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 BLACKMISC_AUDIO_AUDIO_H
|
||||
#define BLACKMISC_AUDIO_AUDIO_H
|
||||
|
||||
/*!
|
||||
* \namespace BlackMisc::Audio
|
||||
* \brief Audio classes such as audio devices and voice rooms.
|
||||
*/
|
||||
|
||||
#include "blackmisc/audio/audiodeviceinfo.h"
|
||||
#include "blackmisc/audio/audiodeviceinfolist.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/audio/voiceroomlist.h"
|
||||
|
||||
#endif // guard
|
||||
@@ -15,29 +15,17 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
CAudioDeviceInfo::CAudioDeviceInfo() :
|
||||
m_type(Unknown), m_deviceIndex(invalidDeviceIndex()),
|
||||
m_deviceName(""), m_hostName(BlackMisc::localHostName())
|
||||
{
|
||||
// void
|
||||
}
|
||||
{ }
|
||||
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
CAudioDeviceInfo::CAudioDeviceInfo(DeviceType type, const int index, const QString &name) :
|
||||
m_type(type), m_deviceIndex(index),
|
||||
m_deviceName(name), m_hostName(BlackMisc::localHostName())
|
||||
{
|
||||
// void
|
||||
}
|
||||
{ }
|
||||
|
||||
/*
|
||||
* As String
|
||||
*/
|
||||
QString CAudioDeviceInfo::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_AUDIODEVICE_H
|
||||
#define BLACKMISC_AUDIODEVICE_H
|
||||
#ifndef BLACKMISC_AUDIO_AUDIODEVICE_H
|
||||
#define BLACKMISC_AUDIO_AUDIODEVICE_H
|
||||
|
||||
#include "blackmiscfreefunctions.h"
|
||||
#include "valueobject.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/valueobject.h"
|
||||
#include <QString>
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -8,43 +8,29 @@
|
||||
*/
|
||||
|
||||
#include "audiodeviceinfolist.h"
|
||||
#include "predicates.h"
|
||||
#include "blackmisc/predicates.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
/*
|
||||
* Default constructor
|
||||
*/
|
||||
|
||||
CAudioDeviceInfoList::CAudioDeviceInfoList() { }
|
||||
|
||||
/*
|
||||
* Construct from base class object
|
||||
*/
|
||||
CAudioDeviceInfoList::CAudioDeviceInfoList(const CSequence &other) :
|
||||
CSequence(other)
|
||||
{ }
|
||||
|
||||
/*
|
||||
* Output devices
|
||||
*/
|
||||
CAudioDeviceInfoList CAudioDeviceInfoList::getOutputDevices() const
|
||||
{
|
||||
return this->findBy(&CAudioDeviceInfo::getType, CAudioDeviceInfo::OutputDevice);
|
||||
}
|
||||
|
||||
/*
|
||||
* Output devices
|
||||
*/
|
||||
CAudioDeviceInfoList CAudioDeviceInfoList::getInputDevices() const
|
||||
{
|
||||
return this->findBy(&CAudioDeviceInfo::getType, CAudioDeviceInfo::InputDevice);
|
||||
}
|
||||
|
||||
/*
|
||||
* Count as of type
|
||||
*/
|
||||
int CAudioDeviceInfoList::count(CAudioDeviceInfo::DeviceType type) const
|
||||
{
|
||||
return std::count_if(this->begin(), this->end(), [type](const CAudioDeviceInfo &device)
|
||||
@@ -53,9 +39,6 @@ namespace BlackMisc
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Register metadata
|
||||
*/
|
||||
void CAudioDeviceInfoList::registerMetadata()
|
||||
{
|
||||
qRegisterMetaType<CAudioDeviceInfoList>();
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_AUDIODEVICELIST_H
|
||||
#define BLACKMISC_AUDIODEVICELIST_H
|
||||
#ifndef BLACKMISC_AUDIO_AUDIODEVICELIST_H
|
||||
#define BLACKMISC_AUDIO_AUDIODEVICELIST_H
|
||||
|
||||
#include "audiodeviceinfo.h"
|
||||
#include "sequence.h"
|
||||
#include "collection.h"
|
||||
#include "blackmisc/audio/audiodeviceinfo.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
@@ -23,9 +23,7 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
/*!
|
||||
* Value object encapsulating a list of audio devices.
|
||||
*/
|
||||
//! Value object encapsulating a list of audio devices.
|
||||
class CAudioDeviceInfoList : public CSequence<CAudioDeviceInfo>
|
||||
{
|
||||
public:
|
||||
@@ -19,18 +19,13 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
|
||||
CVoiceRoom::CVoiceRoom(const QString &voiceRoomUrl, bool connected) :
|
||||
m_connected(connected), m_audioPlaying(false)
|
||||
{
|
||||
this->setVoiceRoomUrl(voiceRoomUrl);
|
||||
}
|
||||
|
||||
/*
|
||||
* Property by index
|
||||
*/
|
||||
CVariant CVoiceRoom::propertyByIndex(const CPropertyIndex &index) const
|
||||
{
|
||||
if (index.isMyself()) { return this->toCVariant(); }
|
||||
@@ -52,9 +47,6 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Property by index
|
||||
*/
|
||||
void CVoiceRoom::setPropertyByIndex(const CVariant &variant, const CPropertyIndex &index)
|
||||
{
|
||||
if (index.isMyself())
|
||||
@@ -87,9 +79,6 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* To string
|
||||
*/
|
||||
QString CVoiceRoom::convertToQString(bool /* i18n */) const
|
||||
{
|
||||
if (!this->isValid()) return "Invalid";
|
||||
@@ -99,9 +88,6 @@ namespace BlackMisc
|
||||
return s;
|
||||
}
|
||||
|
||||
/*
|
||||
* Server URL
|
||||
*/
|
||||
QString CVoiceRoom::getVoiceRoomUrl(bool noProtocol) const
|
||||
{
|
||||
if (!this->isValid()) return "";
|
||||
@@ -112,9 +98,6 @@ namespace BlackMisc
|
||||
return url;
|
||||
}
|
||||
|
||||
/*
|
||||
* Voice room URL
|
||||
*/
|
||||
void CVoiceRoom::setVoiceRoomUrl(const QString &serverUrl)
|
||||
{
|
||||
if (serverUrl.isEmpty())
|
||||
@@ -133,9 +116,6 @@ namespace BlackMisc
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ATIS voice channel
|
||||
*/
|
||||
bool CVoiceRoom::isAtis() const
|
||||
{
|
||||
return (this->m_channel.contains("ATIS", Qt::CaseInsensitive));
|
||||
@@ -9,20 +9,18 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#include "propertyindex.h"
|
||||
#include "blackmiscfreefunctions.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include <QString>
|
||||
|
||||
#ifndef BLACKMISC_VOICEROOM_H
|
||||
#define BLACKMISC_VOICEROOM_H
|
||||
#ifndef BLACKMISC_AUDIO_VOICEROOM_H
|
||||
#define BLACKMISC_AUDIO_VOICEROOM_H
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
/*!
|
||||
* Value object encapsulating information of a voice room
|
||||
*/
|
||||
//! Value object encapsulating information of a voice room
|
||||
class CVoiceRoom : public CValueObject<CVoiceRoom>
|
||||
{
|
||||
public:
|
||||
@@ -8,27 +8,19 @@
|
||||
*/
|
||||
|
||||
#include "voiceroomlist.h"
|
||||
#include "predicates.h"
|
||||
#include "blackmisc/predicates.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Audio
|
||||
{
|
||||
/*
|
||||
* Default constructor
|
||||
*/
|
||||
|
||||
CVoiceRoomList::CVoiceRoomList() { }
|
||||
|
||||
/*
|
||||
* Construct from base class object
|
||||
*/
|
||||
CVoiceRoomList::CVoiceRoomList(const CSequence &other) :
|
||||
CSequence(other)
|
||||
{ }
|
||||
|
||||
/*
|
||||
* Register metadata
|
||||
*/
|
||||
void CVoiceRoomList::registerMetadata()
|
||||
{
|
||||
qRegisterMetaType<CVoiceRoomList>();
|
||||
@@ -36,9 +28,6 @@ namespace BlackMisc
|
||||
registerMetaValueType<CVoiceRoomList>();
|
||||
}
|
||||
|
||||
/*
|
||||
* Two empty rooms
|
||||
*/
|
||||
const CVoiceRoomList &CVoiceRoomList::twoEmptyRooms()
|
||||
{
|
||||
static CVoiceRoomList emptyRooms;
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_VOICEROOMLIST_H
|
||||
#define BLACKMISC_VOICEROOMLIST_H
|
||||
#ifndef BLACKMISC_AUDIO_VOICEROOMLIST_H
|
||||
#define BLACKMISC_AUDIO_VOICEROOMLIST_H
|
||||
|
||||
#include "voiceroom.h"
|
||||
#include "sequence.h"
|
||||
#include "collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
@@ -13,9 +13,9 @@
|
||||
#define BLACKMISC_AVIATION_AIRCRAFTLIST_H
|
||||
|
||||
#include "blackmisc/aviation/aircraft.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/callsignobjectlist.h"
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/propertyindexvariantmap.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKMISC_AVIATION_AIRCRAFTSITUATION_H
|
||||
#define BLACKMISC_AVIATION_AIRCRAFTSITUATION_H
|
||||
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/timestampbased.h"
|
||||
#include "blackmisc/aviation/altitude.h"
|
||||
#include "blackmisc/aviation/heading.h"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define BLACKMISC_AVIATION_AIRPORT_H
|
||||
|
||||
#include "blackmisc/aviation/airporticao.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
|
||||
namespace BlackMisc
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
#define BLACKMISC_AVIATION_AIRPORTLIST_H
|
||||
|
||||
#include "blackmisc/aviation/airport.h"
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QList>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/voiceroom.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/icon.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
#ifndef BLACKMISC_AVIATION_ATCSTATION_H
|
||||
#define BLACKMISC_AVIATION_ATCSTATION_H
|
||||
|
||||
#include "blackmisc/voiceroom.h"
|
||||
#include "blackmisc/audio/voiceroom.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/informationmessage.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/nwuser.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/pqfrequency.h"
|
||||
#include "blackmisc/pqlength.h"
|
||||
#include "blackmisc/pqtime.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifndef BLACKMISC_AVIATION_ATCSTATIONLIST_H
|
||||
#define BLACKMISC_AVIATION_ATCSTATIONLIST_H
|
||||
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/aviation/callsignobjectlist.h"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "blackmisc/aviation/transponder.h"
|
||||
#include "blackmisc/aviation/track.h"
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/atcstation.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/aircraftlist.h"
|
||||
|
||||
@@ -27,7 +27,7 @@ void BlackMisc::Aviation::registerMetadata()
|
||||
CTrack::registerMetadata();
|
||||
CInformationMessage::registerMetadata();
|
||||
CCallsign::registerMetadata();
|
||||
CCallsignList::registerMetadata();
|
||||
CCallsignSet::registerMetadata();
|
||||
CAtcStation::registerMetadata();
|
||||
CAtcStationList::registerMetadata();
|
||||
CAircraft::registerMetadata();
|
||||
|
||||
@@ -37,9 +37,9 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
template <class OBJ, class CONTAINER>
|
||||
CCallsignList ICallsignObjectList<OBJ, CONTAINER>::getCallsigns() const
|
||||
CCallsignSet ICallsignObjectList<OBJ, CONTAINER>::getCallsigns() const
|
||||
{
|
||||
CCallsignList cs;
|
||||
CCallsignSet cs;
|
||||
for (const OBJ &obj : this->container())
|
||||
{
|
||||
cs.push_back(obj.getCallsign());
|
||||
@@ -54,7 +54,7 @@ namespace BlackMisc
|
||||
}
|
||||
|
||||
template <class OBJ, class CONTAINER>
|
||||
CONTAINER ICallsignObjectList<OBJ, CONTAINER>::findByCallsigns(const CCallsignList &callsigns) const
|
||||
CONTAINER ICallsignObjectList<OBJ, CONTAINER>::findByCallsigns(const CCallsignSet &callsigns) const
|
||||
{
|
||||
return this->container().findBy(Predicates::MemberIsAnyOf(&OBJ::getCallsign, callsigns));
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/propertyindexlist.h"
|
||||
#include "blackmisc/propertyindexvariantmap.h"
|
||||
#include <QList>
|
||||
@@ -37,13 +37,13 @@ namespace BlackMisc
|
||||
int applyIfCallsign(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::CPropertyIndexVariantMap &variantMap);
|
||||
|
||||
//! All callsigns
|
||||
BlackMisc::Aviation::CCallsignList getCallsigns() const;
|
||||
BlackMisc::Aviation::CCallsignSet getCallsigns() const;
|
||||
|
||||
//! Find 0..n stations by callsign
|
||||
CONTAINER findByCallsign(const CCallsign &callsign) const;
|
||||
|
||||
//! Find 0..n aircraft matching any of a set of callsigns
|
||||
CONTAINER findByCallsigns(const CCallsignList &callsigns) const;
|
||||
CONTAINER findByCallsigns(const CCallsignSet &callsigns) const;
|
||||
|
||||
//! Find the first aircraft by callsign, if none return given one
|
||||
OBJ findFirstByCallsign(const CCallsign &callsign, const OBJ &ifNotFound = {}) const;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/predicates.h"
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -15,21 +15,21 @@ namespace BlackMisc
|
||||
namespace Aviation
|
||||
{
|
||||
|
||||
CCallsignList::CCallsignList() { }
|
||||
CCallsignSet::CCallsignSet() { }
|
||||
|
||||
CCallsignList::CCallsignList(const CCollection<CCallsign> &other) :
|
||||
CCallsignSet::CCallsignSet(const CCollection<CCallsign> &other) :
|
||||
CCollection<CCallsign>(other)
|
||||
{ }
|
||||
|
||||
void CCallsignList::registerMetadata()
|
||||
void CCallsignSet::registerMetadata()
|
||||
{
|
||||
qRegisterMetaType<BlackMisc::CSequence<CCallsign>>();
|
||||
qDBusRegisterMetaType<BlackMisc::CSequence<CCallsign>>();
|
||||
qRegisterMetaType<BlackMisc::CCollection<CCallsign>>();
|
||||
qDBusRegisterMetaType<BlackMisc::CCollection<CCallsign>>();
|
||||
qRegisterMetaType<CCallsignList>();
|
||||
qDBusRegisterMetaType<CCallsignList>();
|
||||
registerMetaValueType<CCallsignList>();
|
||||
qRegisterMetaType<CCallsignSet>();
|
||||
qDBusRegisterMetaType<CCallsignSet>();
|
||||
registerMetaValueType<CCallsignSet>();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_AVIATION_CALLSIGNLIST_H
|
||||
#define BLACKMISC_AVIATION_CALLSIGNLIST_H
|
||||
#ifndef BLACKMISC_AVIATION_CALLSIGNSET_H
|
||||
#define BLACKMISC_AVIATION_CALLSIGNSET_H
|
||||
|
||||
#include "blackmisc/aviation/callsign.h"
|
||||
#include "blackmisc/collection.h"
|
||||
@@ -21,15 +21,15 @@ namespace BlackMisc
|
||||
{
|
||||
namespace Aviation
|
||||
{
|
||||
//! Value object for a list of callsigns.
|
||||
class CCallsignList : public CCollection<CCallsign>
|
||||
//! Value object for a set of callsigns.
|
||||
class CCallsignSet : public CCollection<CCallsign>
|
||||
{
|
||||
public:
|
||||
//! Default constructor.
|
||||
CCallsignList();
|
||||
CCallsignSet();
|
||||
|
||||
//! Construct from a base class object.
|
||||
CCallsignList(const CCollection<CCallsign> &other);
|
||||
CCallsignSet(const CCollection<CCallsign> &other);
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
@@ -44,7 +44,7 @@ namespace BlackMisc
|
||||
} //namespace
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CCallsignList)
|
||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CCallsignSet)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CCollection<BlackMisc::Aviation::CCallsign>)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CSequence<BlackMisc::Aviation::CCallsign>)
|
||||
|
||||
@@ -26,6 +26,8 @@ TRANSLATIONS += translations/blackmisc_i18n_de.ts \
|
||||
HEADERS += *.h \
|
||||
$$PWD/aviation/*.h \
|
||||
$$PWD/math/*.h \
|
||||
$$PWD/geo/*.h \
|
||||
$$PWD/audio/*.h \
|
||||
$$PWD/simulation/*.h \
|
||||
$$PWD/simulation/fscommon\*.h \
|
||||
$$PWD/simulation/fsx\*.h
|
||||
@@ -33,6 +35,8 @@ HEADERS += *.h \
|
||||
SOURCES += *.cpp \
|
||||
$$PWD/aviation/*.cpp \
|
||||
$$PWD/math/*.cpp \
|
||||
$$PWD/geo/*.cpp \
|
||||
$$PWD/audio/*.cpp \
|
||||
$$PWD/simulation/*.cpp \
|
||||
$$PWD/simulation/fscommon\*.cpp \
|
||||
$$PWD/simulation/fsx\*.cpp
|
||||
|
||||
@@ -1,28 +0,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 BLACKMISC_ALLVALUECLASSES_H
|
||||
#define BLACKMISC_ALLVALUECLASSES_H
|
||||
|
||||
#include "blackmisc/pqallquantities.h"
|
||||
#include "blackmisc/aviation/aviationall.h"
|
||||
#include "blackmisc/geoallclasses.h"
|
||||
#include "blackmisc/settingsblackmiscclasses.h"
|
||||
#include "blackmisc/propertyindexallclasses.h"
|
||||
#include "blackmisc/networkallclasses.h"
|
||||
#include "blackmisc/statusmessagelist.h"
|
||||
#include "blackmisc/statusmessage.h"
|
||||
#include "blackmisc/audioallclasses.h"
|
||||
#include "blackmisc/variantlist.h"
|
||||
#include "blackmisc/simulation/simulationallclasses.h"
|
||||
#include "hotkeyfunction.h"
|
||||
|
||||
#endif // guard
|
||||
@@ -11,9 +11,9 @@
|
||||
#include "blackmisc/aviation/aviation.h"
|
||||
#include "pqallquantities.h"
|
||||
#include "math/math.h"
|
||||
#include "geoallclasses.h"
|
||||
#include "geo/geo.h"
|
||||
#include "networkallclasses.h"
|
||||
#include "audioallclasses.h"
|
||||
#include "audio/audio.h"
|
||||
#include "hwallclasses.h"
|
||||
#include "settingsblackmiscclasses.h"
|
||||
#include "propertyindexlist.h"
|
||||
|
||||
@@ -32,9 +32,9 @@ void BlackMisc::Simulation::registerMetadata()
|
||||
CSimulatorPluginInfo::registerMetadata();
|
||||
CSimulatorPluginInfoList::registerMetadata();
|
||||
CSettingsSimulator::registerMetadata();
|
||||
FsCommon::CAircraftCfgEntries::registerMetadata();
|
||||
FsCommon::CAircraftCfgEntriesList::registerMetadata();
|
||||
Fsx::CSimConnectUtilities::registerMetadata();
|
||||
CAircraftCfgEntries::registerMetadata();
|
||||
CAircraftCfgEntriesList::registerMetadata();
|
||||
CSimConnectUtilities::registerMetadata();
|
||||
CAircraftModel::registerMetadata();
|
||||
CAircraftModelList::registerMetadata();
|
||||
CSimulatedAircraft::registerMetadata();
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
#include "blackmisc/math/mathutils.h"
|
||||
#include "variant.h"
|
||||
#include "blackmisc/variant.h"
|
||||
#include <QtCore/qmath.h>
|
||||
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
@@ -12,10 +12,10 @@
|
||||
#ifndef BLACKMISC_COORDINATEGEODETIC_H
|
||||
#define BLACKMISC_COORDINATEGEODETIC_H
|
||||
|
||||
#include "blackmisc/geolatitude.h"
|
||||
#include "blackmisc/geolongitude.h"
|
||||
#include "blackmisc/geo/latitude.h"
|
||||
#include "blackmisc/geo/longitude.h"
|
||||
#include "blackmisc/pqlength.h"
|
||||
#include "propertyindex.h"
|
||||
#include "blackmisc/propertyindex.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -7,9 +7,9 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/geoearthangle.h"
|
||||
#include "blackmisc/geolatitude.h"
|
||||
#include "blackmisc/geolongitude.h"
|
||||
#include "blackmisc/geo/earthangle.h"
|
||||
#include "blackmisc/geo/latitude.h"
|
||||
#include "blackmisc/geo/longitude.h"
|
||||
#include "blackmisc/iconlist.h"
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -17,9 +17,6 @@ namespace BlackMisc
|
||||
namespace Geo
|
||||
{
|
||||
|
||||
/*
|
||||
* Latitude or Longitude from a WGS string
|
||||
*/
|
||||
template <class LATorLON> LATorLON CEarthAngle<LATorLON>::fromWgs84(const QString &wgsCoordinate)
|
||||
{
|
||||
// http://www.regular-expressions.info/floatingpoint.html
|
||||
@@ -68,9 +65,6 @@ namespace BlackMisc
|
||||
return LATorLON(a);
|
||||
}
|
||||
|
||||
/*
|
||||
* Icon
|
||||
*/
|
||||
template <class LATorLON> CIcon CEarthAngle<LATorLON>::toIcon() const
|
||||
{
|
||||
return BlackMisc::CIconList::iconByIndex(CIcons::GeoPosition);
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_GEOEARTHANGLE_H
|
||||
#define BLACKMISC_GEOEARTHANGLE_H
|
||||
#ifndef BLACKMISC_GEO_EARTHANGLE_H
|
||||
#define BLACKMISC_GEO_EARTHANGLE_H
|
||||
|
||||
#include "blackmisc/pqangle.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Copyright (C) 2013
|
||||
* swift Project Community / Contributors
|
||||
* 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,
|
||||
@@ -7,12 +7,18 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#ifndef BLACKMISC_AUDIOALLCLASSES_H
|
||||
#define BLACKMISC_AUDIOALLCLASSES_H
|
||||
#ifndef BLACKMISC_GEO_GEO_H
|
||||
#define BLACKMISC_GEO_GEO_H
|
||||
|
||||
#include "blackmisc/audiodeviceinfo.h"
|
||||
#include "blackmisc/audiodeviceinfolist.h"
|
||||
#include "blackmisc/voiceroom.h"
|
||||
#include "blackmisc/voiceroomlist.h"
|
||||
/*!
|
||||
* \namespace BlackMisc::Geo
|
||||
* \brief Geo classes such as latitude, longitude, etc.
|
||||
*/
|
||||
|
||||
#include "blackmisc/geo/earthangle.h"
|
||||
#include "blackmisc/geo/latitude.h"
|
||||
#include "blackmisc/geo/longitude.h"
|
||||
#include "blackmisc/geo/geodesicgrid.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
|
||||
#endif // guard
|
||||
@@ -1,17 +1,21 @@
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
#ifndef BLACKMISC_GEODESICGRID_H
|
||||
#define BLACKMISC_GEODESICGRID_H
|
||||
#ifndef BLACKMISC_GEO_GEODESICGRID_H
|
||||
#define BLACKMISC_GEO_GEODESICGRID_H
|
||||
|
||||
//! \file
|
||||
|
||||
#include "blackmisc/math/mathutils.h"
|
||||
#include "coordinategeodetic.h"
|
||||
#include "range.h"
|
||||
#include "iterator.h"
|
||||
#include "blackmisc/range.h"
|
||||
#include "blackmisc/iterator.h"
|
||||
#include <QMultiMap>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Copyright (C) 2015
|
||||
* swift Project Community / Contributors
|
||||
* 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,
|
||||
@@ -7,7 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include "blackmisc/predicates.h"
|
||||
#include "blackmisc/aviation/atcstationlist.h"
|
||||
#include "blackmisc/aviation/aircraftlist.h"
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_GEOOBJECTLIST_H
|
||||
#define BLACKMISC_GEOOBJECTLIST_H
|
||||
#ifndef BLACKMISC_GEO_GEOOBJECTLIST_H
|
||||
#define BLACKMISC_GEO_GEOOBJECTLIST_H
|
||||
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_GEOLATITUDE_H
|
||||
#define BLACKMISC_GEOLATITUDE_H
|
||||
#ifndef BLACKMISC_GEO_LATITUDE_H
|
||||
#define BLACKMISC_GEO_LATITUDE_H
|
||||
|
||||
#include <QtCore/qmath.h>
|
||||
#include "blackmisc/geoearthangle.h"
|
||||
#include "blackmisc/geo/earthangle.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_GEOLONGITUDE_H
|
||||
#define BLACKMISC_GEOLONGITUDE_H
|
||||
#ifndef BLACKMISC_GEO_LONGITUDE_H
|
||||
#define BLACKMISC_GEO_LONGITUDE_H
|
||||
|
||||
#include "blackmisc/geoearthangle.h"
|
||||
#include "blackmisc/geo/earthangle.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -1,15 +0,0 @@
|
||||
/* 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/. */
|
||||
|
||||
#ifndef BLACKMISC_GEOALLCLASSES_H
|
||||
#define BLACKMISC_GEOALLCLASSES_H
|
||||
|
||||
#include "blackmisc/geoearthangle.h"
|
||||
#include "blackmisc/geolatitude.h"
|
||||
#include "blackmisc/geolongitude.h"
|
||||
#include "blackmisc/geodesicgrid.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
|
||||
#endif // guard
|
||||
@@ -44,9 +44,9 @@ namespace BlackMisc
|
||||
return this->findBy(Predicates::MemberValid(&CSimulatedAircraft::getPilot)).transform(Predicates::MemberTransform(&CSimulatedAircraft::getPilot));
|
||||
}
|
||||
|
||||
CCallsignList CSimulatedAircraftList::getCallsignsWithSyncronizedParts() const
|
||||
CCallsignSet CSimulatedAircraftList::getCallsignsWithSyncronizedParts() const
|
||||
{
|
||||
CCallsignList csl;
|
||||
CCallsignSet csl;
|
||||
for (const CSimulatedAircraft &aircraft : (*this))
|
||||
{
|
||||
if (!aircraft.isPartsSynchronized()) { continue; }
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "blackmisc/simulation/simulatedaircraft.h"
|
||||
#include "blackmisc/aviation/callsignobjectlist.h"
|
||||
#include "blackmisc/aviation/aircraftlist.h"
|
||||
#include "blackmisc/geoobjectlist.h"
|
||||
#include "blackmisc/geo/geoobjectlist.h"
|
||||
#include "blackmisc/nwuserlist.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
@@ -44,7 +44,7 @@ namespace BlackMisc
|
||||
BlackMisc::Network::CUserList getPilots() const;
|
||||
|
||||
//! Callsigns of aircraft with synchronized parts
|
||||
BlackMisc::Aviation::CCallsignList getCallsignsWithSyncronizedParts() const;
|
||||
BlackMisc::Aviation::CCallsignSet getCallsignsWithSyncronizedParts() const;
|
||||
|
||||
//! Mark all aircraft as unrendered
|
||||
void markAllAsNotRendered();
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define BLACKSOUND_SOUNDGENERATOR_H
|
||||
|
||||
#include "blackmisc/aviation/selcal.h"
|
||||
#include "blackmisc/audiodeviceinfo.h"
|
||||
#include "blackmisc/audio/audiodeviceinfo.h"
|
||||
#include "blackmisc/pqtime.h"
|
||||
#include "blackmisc/notificationsounds.h"
|
||||
#include <QIODevice>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "multiplayer_packet_parser.h"
|
||||
#include "blacksimplugin_freefunctions.h"
|
||||
#include "blackmisc/aviation/aircraftsituation.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include <QScopedArrayPointer>
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ HEADERS += *.h
|
||||
|
||||
#win32:!win32-g++*: PRE_TARGETDEPS += ../../../../lib/blackmisc.lib
|
||||
#win32:!win32-g++*: PRE_TARGETDEPS += ../../../../lib/blackcore.lib
|
||||
#win32:!win32-g++*: PRE_TARGETDEPS += ../../../../lib/blacksim.lib
|
||||
|
||||
DESTDIR = ../../../../bin/plugins/simulator
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "xbus_service_proxy.h"
|
||||
#include "xbus_traffic_proxy.h"
|
||||
#include "blackmisc/logmessage.h"
|
||||
#include "blackmisc/coordinategeodetic.h"
|
||||
#include "blackmisc/geo/coordinategeodetic.h"
|
||||
#include <QDBusServiceWatcher>
|
||||
#include <QTimer>
|
||||
#include <QString>
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
/* Copyright (C) 2014
|
||||
* 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 "introwindow.h"
|
||||
#include "ui_introwindow.h"
|
||||
#include "blackcore/dbus_server.h"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
#include "datarefs.h"
|
||||
#include "blackmisc/geodesicgrid.h"
|
||||
#include "blackmisc/geo/geodesicgrid.h"
|
||||
#include <XPLM/XPLMNavigation.h>
|
||||
#include <QStringList>
|
||||
#include <QObject>
|
||||
|
||||
@@ -8,7 +8,7 @@ TEMPLATE = app
|
||||
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += blackmisc blackcore blacksim
|
||||
CONFIG += blackmisc blackcore
|
||||
CONFIG += testcase
|
||||
|
||||
DEPENDPATH += . ../../src
|
||||
@@ -18,11 +18,9 @@ HEADERS += *.h
|
||||
SOURCES += *.cpp
|
||||
|
||||
win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib \
|
||||
../../lib/blackcore.lib \
|
||||
../../lib/blacksim.lib
|
||||
../../lib/blackcore.lib
|
||||
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a \
|
||||
../../lib/libblackcore.a \
|
||||
../../lib/libblacksim.a
|
||||
../../lib/libblackcore.a
|
||||
|
||||
DESTDIR = ../../bin
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "testinterpolator.h"
|
||||
#include "blackcore/interpolator_linear.h"
|
||||
#include "blackmisc/simulation/remoteaircraftprovider.h"
|
||||
#include "blackmisc/simulation/remoteaircraftproviderdummy.h"
|
||||
#include <QScopedPointer>
|
||||
|
||||
using namespace BlackCore;
|
||||
@@ -26,6 +26,8 @@ namespace BlackCoreTest
|
||||
QScopedPointer<CRemoteAircraftProviderDummy> provider(new CRemoteAircraftProviderDummy());
|
||||
CInterpolatorLinear interpolator(provider.data());
|
||||
interpolator.forceSortingOfAddedValues(true);
|
||||
|
||||
// fixed time so everything can be debugged
|
||||
const qint64 ts = 1425000000000; // QDateTime::currentMSecsSinceEpoch();
|
||||
const qint64 deltaT = 5000; // ms
|
||||
CCallsign cs("SWIFT");
|
||||
@@ -131,7 +133,7 @@ namespace BlackCoreTest
|
||||
}
|
||||
|
||||
QList<CCallsign> csKeys = interpolator.getSituationsByCallsign().keys();
|
||||
CCallsignList callsigns(csKeys);
|
||||
CCallsignSet callsigns(csKeys);
|
||||
QVERIFY(callsigns.size() == callsignsInProvider);
|
||||
QVERIFY(interpolator.getSituationsForCallsign("SWIFT0").size() == IInterpolator::MaxSituationsPerCallsign);
|
||||
QVERIFY(interpolator.getPartsForCallsign("SWIFT0").size() == IInterpolator::MaxPartsPerCallsign);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "blackmisc/aviation/informationmessage.h"
|
||||
#include "blackmisc/aviation/aircraftsituation.h"
|
||||
#include "blackmisc/aviation/aircrafticao.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/comsystem.h"
|
||||
#include "blackmisc/aviation/navsystem.h"
|
||||
#include "blackmisc/aviation/transponder.h"
|
||||
@@ -105,7 +105,7 @@ namespace BlackMiscTest
|
||||
QVERIFY2(cs1 == cs2, "Callsigns shall be equal");
|
||||
QVERIFY2(cs1 != cs3, "Callsigns shall not be equal");
|
||||
|
||||
CCallsignList list;
|
||||
CCallsignSet list;
|
||||
list.push_back(cs1);
|
||||
QVERIFY2(list.size() == 1, "List shall be 1");
|
||||
QVERIFY2(list.contains(cs1), "Callsign is in list");
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "blackmisc/blackmiscfreefunctions.h"
|
||||
#include "blackmisc/collection.h"
|
||||
#include "blackmisc/sequence.h"
|
||||
#include "blackmisc/aviation/callsignlist.h"
|
||||
#include "blackmisc/aviation/callsignset.h"
|
||||
#include "blackmisc/aviation/aircraftsituationlist.h"
|
||||
#include "blackmisc/dictionary.h"
|
||||
#include <QList>
|
||||
@@ -124,7 +124,7 @@ namespace BlackMiscTest
|
||||
void CTestContainers::findTests()
|
||||
{
|
||||
BlackMisc::registerMetadata();
|
||||
CCallsignList callsigns;
|
||||
CCallsignSet callsigns;
|
||||
CSequence<CCallsign> found = callsigns.findBy(&CCallsign::asString, "Foo");
|
||||
QVERIFY2(found.isEmpty(), "Empty found");
|
||||
callsigns.push_back(CCallsign("EDDM_TWR"));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "testgeo.h"
|
||||
#include "blackmisc/geolatitude.h"
|
||||
#include "blackmisc/geolongitude.h"
|
||||
#include "blackmisc/geo/latitude.h"
|
||||
#include "blackmisc/geo/longitude.h"
|
||||
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
Reference in New Issue
Block a user