1 /*************************************************************************** 2 qgsbookmarklocatorfilters.h 3 -------------------------- 4 begin : May 2017 5 copyright : (C) 2017 by Nyall Dawson 6 email : nyall dot dawson at gmail dot com 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef QGSBOOKMARKLOCATORFILTERS_H 19 #define QGSBOOKMARKLOCATORFILTERS_H 20 21 #include "qgis_app.h" 22 #include "qgslocatorfilter.h" 23 24 25 class APP_EXPORT QgsBookmarkLocatorFilter : public QgsLocatorFilter 26 { 27 Q_OBJECT 28 29 public: 30 31 QgsBookmarkLocatorFilter( QObject *parent = nullptr ); 32 QgsBookmarkLocatorFilter *clone() const override; name()33 QString name() const override { return QStringLiteral( "bookmarks" ); } displayName()34 QString displayName() const override { return tr( "Spatial Bookmarks" ); } priority()35 Priority priority() const override { return Highest; } prefix()36 QString prefix() const override { return QStringLiteral( "b" ); } flags()37 QgsLocatorFilter::Flags flags() const override { return QgsLocatorFilter::FlagFast; } 38 39 void fetchResults( const QString &string, const QgsLocatorContext &context, QgsFeedback *feedback ) override; 40 void triggerResult( const QgsLocatorResult &result ) override; 41 }; 42 43 #endif // QGSBOOKMARKLOCATORFILTERS_H 44