FlightGear next
LocalAircraftCache Class Reference

#include <LocalAircraftCache.hxx>

Inherits QObject.

Classes

class  AircraftCachePrivate
 

Public Types

enum  AircraftStatus { AircraftOk = 0 , AircraftUnmaintained , AircraftNeedsNewerSimulator , AircraftNeedsOlderSimulator }
 
enum  PackageStatus {
  PackageNotInstalled = 0 , PackageInstalled , PackageUpdateAvailable , PackageQueued ,
  PackageDownloading , NotPackaged , PackageInstallFailed
}
 
enum class  ParseSetXMLResult { Ok , Failed , Retry }
 

Signals

void scanStarted ()
 
void scanCompleted ()
 
void cleared ()
 
void addedItems (int count)
 

Public Member Functions

 ~LocalAircraftCache ()
 
void setPaths (QStringList paths)
 
QStringList paths () const
 
void scanDirs ()
 
int itemCount () const
 
QVector< AircraftItemPtrallItems () const
 
AircraftItemPtr itemAt (int index) const
 
AircraftItemPtr findItemWithUri (QUrl aircraftUri) const
 
int findIndexWithUri (QUrl aircraftUri) const
 
AircraftItemPtr primaryItemFor (AircraftItemPtr item) const
 
QVariant aircraftStatus (AircraftItemPtr item) const
 
ParseSetXMLResult readAircraftProperties (const SGPath &path, SGPropertyNode_ptr props)
 readAircraftProperties - helper to parse a -set.xml, but with the correct path setup (root, aircradft dirs, current aircraft dir)
 

Static Public Member Functions

static LocalAircraftCacheinstance ()
 
static void reset ()
 
static bool isCandidateAircraftPath (QString path)
 @helper to determine if a particular path is likely to contain aircraft or not.
 
static int ratingFromProperties (SGPropertyNode *node, int ratingIndex)
 

Detailed Description

Definition at line 106 of file LocalAircraftCache.hxx.

Member Enumeration Documentation

◆ AircraftStatus

Enumerator
AircraftOk 
AircraftUnmaintained 
AircraftNeedsNewerSimulator 
AircraftNeedsOlderSimulator 

Definition at line 142 of file LocalAircraftCache.hxx.

◆ PackageStatus

Enumerator
PackageNotInstalled 
PackageInstalled 
PackageUpdateAvailable 
PackageQueued 
PackageDownloading 
NotPackaged 
PackageInstallFailed 

Definition at line 150 of file LocalAircraftCache.hxx.

◆ ParseSetXMLResult

Enumerator
Ok 
Failed 
Retry 

aircraft scan in progress, try again later

Definition at line 166 of file LocalAircraftCache.hxx.

Constructor & Destructor Documentation

◆ ~LocalAircraftCache()

LocalAircraftCache::~LocalAircraftCache ( )

Definition at line 612 of file LocalAircraftCache.cxx.

Member Function Documentation

◆ addedItems

void LocalAircraftCache::addedItems ( int count)
signal

◆ aircraftStatus()

QVariant LocalAircraftCache::aircraftStatus ( AircraftItemPtr item) const

◆ allItems()

QVector< AircraftItemPtr > LocalAircraftCache::allItems ( ) const

Definition at line 673 of file LocalAircraftCache.cxx.

◆ cleared

void LocalAircraftCache::cleared ( )
signal

◆ findIndexWithUri()

int LocalAircraftCache::findIndexWithUri ( QUrl aircraftUri) const

Definition at line 683 of file LocalAircraftCache.cxx.

◆ findItemWithUri()

AircraftItemPtr LocalAircraftCache::findItemWithUri ( QUrl aircraftUri) const

Definition at line 718 of file LocalAircraftCache.cxx.

◆ instance()

LocalAircraftCache * LocalAircraftCache::instance ( )
static

Definition at line 590 of file LocalAircraftCache.cxx.

◆ isCandidateAircraftPath()

bool LocalAircraftCache::isCandidateAircraftPath ( QString path)
static

@helper to determine if a particular path is likely to contain aircraft or not.

Checks for -set.xml files one level down in the tree.

Definition at line 764 of file LocalAircraftCache.cxx.

◆ itemAt()

AircraftItemPtr LocalAircraftCache::itemAt ( int index) const

Definition at line 678 of file LocalAircraftCache.cxx.

◆ itemCount()

int LocalAircraftCache::itemCount ( ) const

Definition at line 668 of file LocalAircraftCache.cxx.

◆ paths()

QStringList LocalAircraftCache::paths ( ) const

Definition at line 635 of file LocalAircraftCache.cxx.

◆ primaryItemFor()

AircraftItemPtr LocalAircraftCache::primaryItemFor ( AircraftItemPtr item) const

Definition at line 703 of file LocalAircraftCache.cxx.

◆ ratingFromProperties()

int LocalAircraftCache::ratingFromProperties ( SGPropertyNode * node,
int ratingIndex )
static

Definition at line 790 of file LocalAircraftCache.cxx.

◆ readAircraftProperties()

LocalAircraftCache::ParseSetXMLResult LocalAircraftCache::readAircraftProperties ( const SGPath & path,
SGPropertyNode_ptr props )

readAircraftProperties - helper to parse a -set.xml, but with the correct path setup (root, aircradft dirs, current aircraft dir)

Parameters
path: full path to the -set.xml file
props: property node to be populated
Returns
status indication

Definition at line 798 of file LocalAircraftCache.cxx.

◆ reset()

void LocalAircraftCache::reset ( )
static

Definition at line 599 of file LocalAircraftCache.cxx.

◆ scanCompleted

void LocalAircraftCache::scanCompleted ( )
signal

◆ scanDirs()

void LocalAircraftCache::scanDirs ( )

Definition at line 640 of file LocalAircraftCache.cxx.

◆ scanStarted

void LocalAircraftCache::scanStarted ( )
signal

◆ setPaths()

void LocalAircraftCache::setPaths ( QStringList paths)

Definition at line 624 of file LocalAircraftCache.cxx.


The documentation for this class was generated from the following files: