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

134 lines
4.1 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
2019-03-21 12:44:16 +10:00
Returns associated symbol. May be ``None``.
2017-06-06 11:03:05 +02:00
%End
2014-08-20 19:32:29 +07:00
QString label() const;
2017-06-06 11:03:05 +02:00
%Docstring
Returns text label
2017-06-06 11:03:05 +02:00
%End
2014-08-20 19:32:29 +07:00
QString ruleKey() const;
2017-06-06 11:03:05 +02:00
%Docstring
Returns unique identifier of the rule for identification of the item within renderer
2017-06-06 11:03:05 +02:00
%End
2014-08-20 19:32:29 +07:00
bool isCheckable() const;
2017-06-06 11:03:05 +02:00
%Docstring
Returns whether the item is user-checkable - whether renderer supports enabling/disabling it
2017-06-06 11:03:05 +02:00
%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
2019-02-26 19:54:09 +10:00
Determine whether given scale is within the scale range. Returns ``True`` if scale or scale range is invalid (value <= 0)
2017-06-06 11:03:05 +02:00
%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 );
2017-06-06 11:03:05 +02:00
%Docstring
Sets the symbol of the item.
Does not take ownership of symbol -- an internal clone is made of the symbol.
.. seealso:: :py:func:`symbol`
2017-06-06 11:03:05 +02:00
%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`
rather than QgsSymbolLegendNode instance as usual. Passing ``None`` removes any data-defined size legend settings.
2017-12-15 10:36:55 -04:00
Takes ownership of the settings object.
.. versionadded:: 3.0
%End
QgsDataDefinedSizeLegend *dataDefinedSizeLegendSettings() const;
%Docstring
Returns extra information for data-defined size legend rendering. Normally it returns ``None``.
2017-12-15 10:36:55 -04:00
.. 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 *
************************************************************************/