18 #ifndef QGSLOCATORMODEL_H 19 #define QGSLOCATORMODEL_H 21 #include "qgis_core.h" 23 #include <QAbstractListModel> 26 #include <QSortFilterProxyModel> 48 static const int NoGroup = 9999;
53 ResultDataRole = Qt::UserRole + 1,
80 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
81 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
82 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
83 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
105 QString groupTitle = QString();
106 int groupSorting = 0;
109 QList<Entry> mResults;
110 QSet<QString> mFoundResultsFromFilterNames;
111 QMap<QgsLocatorFilter *, QStringList> mFoundResultsFilterGroups;
112 bool mDeferredClear =
false;
113 QTimer mDeferredClearTimer;
161 void search(
const QString &
string );
172 void searchFinished();
178 QString mNextRequestedString;
179 bool mHasQueuedRequest =
false;
199 bool lessThan(
const QModelIndex &left,
const QModelIndex &right )
const override;
202 #endif // QGSLOCATORMODEL_H
A sort proxy model for QgsLocatorModel, which automatically sorts results by precedence.
A QgsLocatorModel which has is associated directly with a QgsLocator, and is automatically populated ...
Group results within the same filter results.
Encapsulates the properties relating to the context of a locator search.
Encapsulates properties of an individual matching result found by a QgsLocatorFilter.
Abstract base class for filters which collect locator results.
Handles the management of QgsLocatorFilter objects and async collection of search results from them...
An abstract list model for displaying the results of locator searches.
Result priority, used by QgsLocatorProxyModel for sorting roles.
Result match score, used by QgsLocatorProxyModel for sorting roles.
Associated filter name which created the result.