mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
46 lines
1.1 KiB
C++
46 lines
1.1 KiB
C++
#ifndef BLACKSIM_FSCOMMON_AIRCRAFTINDEXER_H
|
|
#define BLACKSIM_FSCOMMON_AIRCRAFTINDEXER_H
|
|
|
|
#include "aircraftcfgentrieslist.h"
|
|
#include <QObject>
|
|
#include <QtConcurrent/QtConcurrent>
|
|
|
|
namespace BlackSim
|
|
{
|
|
namespace FsCommon
|
|
{
|
|
/*!
|
|
* \brief Indexer for all modelsThe CAircraftIndexer class
|
|
*/
|
|
class CAircraftIndexer : QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
private:
|
|
//! Constructor
|
|
CAircraftIndexer(QObject *parent = nullptr);
|
|
|
|
CAircraftCfgEntriesList m_entries; //!< all entries
|
|
|
|
signals:
|
|
void entriesRead(int number);
|
|
|
|
public:
|
|
//! Single entity indexer
|
|
static CAircraftIndexer &indexer()
|
|
{
|
|
static CAircraftIndexer indexer;
|
|
return indexer;
|
|
}
|
|
|
|
//! Read for directory or re-read
|
|
static int read(const QString directory = "");
|
|
|
|
//! Read in background
|
|
static QFuture<int> readInBackground(const QString directory = "");
|
|
|
|
};
|
|
}
|
|
}
|
|
#endif // guard
|