QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
QgsVectorLayerSelectionProperties Class Reference

Implementation of layer selection properties for vector layers. More...

#include <qgsvectorlayerselectionproperties.h>

Inheritance diagram for QgsVectorLayerSelectionProperties:

Signals

void selectionColorChanged ()
 Emitted whenever the selection color changes.
void selectionRenderingModeChanged ()
 Emitted whenever the selection rendering mode changes.
void selectionSymbolChanged ()
 Emitted whenever the selection symbol changes.

Public Member Functions

 QgsVectorLayerSelectionProperties (QObject *parent=nullptr)
 Constructor for QgsVectorLayerSelectionProperties, with the specified parent object.
 ~QgsVectorLayerSelectionProperties () override
QgsVectorLayerSelectionPropertiesclone () const override
 Creates a clone of the properties.
bool readXml (const QDomElement &element, const QgsReadWriteContext &context) override
 Reads temporal properties from a DOM element previously written by writeXml().
QColor selectionColor () const
 Returns the color to use for rendering selected features in the layer.
Qgis::SelectionRenderingMode selectionRenderingMode () const
 Returns the selection rendering mode to use for selected features in the layer.
QgsSymbolselectionSymbol () const
 Returns the symbol used to render selected features in the layer.
void setSelectionColor (const QColor &color)
 Sets the color to use for rendering selected features in the layer.
void setSelectionRenderingMode (Qgis::SelectionRenderingMode mode)
 Sets the selection rendering mode to use for selected features in the layer.
void setSelectionSymbol (QgsSymbol *symbol)
 Sets the symbol used to render selected features in the layer.
QDomElement writeXml (QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context) override
 Writes the properties to a DOM element, to be used later with readXml().
Public Member Functions inherited from QgsMapLayerSelectionProperties
 QgsMapLayerSelectionProperties (QObject *parent)
 Constructor for QgsMapLayerSelectionProperties, with the specified parent object.

Properties

QColor selectionColor
Qgis::SelectionRenderingMode selectionRenderingMode

Detailed Description

Implementation of layer selection properties for vector layers.

Since
QGIS 3.34

Definition at line 38 of file qgsvectorlayerselectionproperties.h.

Constructor & Destructor Documentation

◆ QgsVectorLayerSelectionProperties()

QgsVectorLayerSelectionProperties::QgsVectorLayerSelectionProperties ( QObject * parent = nullptr)

Constructor for QgsVectorLayerSelectionProperties, with the specified parent object.

Definition at line 25 of file qgsvectorlayerselectionproperties.cpp.

◆ ~QgsVectorLayerSelectionProperties()

QgsVectorLayerSelectionProperties::~QgsVectorLayerSelectionProperties ( )
overridedefault

Member Function Documentation

◆ clone()

QgsVectorLayerSelectionProperties * QgsVectorLayerSelectionProperties::clone ( ) const
overridevirtual

Creates a clone of the properties.

Implements QgsMapLayerSelectionProperties.

Definition at line 68 of file qgsvectorlayerselectionproperties.cpp.

◆ readXml()

bool QgsVectorLayerSelectionProperties::readXml ( const QDomElement & element,
const QgsReadWriteContext & context )
overridevirtual

Reads temporal properties from a DOM element previously written by writeXml().

See also
writeXml()

Implements QgsMapLayerSelectionProperties.

Definition at line 52 of file qgsvectorlayerselectionproperties.cpp.

◆ selectionColor()

QColor QgsVectorLayerSelectionProperties::selectionColor ( ) const

Returns the color to use for rendering selected features in the layer.

An invalid color indicates that the default (i.e. project level) selection color should be used instead.

See also
setSelectionColor()

Definition at line 77 of file qgsvectorlayerselectionproperties.cpp.

◆ selectionColorChanged

void QgsVectorLayerSelectionProperties::selectionColorChanged ( )
signal

Emitted whenever the selection color changes.

Since
QGIS 4.0

◆ selectionRenderingMode()

Qgis::SelectionRenderingMode QgsVectorLayerSelectionProperties::selectionRenderingMode ( ) const

Returns the selection rendering mode to use for selected features in the layer.

See also
setSelectionRenderingMode()

Definition at line 104 of file qgsvectorlayerselectionproperties.cpp.

◆ selectionRenderingModeChanged

void QgsVectorLayerSelectionProperties::selectionRenderingModeChanged ( )
signal

Emitted whenever the selection rendering mode changes.

Since
QGIS 4.0

◆ selectionSymbol()

QgsSymbol * QgsVectorLayerSelectionProperties::selectionSymbol ( ) const

Returns the symbol used to render selected features in the layer.

May be nullptr if the default symbol should be used instead.

See also
setSelectionSymbol()

Definition at line 93 of file qgsvectorlayerselectionproperties.cpp.

◆ selectionSymbolChanged

void QgsVectorLayerSelectionProperties::selectionSymbolChanged ( )
signal

Emitted whenever the selection symbol changes.

Since
QGIS 4.0

◆ setSelectionColor()

void QgsVectorLayerSelectionProperties::setSelectionColor ( const QColor & color)

Sets the color to use for rendering selected features in the layer.

An invalid color indicates that the default (i.e. project level) selection color should be used instead.

See also
selectionColor()

Definition at line 82 of file qgsvectorlayerselectionproperties.cpp.

◆ setSelectionRenderingMode()

void QgsVectorLayerSelectionProperties::setSelectionRenderingMode ( Qgis::SelectionRenderingMode mode)

Sets the selection rendering mode to use for selected features in the layer.

See also
selectionRenderingMode()

Definition at line 109 of file qgsvectorlayerselectionproperties.cpp.

◆ setSelectionSymbol()

void QgsVectorLayerSelectionProperties::setSelectionSymbol ( QgsSymbol * symbol)

Sets the symbol used to render selected features in the layer.

Ownership of symbol is transferred to the plot. If symbol is nullptr then the default symbol will be used instead.

See also
selectionSymbol()

Definition at line 98 of file qgsvectorlayerselectionproperties.cpp.

◆ writeXml()

QDomElement QgsVectorLayerSelectionProperties::writeXml ( QDomElement & element,
QDomDocument & doc,
const QgsReadWriteContext & context )
overridevirtual

Writes the properties to a DOM element, to be used later with readXml().

See also
readXml()

Implements QgsMapLayerSelectionProperties.

Definition at line 33 of file qgsvectorlayerselectionproperties.cpp.

Property Documentation

◆ selectionColor

QColor QgsVectorLayerSelectionProperties::selectionColor
readwrite

Definition at line 42 of file qgsvectorlayerselectionproperties.h.

◆ selectionRenderingMode

Qgis::SelectionRenderingMode QgsVectorLayerSelectionProperties::selectionRenderingMode
readwrite

Definition at line 41 of file qgsvectorlayerselectionproperties.h.


The documentation for this class was generated from the following files: