1 /***************************************************************************
2                          qgslocatorcontext.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 QGSLOCATORCONTEXT_H
19 #define QGSLOCATORCONTEXT_H
20 
21 #include "qgis_core.h"
22 #include "qgsrectangle.h"
23 #include "qgscoordinatereferencesystem.h"
24 
25 /**
26  * \class QgsLocatorContext
27  * \ingroup core
28  * \brief Encapsulates the properties relating to the context of a locator search.
29  * \since QGIS 3.0
30  */
31 class CORE_EXPORT QgsLocatorContext
32 {
33   public:
34 
35     /**
36      * Constructor for QgsLocatorContext.
37      */
38     QgsLocatorContext() = default;
39 
40     /**
41      * Map extent to target in results. This can be used to prioritize searching
42      * for results close to the current map extent. The CRS for the extent
43      * is specified by targetExtentCrs.
44      * \see targetExtentCrs
45      */
46     QgsRectangle targetExtent;
47 
48     /**
49      * Coordinate reference system for the map extent variable.
50      * \see targetExtent
51      */
52     QgsCoordinateReferenceSystem targetExtentCrs;
53 
54     /**
55      * Will be TRUE if search is being conducted using a filter prefix.
56      */
57     bool usingPrefix = false;
58 
59 };
60 
61 #endif // QGSLOCATORCONTEXT_H
62 
63 
64