31#include <QFutureWatcher>
105 QList< QgsLocatorFilter *>
filters(
const QString &prefix = QString() );
113 Q_DECL_DEPRECATED QMap<QString, QgsLocatorFilter *>
prefixedFilters()
const;
198 std::unique_ptr< QgsFeedback > mOwnedFeedback;
200 QList< QgsLocatorFilter * > mFilters;
201 QList< QThread * > mActiveThreads;
203 QStringList mAutocompletionList;
205 void cancelRunningQuery();
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Encapsulates the properties relating to the context of a locator search.
Abstract base class for filters which collect locator results.
Encapsulates properties of an individual matching result found by a QgsLocatorFilter.
static QgsSettingsTreeNamedListNode * sTreeLocatorFilters
static const QList< QString > CORE_FILTERS
List of core filters (i.e. not plugin filters).
void searchPrepared()
Emitted when locator has prepared the search (.
void cancel()
Cancels any current running query, and blocks until query is completely canceled by all filters.
QgsLocator(QObject *parent=nullptr)
Constructor for QgsLocator.
static const QgsSettingsEntryBool * settingsLocatorFilterDefault
Settings entry locator filter default value.
void registerFilter(QgsLocatorFilter *filter)
Registers a filter within the locator.
void finished()
Emitted when locator has finished a query, either as a result of successful completion or early cance...
void foundResult(const QgsLocatorResult &result)
Emitted whenever a filter encounters a matching result after the fetchResults() method is called.
void fetchResults(const QString &string, const QgsLocatorContext &context, QgsFeedback *feedback=nullptr)
Triggers the background fetching of filter results for a specified search string.
void clearPreviousResults()
Will call clearPreviousResults on all filters.
static const QgsSettingsEntryBool * settingsLocatorFilterEnabled
Settings entry locator filter enabled.
Q_DECL_DEPRECATED QMap< QString, QgsLocatorFilter * > prefixedFilters() const
Returns a map of prefix to filter, for all registered filters with valid prefixes.
bool isRunning() const
Returns true if a query is currently being executed by the locator.
static const QgsSettingsEntryString * settingsLocatorFilterPrefix
Settings entry locator filter prefix.
void cancelWithoutBlocking()
Triggers cancellation of any current running query without blocking.
QList< QgsLocatorFilter * > filters(const QString &prefix=QString())
Returns the list of filters registered in the locator.
void deregisterFilter(QgsLocatorFilter *filter)
Deregisters a filter from the locator and deletes it.
QStringList completionList() const
Returns the list for auto completion This list is updated when preparing the search.
A boolean settings entry.
A named list tree node for the settings tree to help organizing and introspecting the tree.
QgsSettingsTreeNamedListNode * createNamedListNode(const QString &key, const Qgis::SettingsTreeNodeOptions &options=Qgis::SettingsTreeNodeOptions())
Creates a named list tree node.
static QgsSettingsTreeNode * treeRoot()
Returns the tree root node for the settings tree.