1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pointcloud/qgspointcloudclassifiedrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsPointCloudCategory
{
%Docstring(signature="appended")
Represents an individual category (class) from a
:py:class:`QgsPointCloudClassifiedRenderer`.
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgspointcloudclassifiedrenderer.h"
%End
public:
QgsPointCloudCategory();
QgsPointCloudCategory( int value, const QColor &color, const QString &label, bool render = true, double pointSize = 0 );
%Docstring
Constructor for a new QgsPointCloudCategory, with the specified
``value`` and ``color``.
The ``label`` argument specifies the label used for this category in
legends and the layer tree.
The ``render`` argument indicates whether the category should initially
be rendered and appear checked in the layer tree.
A positive ``pointSize`` argument overrides the layer's point size
setting for this category (added in QGIS 3.36).
%End
bool operator==( const QgsPointCloudCategory &other ) const;
int value() const;
%Docstring
Returns the value corresponding to this category.
.. seealso:: :py:func:`setValue`
%End
QColor color() const;
%Docstring
Returns the color which will be used to render this category.
.. seealso:: :py:func:`setColor`
%End
double pointSize() const;
%Docstring
Returns the point size for this category.
.. seealso:: :py:func:`setPointSize`
.. versionadded:: 3.36
%End
QString label() const;
%Docstring
Returns the label for this category, which is used to represent the
category within legends and the layer tree.
.. seealso:: :py:func:`setLabel`
%End
void setValue( int value );
%Docstring
Sets the ``value`` corresponding to this category.
.. seealso:: :py:func:`value`
%End
void setColor( const QColor &color );
%Docstring
Sets the ``color`` which will be used to render this category.
.. seealso:: :py:func:`color`
%End
void setPointSize( double size );
%Docstring
Sets the point size for this category.
.. seealso:: :py:func:`pointSize`
.. versionadded:: 3.36
%End
void setLabel( const QString &label );
%Docstring
Sets the ``label`` for this category, which is used to represent the
category within legends and the layer tree.
.. seealso:: :py:func:`label`
%End
bool renderState() const;
%Docstring
Returns ``True`` if the category is currently enabled and should be
rendered.
.. seealso:: :py:func:`setRenderState`
%End
void setRenderState( bool render );
%Docstring
Sets whether the category is currently enabled and should be rendered.
.. seealso:: :py:func:`renderState`
%End
protected:
};
typedef QList<QgsPointCloudCategory> QgsPointCloudCategoryList;
class QgsPointCloudClassifiedRenderer : QgsPointCloudRenderer
{
%Docstring(signature="appended")
Renders point clouds by a classification attribute.
.. versionadded:: 3.18
%End
%TypeHeaderCode
#include "qgspointcloudclassifiedrenderer.h"
%End
public:
QgsPointCloudClassifiedRenderer( const QString &attributeName = QString(), const QgsPointCloudCategoryList &categories = QgsPointCloudCategoryList() );
%Docstring
Constructor for QgsPointCloudClassifiedRenderer.
%End
virtual QString type() const;
virtual QgsPointCloudRenderer *clone() const;
virtual void renderBlock( const QgsPointCloudBlock *block, QgsPointCloudRenderContext &context );
virtual bool willRenderPoint( const QVariantMap &pointAttributes );
virtual QDomElement save( QDomDocument &doc, const QgsReadWriteContext &context ) const;
virtual QSet< QString > usedAttributes( const QgsPointCloudRenderContext &context ) const;
virtual QList<QgsLayerTreeModelLegendNode *> createLegendNodes( QgsLayerTreeLayer *nodeLayer ) /Factory/;
virtual QStringList legendRuleKeys() const;
virtual bool legendItemChecked( const QString &key );
virtual void checkLegendItem( const QString &key, bool state = true );
static QgsPointCloudRenderer *create( QDomElement &element, const QgsReadWriteContext &context ) /Factory/;
%Docstring
Creates an RGB renderer from an XML ``element``.
%End
static QgsPointCloudCategoryList defaultCategories();
%Docstring
Returns the default list of categories.
%End
QString attribute() const;
%Docstring
Returns the attribute to use for the renderer.
.. seealso:: :py:func:`setAttribute`
%End
void setAttribute( const QString &attribute );
%Docstring
Sets the ``attribute`` to use for the renderer.
.. seealso:: :py:func:`attribute`
%End
QgsPointCloudCategoryList categories() const;
%Docstring
Returns the classification categories used for rendering.
.. seealso:: :py:func:`setCategories`
%End
void setCategories( const QgsPointCloudCategoryList &categories );
%Docstring
Sets the classification ``categories`` used for rendering.
.. seealso:: :py:func:`categories`
%End
void addCategory( const QgsPointCloudCategory &category );
%Docstring
Adds a ``category`` to the renderer.
.. seealso:: :py:func:`categories`
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pointcloud/qgspointcloudclassifiedrenderer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|