21#ifndef NAVAIDSEARCHMODEL_HXX
22#define NAVAIDSEARCHMODEL_HXX
24#include <QAbstractListModel>
44 GeodRole = Qt::UserRole + 1,
45 GuidRole = Qt::UserRole + 2,
46 IdentRole = Qt::UserRole + 3,
47 NameRole = Qt::UserRole + 4,
48 IconRole = Qt::UserRole + 5,
49 TypeRole = Qt::UserRole + 6,
50 NavFrequencyRole = Qt::UserRole + 7
69 Q_INVOKABLE
void clear();
75 return m_searchActive;
80 int rowCount(
const QModelIndex&)
const override;
82 QVariant
data(
const QModelIndex& index,
int role)
const override;
88 QHash<int, QByteArray>
roleNames()
const override;
101 void onSearchResultsPoll();
108 bool m_searchActive =
false;
109 bool m_airportsOnly =
false;
110 int m_maxResults = 0;
111 QScopedPointer<flightgear::NavDataCache::ThreadedGUISearch> m_search;
SGSharedPtr< FGPositioned > FGPositionedRef
void setItems(const FGPositionedList &items)
QVariant data(const QModelIndex &index, int role) const override
int rowCount(const QModelIndex &) const override
NavaidSearchModel(QObject *parent=nullptr)
FGPositionedRef itemAtRow(unsigned int row) const
void airportsOnlyChanged()
void haveExistingSearchChanged()
Q_INVOKABLE void setSearch(QString t, AircraftType aircraft=Unknown)
bool isSearchActive() const
QHash< int, QByteArray > roleNames() const override
void searchActiveChanged()
Q_INVOKABLE qlonglong guidAtIndex(int index) const
std::vector< PositionedID > PositionedIDVec
std::vector< FGPositionedRef > FGPositionedList