QGIS API Documentation 3.41.0-Master (181b2f43d8e)
|
Encapsulates properties of an individual matching result found by a QgsLocatorFilter. More...
#include <qgslocatorfilter.h>
Classes | |
struct | ResultAction |
The ResultAction stores basic information for additional actions to be used in a locator widget for the result. More... | |
Public Member Functions | |
QgsLocatorResult ()=default | |
QgsLocatorResult (QgsLocatorFilter *filter, const QString &displayString, const QVariant &userData=QVariant()) | |
Constructor for QgsLocatorResult. | |
void | setUserData (const QVariant &userData) |
Set userData for the locator result. | |
QVariant | userData () const |
Returns the userData . | |
Public Attributes | |
QList< QgsLocatorResult::ResultAction > | actions |
Additional actions to be used in a locator widget for the given result. | |
QgsLocatorFilter * | filter = nullptr |
Filter from which the result was obtained. | |
QIcon | icon |
Icon for result. | |
Properties | |
QString | description |
Descriptive text for result. | |
QString | displayString |
String displayed for result. | |
QString | group |
Group the results by categories If left as empty string, this means that results are all shown without being grouped. | |
double | groupScore = 0 |
Specifies the score of the group to allow ordering. | |
double | score = 0.5 |
Match score, from 0 - 1, where 1 represents a perfect match. | |
QVariant | userData |
Encapsulates properties of an individual matching result found by a QgsLocatorFilter.
Definition at line 37 of file qgslocatorfilter.h.
|
default |
|
inline |
Constructor for QgsLocatorResult.
Definition at line 55 of file qgslocatorfilter.h.
void QgsLocatorResult::setUserData | ( | const QVariant & | userData | ) |
Set userData for the locator result.
Definition at line 110 of file qgslocatorfilter.cpp.
QVariant QgsLocatorResult::userData | ( | ) | const |
QList<QgsLocatorResult::ResultAction> QgsLocatorResult::actions |
Additional actions to be used in a locator widget for the given result.
They could be displayed in a context menu.
Definition at line 152 of file qgslocatorfilter.h.
QgsLocatorFilter* QgsLocatorResult::filter = nullptr |
Filter from which the result was obtained.
This is automatically set.
Definition at line 78 of file qgslocatorfilter.h.
QIcon QgsLocatorResult::icon |
Icon for result.
Definition at line 93 of file qgslocatorfilter.h.
QString QgsLocatorResult::description |
Descriptive text for result.
Definition at line 43 of file qgslocatorfilter.h.
QString QgsLocatorResult::displayString |
String displayed for result.
Definition at line 42 of file qgslocatorfilter.h.
QString QgsLocatorResult::group |
Group the results by categories If left as empty string, this means that results are all shown without being grouped.
If a group is given, the results will be grouped by group under a header.
Definition at line 45 of file qgslocatorfilter.h.
double QgsLocatorResult::groupScore = 0 |
Specifies the score of the group to allow ordering.
Score must be positive, higher scores are shown first. If the scores are left to 0 or are identical, the sorting of groups is made alphabetically.
Definition at line 46 of file qgslocatorfilter.h.
double QgsLocatorResult::score = 0.5 |
Match score, from 0 - 1, where 1 represents a perfect match.
Definition at line 44 of file qgslocatorfilter.h.
|
readwrite |
Definition at line 41 of file qgslocatorfilter.h.