44 return !search.isEmpty() && candidate.contains( search, Qt::CaseInsensitive );
69 return mUseWithoutPrefix;
82 if ( mActivePrefifx.isNull() )
85 return mActivePrefifx;
void setEnabled(bool enabled)
Sets whether the filter is enabled.
MessageLevel
Level for messages This will be used both for message log and message bar in application.
static bool stringMatches(const QString &candidate, const QString &search)
Tests a candidate string to see if it should be considered a match for a specified search string...
virtual void triggerResultFromAction(const QgsLocatorResult &result, const int actionId)
Triggers a filter result from this filter for an entry in the context menu.
void setUseWithoutPrefix(bool useWithoutPrefix)
Sets whether the filter should be used when no prefix is entered.
void logMessage(const QString &message, Qgis::MessageLevel level=Qgis::Info)
Logs a message to the log panel.
static void logMessage(const QString &message, const QString &tag=QString(), Qgis::MessageLevel level=Qgis::Warning, bool notifyUser=true)
Adds a message to the log instance (and creates it if necessary).
Encapsulates properties of an individual matching result found by a QgsLocatorFilter.
bool useWithoutPrefix() const
Returns true if the filter should be used when no prefix is entered.
QgsLocatorFilter(QObject *parent=nullptr)
Constructor for QgsLocatorFilter.
void setActivePrefix(const QString &activePrefix)
Sets the prefix as being used by the locator.
QString activePrefix() const
Returns the prefix in use in the locator is entered.
virtual QgsLocatorFilter::Flags flags() const
Returns flags which specify the filter's behavior.
virtual QString prefix() const
Returns the search prefix character(s) for this filter.
virtual QString name() const =0
Returns the unique name for the filter.
bool enabled() const
Returns true if the filter is enabled.
virtual void openConfigWidget(QWidget *parent=nullptr)
Opens the configuration widget for the filter (if it has one), with the specified parent widget...
virtual bool hasConfigWidget() const
Should return true if the filter has a configuration widget.