-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a context variable for locator searches
This allows encapsulation of properties relating to the context of a search, such as a target map extent. Locator filters could use this to prioritise results close to the current canvas extent.
- Loading branch information
1 parent
376d6b3
commit a7d590e
Showing
12 changed files
with
150 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/locator/qgslocatorcontext.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
class QgsLocatorContext | ||
{ | ||
%Docstring | ||
Encapsulates the properties relating to the context of a locator search. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgslocatorcontext.h" | ||
%End | ||
public: | ||
|
||
QgsLocatorContext(); | ||
%Docstring | ||
Constructor for QgsLocatorContext. | ||
%End | ||
|
||
QgsRectangle targetExtent; | ||
%Docstring | ||
Map extent to target in results. This can be used to prioritize searching | ||
for results close to the current map extent. The CRS for the extent | ||
is specified by targetExtentCrs. | ||
.. seealso:: targetExtentCrs | ||
%End | ||
|
||
QgsCoordinateReferenceSystem targetExtentCrs; | ||
%Docstring | ||
Coordinate reference system for the map extent variable. | ||
.. seealso:: targetExtent | ||
%End | ||
|
||
}; | ||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/locator/qgslocatorcontext.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/*************************************************************************** | ||
qgslocatorcontext.h | ||
------------------ | ||
begin : May 2017 | ||
copyright : (C) 2017 by Nyall Dawson | ||
email : nyall dot dawson at gmail dot com | ||
***************************************************************************/ | ||
|
||
/*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
#ifndef QGSLOCATORCONTEXT_H | ||
#define QGSLOCATORCONTEXT_H | ||
|
||
#include "qgis_gui.h" | ||
#include "qgsrectangle.h" | ||
#include "qgscoordinatereferencesystem.h" | ||
|
||
/** | ||
* \class QgsLocatorContext | ||
* \ingroup gui | ||
* Encapsulates the properties relating to the context of a locator search. | ||
* \since QGIS 3.0 | ||
*/ | ||
class GUI_EXPORT QgsLocatorContext | ||
{ | ||
public: | ||
|
||
/** | ||
* Constructor for QgsLocatorContext. | ||
*/ | ||
QgsLocatorContext() = default; | ||
|
||
/** | ||
* Map extent to target in results. This can be used to prioritize searching | ||
* for results close to the current map extent. The CRS for the extent | ||
* is specified by targetExtentCrs. | ||
* \see targetExtentCrs | ||
*/ | ||
QgsRectangle targetExtent; | ||
|
||
/** | ||
* Coordinate reference system for the map extent variable. | ||
* \see targetExtent | ||
*/ | ||
QgsCoordinateReferenceSystem targetExtentCrs; | ||
|
||
}; | ||
|
||
#endif // QGSLOCATORCONTEXT_H | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters