QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
QgsLocatorWidget Class Reference

A special locator widget which allows searching for matching results from a QgsLocator and presenting them to users for selection. More...

#include <qgslocatorwidget.h>

Inheritance diagram for QgsLocatorWidget:
Inheritance graph
[legend]

Public Slots

void invalidateResults ()
 Invalidates the current search results, e.g. More...
 
void search (const QString &string)
 Triggers the locator widget to focus, open and start searching for a specified string. More...
 

Signals

void configTriggered ()
 Emitted when the configure option is triggered in the widget. More...
 

Public Member Functions

 QgsLocatorWidget (QWidget *parent SIP_TRANSFERTHIS=nullptr)
 Constructor for QgsLocatorWidget. More...
 
QgsLocatorlocator ()
 Returns a pointer to the locator utilized by this widget. More...
 
void setMapCanvas (QgsMapCanvas *canvas)
 Sets a map canvas to associate with the widget. More...
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event) override
 

Detailed Description

A special locator widget which allows searching for matching results from a QgsLocator and presenting them to users for selection.

See also
QgsLocator
Since
QGIS 3.0

Definition at line 45 of file qgslocatorwidget.h.

Constructor & Destructor Documentation

QgsLocatorWidget::QgsLocatorWidget ( QWidget *parent  SIP_TRANSFERTHIS = nullptr)

Constructor for QgsLocatorWidget.

Definition at line 31 of file qgslocatorwidget.cpp.

Member Function Documentation

void QgsLocatorWidget::configTriggered ( )
signal

Emitted when the configure option is triggered in the widget.

bool QgsLocatorWidget::eventFilter ( QObject *  obj,
QEvent *  event 
)
overrideprotected

Definition at line 185 of file qgslocatorwidget.cpp.

void QgsLocatorWidget::invalidateResults ( )
slot

Invalidates the current search results, e.g.

as a result of changes to the locator filter settings.

Definition at line 135 of file qgslocatorwidget.cpp.

QgsLocator * QgsLocatorWidget::locator ( )

Returns a pointer to the locator utilized by this widget.

Definition at line 117 of file qgslocatorwidget.cpp.

void QgsLocatorWidget::search ( const QString &  string)
slot

Triggers the locator widget to focus, open and start searching for a specified string.

Definition at line 127 of file qgslocatorwidget.cpp.

void QgsLocatorWidget::setMapCanvas ( QgsMapCanvas canvas)

Sets a map canvas to associate with the widget.

This allows the widget to customize the searches performed by its locator(), such as prioritizing results which are near the current canvas extent.

Definition at line 122 of file qgslocatorwidget.cpp.


The documentation for this class was generated from the following files: