mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 05:45:35 +08:00
Formatting
This commit is contained in:
@@ -93,5 +93,4 @@ namespace BlackSample
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -133,10 +133,10 @@ namespace BlackCore
|
|||||||
static void registerHelp()
|
static void registerHelp()
|
||||||
{
|
{
|
||||||
if (BlackMisc::CSimpleCommandParser::registered("BlackCore::CContextSimulator")) { return; }
|
if (BlackMisc::CSimpleCommandParser::registered("BlackCore::CContextSimulator")) { return; }
|
||||||
BlackMisc::CSimpleCommandParser::registerCommand({".ris", "rendering/interpolation setup"});
|
BlackMisc::CSimpleCommandParser::registerCommand({".ris", "rendering/interpolation setup (global setup)"});
|
||||||
BlackMisc::CSimpleCommandParser::registerCommand({".ris show", "display rendering/interpolation setup on console"});
|
BlackMisc::CSimpleCommandParser::registerCommand({".ris show", "display rendering/interpolation setup on console (global setup)"});
|
||||||
BlackMisc::CSimpleCommandParser::registerCommand({".ris debug on|off", "rendering/interpolation debug messages"});
|
BlackMisc::CSimpleCommandParser::registerCommand({".ris debug on|off", "rendering/interpolation debug messages (global setup)"});
|
||||||
BlackMisc::CSimpleCommandParser::registerCommand({".ris parts on|off", "aircraft parts"});
|
BlackMisc::CSimpleCommandParser::registerCommand({".ris parts on|off", "aircraft parts (global setup)"});
|
||||||
}
|
}
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ namespace BlackCore
|
|||||||
//! Is time synchronization on?
|
//! Is time synchronization on?
|
||||||
virtual bool isTimeSynchronized() const = 0;
|
virtual bool isTimeSynchronized() const = 0;
|
||||||
|
|
||||||
//! Get the setup (simulator environemnt)
|
//! Get the setup (simulator environment)
|
||||||
virtual const BlackMisc::Simulation::CSimulatorInternals &getSimulatorInternals() const = 0;
|
virtual const BlackMisc::Simulation::CSimulatorInternals &getSimulatorInternals() const = 0;
|
||||||
|
|
||||||
//! Connect to simulator
|
//! Connect to simulator
|
||||||
|
|||||||
@@ -223,7 +223,7 @@ namespace BlackCore
|
|||||||
qint64 m_statsUpdateAircraftTimeTotalMs = 0; //!< statistics update time
|
qint64 m_statsUpdateAircraftTimeTotalMs = 0; //!< statistics update time
|
||||||
qint64 m_statsUpdateAircraftTimeAvgMs = 0; //!< statistics update time
|
qint64 m_statsUpdateAircraftTimeAvgMs = 0; //!< statistics update time
|
||||||
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
|
BlackMisc::Simulation::CSimulatorInternals m_simulatorInternals; //!< setup object
|
||||||
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log interpolation
|
BlackMisc::Simulation::CInterpolationLogger m_interpolationLogger; //!< log.interpolation
|
||||||
QMap<BlackMisc::Aviation::CCallsign, qint64> m_clampedLogMsg; //!< when logged last so there, can be used so there is no log message overflow
|
QMap<BlackMisc::Aviation::CCallsign, qint64> m_clampedLogMsg; //!< when logged last so there, can be used so there is no log message overflow
|
||||||
|
|
||||||
// some optional functionality which can be used by the simulators as needed
|
// some optional functionality which can be used by the simulators as needed
|
||||||
|
|||||||
@@ -168,11 +168,8 @@ namespace BlackGui
|
|||||||
|
|
||||||
CVariant CGuiUtility::fromSwiftDragAndDropData(const QMimeData *mime)
|
CVariant CGuiUtility::fromSwiftDragAndDropData(const QMimeData *mime)
|
||||||
{
|
{
|
||||||
if (hasSwiftVariantMimeType(mime))
|
if (!hasSwiftVariantMimeType(mime)) { return CVariant(); }
|
||||||
{
|
return CGuiUtility::fromSwiftDragAndDropData(mime->data(swiftJsonDragAndDropMimeType()));
|
||||||
return fromSwiftDragAndDropData(mime->data(swiftJsonDragAndDropMimeType()));
|
|
||||||
}
|
|
||||||
return CVariant();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CVariant CGuiUtility::fromSwiftDragAndDropData(const QByteArray &utf8Data)
|
CVariant CGuiUtility::fromSwiftDragAndDropData(const QByteArray &utf8Data)
|
||||||
|
|||||||
@@ -342,9 +342,9 @@ namespace BlackMisc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CRemoteAircraftProvider::updateAircraftEnabled(const CCallsign &callsign, bool enabledForRedering)
|
bool CRemoteAircraftProvider::updateAircraftEnabled(const CCallsign &callsign, bool enabledForRendering)
|
||||||
{
|
{
|
||||||
const CPropertyIndexVariantMap vm(CSimulatedAircraft::IndexEnabled, CVariant::fromValue(enabledForRedering));
|
const CPropertyIndexVariantMap vm(CSimulatedAircraft::IndexEnabled, CVariant::fromValue(enabledForRendering));
|
||||||
const int c = this->updateAircraftInRange(callsign, vm);
|
const int c = this->updateAircraftInRange(callsign, vm);
|
||||||
return c > 0;
|
return c > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ namespace BlackMisc
|
|||||||
virtual bool isRemoteAircraftSupportingParts(const Aviation::CCallsign &callsign) const override;
|
virtual bool isRemoteAircraftSupportingParts(const Aviation::CCallsign &callsign) const override;
|
||||||
virtual int getRemoteAircraftSupportingPartsCount() const override;
|
virtual int getRemoteAircraftSupportingPartsCount() const override;
|
||||||
virtual Aviation::CCallsignSet remoteAircraftSupportingParts() const override;
|
virtual Aviation::CCallsignSet remoteAircraftSupportingParts() const override;
|
||||||
virtual bool updateAircraftEnabled(const Aviation::CCallsign &callsign, bool enabledForRedering) override;
|
virtual bool updateAircraftEnabled(const Aviation::CCallsign &callsign, bool enabledForRendering) override;
|
||||||
virtual bool updateAircraftModel(const Aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) override;
|
virtual bool updateAircraftModel(const Aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) override;
|
||||||
virtual bool updateAircraftNetworkModel(const Aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) override;
|
virtual bool updateAircraftNetworkModel(const Aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator) override;
|
||||||
virtual bool updateFastPositionEnabled(const Aviation::CCallsign &callsign, bool enableFastPositonUpdates) override;
|
virtual bool updateFastPositionEnabled(const Aviation::CCallsign &callsign, bool enableFastPositonUpdates) override;
|
||||||
|
|||||||
@@ -162,13 +162,13 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
// Remark: Names "type" and "value" are also used for drag and drop
|
// Remark: Names "type" and "value" are also used for drag and drop
|
||||||
// Changing the names here requires the change for drag and drop too
|
// Changing the names here requires the change for drag and drop too
|
||||||
QJsonValue typeValue = json.value("type");
|
const QJsonValue typeValue = json.value("type");
|
||||||
if (typeValue.isUndefined()) { throw CJsonException("Missing 'type'"); }
|
if (typeValue.isUndefined()) { throw CJsonException("Missing 'type'"); }
|
||||||
QString typeName = typeValue.toString();
|
const QString typeName = typeValue.toString();
|
||||||
if (typeName.isEmpty()) { m_v.clear(); return; }
|
if (typeName.isEmpty()) { m_v.clear(); return; }
|
||||||
int typeId = QMetaType::type(qPrintable(typeName));
|
const int typeId = QMetaType::type(qPrintable(typeName));
|
||||||
|
|
||||||
QJsonValue value = json.value("value");
|
const QJsonValue value = json.value("value");
|
||||||
if (value.isUndefined()) { throw CJsonException("Missing 'value'"); }
|
if (value.isUndefined()) { throw CJsonException("Missing 'value'"); }
|
||||||
switch (typeId)
|
switch (typeId)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
return new CSimulatorEmulatedConfigWidget(parent);
|
return new CSimulatorEmulatedConfigWidget(parent);
|
||||||
}
|
}
|
||||||
}
|
} // ns
|
||||||
}
|
} // ns
|
||||||
|
|||||||
Reference in New Issue
Block a user