QGIS/python/core/symbology/qgslegendsymbolitem.sip.in

131 lines
4.0 KiB
Plaintext
Raw Normal View History

2017-06-06 11:03:05 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgslegendsymbolitem.h *
2017-06-06 11:03:05 +02:00
* *
* 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
2017-12-15 10:36:55 -04:00
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.
2017-06-06 11:03:05 +02:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:class:`QgsSymbolLegendNode`
2017-12-15 10:36:55 -04:00
2017-06-06 11:03:05 +02:00
.. 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();
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLegendSymbolItem.
%End
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
2017-12-15 10:36:55 -04:00
Construct item. Does not take ownership of symbol (makes internal clone)
2017-06-06 11:03:05 +02:00
.. versionadded:: 2.8
%End
2016-08-06 11:01:42 +02:00
~QgsLegendSymbolItem();
2017-06-26 12:18:34 +10:00
QgsLegendSymbolItem( const QgsLegendSymbolItem &other );
2014-08-20 19:32:29 +07:00
QgsSymbol *symbol() const;
2017-06-06 11:03:05 +02:00
%Docstring
Return associated symbol. May be null.
%End
2014-08-20 19:32:29 +07:00
QString label() const;
2017-06-06 11:03:05 +02:00
%Docstring
Return text label
%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
%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
%End
2014-08-20 19:32:29 +07: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
%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)
%End
2014-08-20 19:32:29 +07:00
int scaleMinDenom() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Min scale denominator of the scale range. For range 1:1000 to 1:2000 this will return 1000.
Value <= 0 means the range is unbounded on this side
2017-06-06 11:03:05 +02:00
%End
2014-08-20 19:32:29 +07:00
int scaleMaxDenom() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Max scale denominator of the scale range. For range 1:1000 to 1:2000 this will return 2000.
Value <= 0 means the range is unbounded on this side
2017-06-06 11:03:05 +02:00
%End
2014-08-20 19:32:29 +07:00
int level() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-12 23:24:01 +01:00
Indentation level that tells how deep the item is in a hierarchy of items. For flat lists level is 0
2017-06-06 11:03:05 +02:00
%End
QString parentRuleKey() const;
2017-06-06 11:03:05 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Key of the parent legend node. For legends with tree hierarchy
2017-06-06 11:03:05 +02:00
.. note::
Parameter parentRuleKey added in QGIS 2.8
%End
void setSymbol( QgsSymbol *s /Transfer/ );
2017-06-06 11:03:05 +02:00
%Docstring
Set symbol of the item. Takes ownership of symbol.
%End
void setDataDefinedSizeLegendSettings( QgsDataDefinedSizeLegend *settings /Transfer/ );
%Docstring
2017-12-19 11:43:52 -04:00
Sets extra information about data-defined size. If set, this item should be converted to :py:class:`QgsDataDefinedSizeLegendNode`
2017-12-15 10:36:55 -04:00
rather than QgsSymbolLegendNode instance as usual. Passing null removes any data-defined size legend settings.
Takes ownership of the settings object.
.. versionadded:: 3.0
%End
QgsDataDefinedSizeLegend *dataDefinedSizeLegendSettings() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns extra information for data-defined size legend rendering. Normally it returns null.
.. versionadded:: 3.0
%End
2014-08-20 19:32:29 +07:00
};
typedef QList< QgsLegendSymbolItem > QgsLegendSymbolList;
2017-06-06 11:03:05 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
2017-08-06 13:39:03 +02:00
* src/core/symbology/qgslegendsymbolitem.h *
2017-06-06 11:03:05 +02:00
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/