mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
Ref T125, utility functions
This commit is contained in:
committed by
Mathew Sutcliffe
parent
c6f3a7033d
commit
329b0512eb
@@ -37,6 +37,11 @@ namespace BlackMisc
|
||||
return this->m_simulatorDirectory;
|
||||
}
|
||||
|
||||
bool CSimulatorSettings::hasSimulatorDirectory() const
|
||||
{
|
||||
return !getSimulatorDirectory().isEmpty();
|
||||
}
|
||||
|
||||
void CSimulatorSettings::setModelDirectories(const QStringList &modelDirectories)
|
||||
{
|
||||
this->m_modelDirectories = modelDirectories;
|
||||
|
||||
@@ -53,6 +53,9 @@ namespace BlackMisc
|
||||
//! Simulator directory
|
||||
const QString &getSimulatorDirectory() const;
|
||||
|
||||
//! Setting has simulator setting
|
||||
bool hasSimulatorDirectory() const;
|
||||
|
||||
//! Set model directories
|
||||
void setModelDirectories(const QStringList &modelDirectories);
|
||||
|
||||
|
||||
@@ -119,7 +119,13 @@ namespace BlackMisc
|
||||
{
|
||||
const QString xp = xplaneRootDir();
|
||||
if (xp.isEmpty()) { return xp; }
|
||||
return CFileUtils::appendFilePaths(xp, "/Resources/plugins");
|
||||
return CFileUtils::appendFilePaths(xp, xplanePluginPath());
|
||||
}
|
||||
|
||||
QString CXPlaneUtil::xplanePluginPath()
|
||||
{
|
||||
static const QString p("/Resources/plugins");
|
||||
return p;
|
||||
}
|
||||
|
||||
bool CXPlaneUtil::isXplanePluginDirDirExisting()
|
||||
|
||||
@@ -45,10 +45,13 @@ namespace BlackMisc
|
||||
//! Is the xplaneRootDir existing?
|
||||
static bool isXplaneRootDirExisting();
|
||||
|
||||
//! XPlane root directory
|
||||
//! XPlane plugin directory
|
||||
//! In case more then one XPlane version is found, the path to the highest version is used
|
||||
static QString xplanePluginDir();
|
||||
|
||||
//! XPlane relative plugin path
|
||||
static QString xplanePluginPath();
|
||||
|
||||
//! Is the xplanePluginDir existing?
|
||||
static bool isXplanePluginDirDirExisting();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user