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