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:
|
2017-09-28 08:17:06 +10:00
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
QgsLegendSymbolItem();
|
2017-09-28 08:17:06 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsLegendSymbolItem.
|
2017-09-28 08:17:06 +10:00
|
|
|
%End
|
|
|
|
|
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
|
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
|
|
|
|
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.
|
|
|
|
%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
|
|
|
|
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
|
|
|
|
%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
|
2017-10-05 11:51:04 +10:00
|
|
|
|
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
|
2017-10-05 11:51:04 +10:00
|
|
|
|
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
|
|
|
|
2014-09-12 11:40:15 +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
|
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
|
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
|
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
|
|
|
|
|
2017-06-15 16:47:56 +02:00
|
|
|
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.
|
2017-06-15 16:47:56 +02:00
|
|
|
|
|
|
|
.. 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.
|
|
|
|
|
2017-06-15 16:47:56 +02:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
2014-08-20 19:32:29 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-06-09 17:22:59 +02: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 *
|
|
|
|
************************************************************************/
|