2017-06-06 11:03:05 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/symbology-ng/qgslegendsymbolitem.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-20 19:32:29 +07:00
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
class QgsLegendSymbolItem
|
2014-08-20 19:32:29 +07:00
|
|
|
{
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
The class stores information about one class/rule of a vector layer renderer in a unified way
|
|
|
|
that can be used by legend model for rendering of legend.
|
|
|
|
|
|
|
|
.. seealso:: QgsSymbolLegendNode
|
|
|
|
.. versionadded:: 2.6
|
2014-08-20 19:32:29 +07:00
|
|
|
%End
|
|
|
|
|
2017-06-06 11:03:05 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslegendsymbolitem.h"
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
public:
|
2016-08-06 11:01:42 +02:00
|
|
|
QgsLegendSymbolItem();
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsLegendSymbolItem( QgsSymbol *symbol, const QString &label, const QString &ruleKey, bool checkable = false, int scaleMinDenom = -1, int scaleMaxDenom = -1, int level = 0, const QString &parentRuleKey = QString() );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
.. versionadded:: 2.8
|
|
|
|
%End
|
2016-08-06 11:01:42 +02:00
|
|
|
~QgsLegendSymbolItem();
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsLegendSymbolItem( const QgsLegendSymbolItem &other );
|
2014-08-20 19:32:29 +07:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsSymbol *symbol() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Return associated symbol. May be null.
|
|
|
|
:rtype: QgsSymbol
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
QString label() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Return text label
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
QString ruleKey() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Return unique identifier of the rule for identification of the item within renderer
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
bool isCheckable() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Return whether the item is user-checkable - whether renderer supports enabling/disabling it
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
QgsSymbol *legacyRuleKey() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Used for older code that identifies legend entries from symbol pointer within renderer
|
|
|
|
:rtype: QgsSymbol
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
|
|
|
|
bool isScaleOK( double scale ) const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Determine whether given scale is within the scale range. Returns true if scale or scale range is invalid (value <= 0)
|
|
|
|
:rtype: bool
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
int scaleMinDenom() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Value <= 0 means the range is unbounded on this side
|
|
|
|
:rtype: int
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
int scaleMaxDenom() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Value <= 0 means the range is unbounded on this side
|
|
|
|
:rtype: int
|
|
|
|
%End
|
2014-08-20 19:32:29 +07:00
|
|
|
|
2014-09-12 11:40:15 +07:00
|
|
|
int level() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Identation level that tells how deep the item is in a hierarchy of items. For flat lists level is 0
|
|
|
|
:rtype: int
|
|
|
|
%End
|
2014-09-12 11:40:15 +07:00
|
|
|
|
2015-01-22 12:23:05 +07:00
|
|
|
QString parentRuleKey() const;
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
.. note::
|
|
|
|
|
|
|
|
Parameter parentRuleKey added in QGIS 2.8
|
|
|
|
:rtype: str
|
|
|
|
%End
|
2015-12-08 06:32:23 +11:00
|
|
|
|
2017-05-01 18:13:15 +02:00
|
|
|
void setSymbol( QgsSymbol *s /Transfer/ );
|
2017-06-06 11:03:05 +02:00
|
|
|
%Docstring
|
|
|
|
Set symbol of the item. Takes ownership of symbol.
|
|
|
|
%End
|
|
|
|
|
2014-08-20 19:32:29 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
typedef QList< QgsLegendSymbolItem > QgsLegendSymbolListV2;
|
2017-06-06 11:03:05 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/symbology-ng/qgslegendsymbolitem.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|