23#include <QAbstractListModel>
26#include "geomaps/Waypoint.h"
89 [[nodiscard]]
int rowCount(
const QModelIndex& parent = {})
const override;
99 [[nodiscard]] QVariant
data(
const QModelIndex& index,
int role)
const override;
105 [[nodiscard]] QHash<int, QByteArray>
roleNames()
const override;
111 void resetMapWaypoints();
114 [[nodiscard]]
static int libraryRowCount();
118 QList<GeoMaps::Waypoint> m_mapWaypoints;
119 QStringList m_mapSearchKeys;
@ WaypointRole
The waypoint, of type GeoMaps::Waypoint.
@ SearchKeyRole
Pre-simplified search key, a QString.
@ NameRole
Name of the waypoint, a QString.
QHash< int, QByteArray > roleNames() const override
Implementation of QAbstractListModel::roleNames.
QVariant data(const QModelIndex &index, int role) const override
Implementation of QAbstractListModel::data.
WaypointSearchModel(QObject *parent=nullptr)
Standard constructor.
int rowCount(const QModelIndex &parent={}) const override
Implementation of QAbstractListModel::rowCount.