QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
A special locator widget which allows searching for matching results from a QgsLocator and presenting them to users for selection. More...
#include <qgslocatorwidget.h>
Public Slots | |
void | invalidateResults () |
Invalidates the current search results, e.g. | |
void | search (const QString &string) |
Triggers the locator widget to focus, open and start searching for a specified string. | |
Signals | |
void | configTriggered () |
Emitted when the configure option is triggered in the widget. | |
Public Member Functions | |
QgsLocatorWidget (QWidget *parent SIP_TRANSFERTHIS=nullptr) | |
Constructor for QgsLocatorWidget. | |
QgsLocator * | locator () |
Returns a pointer to the locator utilized by this widget. | |
void | setMapCanvas (QgsMapCanvas *canvas) |
Sets a map canvas to associate with the widget. | |
void | setPlaceholderText (const QString &text) |
Set placeholder text for the line edit. | |
void | setResultContainerAnchors (QgsFloatingWidget::AnchorPoint anchorPoint, QgsFloatingWidget::AnchorPoint anchorWidgetPoint) |
Sets the result container anchorPoint and anchorWidgetPoint position. | |
Protected Member Functions | |
bool | eventFilter (QObject *obj, QEvent *event) override |
A special locator widget which allows searching for matching results from a QgsLocator and presenting them to users for selection.
Definition at line 45 of file qgslocatorwidget.h.
QgsLocatorWidget::QgsLocatorWidget | ( | QWidget *parent | SIP_TRANSFERTHIS = nullptr | ) |
Constructor for QgsLocatorWidget.
Definition at line 34 of file qgslocatorwidget.cpp.
|
signal |
Emitted when the configure option is triggered in the widget.
|
overrideprotected |
Definition at line 250 of file qgslocatorwidget.cpp.
|
slot |
Invalidates the current search results, e.g.
as a result of changes to the locator filter settings.
Definition at line 182 of file qgslocatorwidget.cpp.
QgsLocator * QgsLocatorWidget::locator | ( | ) |
Returns a pointer to the locator utilized by this widget.
Definition at line 127 of file qgslocatorwidget.cpp.
|
slot |
Triggers the locator widget to focus, open and start searching for a specified string.
Definition at line 165 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 132 of file qgslocatorwidget.cpp.
void QgsLocatorWidget::setPlaceholderText | ( | const QString & | text | ) |
Set placeholder text for the line edit.
Definition at line 154 of file qgslocatorwidget.cpp.
void QgsLocatorWidget::setResultContainerAnchors | ( | QgsFloatingWidget::AnchorPoint | anchorPoint, |
QgsFloatingWidget::AnchorPoint | anchorWidgetPoint | ||
) |
Sets the result container anchorPoint and anchorWidgetPoint position.
Definition at line 159 of file qgslocatorwidget.cpp.