2017-05-14 09:48:41 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsmaphittest.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
class QgsMapHitTest
|
|
|
|
{
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Class that runs a hit test with given map settings. Based on the hit test it returns which symbols
|
|
|
|
will be visible on the map - this is useful for content based legend.
|
|
|
|
|
|
|
|
.. versionadded:: 2.6
|
2016-01-04 22:51:18 +11:00
|
|
|
%End
|
|
|
|
|
2017-05-14 09:48:41 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmaphittest.h"
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
public:
|
|
|
|
typedef QMap<QString, QString> LayerFilterExpression;
|
|
|
|
|
2017-05-14 18:24:07 +02:00
|
|
|
QgsMapHitTest( const QgsMapSettings &settings, const QgsGeometry &polygon = QgsGeometry(), const QgsMapHitTest::LayerFilterExpression &layerFilterExpression = QgsMapHitTest::LayerFilterExpression() );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
\param layerFilterExpression Expression string for each layer id to evaluate in order to refine the symbol selection
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-05-14 18:24:07 +02:00
|
|
|
QgsMapHitTest( const QgsMapSettings &settings, const QgsMapHitTest::LayerFilterExpression &layerFilterExpression );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Constructor version used with only expressions to filter symbols (no extent or polygon intersection)
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
|
|
|
void run();
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Runs the map hit test
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
bool symbolVisible( QgsSymbol *symbol, QgsVectorLayer *layer ) const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Tests whether a symbol is visible for a specified layer.
|
|
|
|
\param symbol symbol to find
|
|
|
|
\param layer vector layer
|
|
|
|
.. versionadded:: 2.12
|
|
|
|
.. seealso:: legendKeyVisible()
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
bool legendKeyVisible( const QString &ruleKey, QgsVectorLayer *layer ) const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Tests whether a given legend key is visible for a specified layer.
|
|
|
|
\param ruleKey legend rule key
|
|
|
|
\param layer vector layer
|
|
|
|
.. versionadded:: 2.14
|
|
|
|
.. seealso:: symbolVisible()
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2016-01-25 13:05:36 +11:00
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
};
|
2017-05-14 09:48:41 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsmaphittest.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|