mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 17:55:45 +08:00
@@ -72,10 +72,10 @@ namespace BlackCore
|
|||||||
//! Set new output device
|
//! Set new output device
|
||||||
virtual void setOutputDevice(const BlackMisc::Audio::CAudioDeviceInfo &device) = 0;
|
virtual void setOutputDevice(const BlackMisc::Audio::CAudioDeviceInfo &device) = 0;
|
||||||
|
|
||||||
//! Set output volume between 0 ... 300 %
|
//! Set output volume between 0 ... 300%
|
||||||
virtual void setOutputVolume(int volume) = 0;
|
virtual void setOutputVolume(int volume) = 0;
|
||||||
|
|
||||||
//! Get output volume
|
//! Get output volume between 0 ... 300%
|
||||||
virtual int getOutputVolume() const = 0;
|
virtual int getOutputVolume() const = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ namespace BlackCore
|
|||||||
case CRuntimeConfig::LocalInDbusServer:
|
case CRuntimeConfig::LocalInDbusServer:
|
||||||
return (new CContextNetwork(mode, runtime))->registerWithDBus(server);
|
return (new CContextNetwork(mode, runtime))->registerWithDBus(server);
|
||||||
case CRuntimeConfig::Remote:
|
case CRuntimeConfig::Remote:
|
||||||
return new BlackCore::CContextNetworkProxy(BlackCore::CDBusServer::ServiceName, conn, mode, runtime);
|
return new CContextNetworkProxy(BlackCore::CDBusServer::ServiceName, conn, mode, runtime);
|
||||||
case CRuntimeConfig::NotUsed:
|
case CRuntimeConfig::NotUsed:
|
||||||
default:
|
default:
|
||||||
return new BlackCore::CContextNetworkEmpty(runtime);
|
return new CContextNetworkEmpty(runtime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,9 +28,6 @@ namespace BlackCore
|
|||||||
//! Constructor
|
//! Constructor
|
||||||
CContextNetworkEmpty(CRuntime *runtime) : IContextNetwork(CRuntimeConfig::NotUsed, runtime) {}
|
CContextNetworkEmpty(CRuntime *runtime) : IContextNetwork(CRuntimeConfig::NotUsed, runtime) {}
|
||||||
|
|
||||||
//! Destructor
|
|
||||||
virtual ~CContextNetworkEmpty() {}
|
|
||||||
|
|
||||||
public slots: // IContextNetwork overrides
|
public slots: // IContextNetwork overrides
|
||||||
|
|
||||||
//! \copydoc IContextNetwork::readAtcBookingsFromSource()
|
//! \copydoc IContextNetwork::readAtcBookingsFromSource()
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ namespace BlackCore
|
|||||||
Q_ASSERT(factory);
|
Q_ASSERT(factory);
|
||||||
|
|
||||||
// We assume we run in the same process as the own aircraft context
|
// We assume we run in the same process as the own aircraft context
|
||||||
// Hence we pass in memory refernce to own aircraft object
|
// Hence we pass in memory reference to own aircraft object
|
||||||
Q_ASSERT(this->getIContextOwnAircraft()->isUsingImplementingObject());
|
Q_ASSERT(this->getIContextOwnAircraft()->isUsingImplementingObject());
|
||||||
Q_ASSERT(this->getIContextNetwork()->isUsingImplementingObject());
|
Q_ASSERT(this->getIContextNetwork()->isUsingImplementingObject());
|
||||||
IOwnAircraftProvider *ownAircraftProvider = this->getRuntime()->getCContextOwnAircraft();
|
IOwnAircraftProvider *ownAircraftProvider = this->getRuntime()->getCContextOwnAircraft();
|
||||||
|
|||||||
@@ -223,14 +223,14 @@ namespace BlackGui
|
|||||||
void CAtcStationComponent::ps_requestOnlineStationsUpdate()
|
void CAtcStationComponent::ps_requestOnlineStationsUpdate()
|
||||||
{
|
{
|
||||||
this->m_updateTimer->fireTimer();
|
this->m_updateTimer->fireTimer();
|
||||||
this->m_timestampLastReadOnlineStations = CUpdateTimer::epoch();
|
this->m_timestampLastReadOnlineStations = CUpdateTimer::epoch(); // mark as outdated
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAtcStationComponent::ps_infoAreaTabBarChanged(int index)
|
void CAtcStationComponent::ps_infoAreaTabBarChanged(int index)
|
||||||
{
|
{
|
||||||
// ignore in those cases
|
// ignore in those cases
|
||||||
if (!this->isVisibleWidget()) return;
|
if (!this->isVisibleWidget()) { return; }
|
||||||
if (this->isParentDockWidgetFloating()) return;
|
if (this->isParentDockWidgetFloating()) { return; }
|
||||||
|
|
||||||
// here I know I am the selected widget, update, but keep GUI responsive (-> timer)
|
// here I know I am the selected widget, update, but keep GUI responsive (-> timer)
|
||||||
QTimer::singleShot(1000, this, SLOT(update()));
|
QTimer::singleShot(1000, this, SLOT(update()));
|
||||||
|
|||||||
@@ -103,8 +103,12 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
CAircraftMapper *CSimulatorFsCommon::mapperInstance()
|
CAircraftMapper *CSimulatorFsCommon::mapperInstance()
|
||||||
{
|
{
|
||||||
|
static CVPilotModelMappings *mappings = new CVPilotModelMappings(true);
|
||||||
|
|
||||||
|
// tries to access simObjectsDir, if this is an mapped remote directory
|
||||||
|
// init might hang for a while
|
||||||
static CAircraftMapper *mapper = new CAircraftMapper(
|
static CAircraftMapper *mapper = new CAircraftMapper(
|
||||||
std::unique_ptr<CVPilotModelMappings>(new CVPilotModelMappings(true)), // currently hard wired
|
std::unique_ptr<CVPilotModelMappings>(mappings), // currently hard wired
|
||||||
simObjectsDir()
|
simObjectsDir()
|
||||||
);
|
);
|
||||||
return mapper;
|
return mapper;
|
||||||
|
|||||||
Reference in New Issue
Block a user