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,
81 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
82 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
83 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
84 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
85 QHash<int, QByteArray> roleNames()
const override;
107 QString groupTitle = QString();
108 int groupSorting = 0;
111 QList<Entry> mResults;
112 QSet<QString> mFoundResultsFromFilterNames;
113 QMap<QgsLocatorFilter *, QStringList> mFoundResultsFilterGroups;
114 bool mDeferredClear =
false;
115 QTimer mDeferredClearTimer;
163 void search(
const QString &
string );
174 void searchFinished();
180 QString mNextRequestedString;
181 bool mHasQueuedRequest =
false;
201 bool lessThan(
const QModelIndex &left,
const QModelIndex &right )
const override;
204 #endif // QGSLOCATORMODEL_H
A sort proxy model for QgsLocatorModel, which automatically sorts results by precedence.
The actions to be shown for the given result in a context menu.
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.