QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgsvectorlayerselectionproperties.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectorlayerselectionproperties.h
3 ---------------
4 begin : July 2023
5 copyright : (C) 2023 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18
19#ifndef QGSVECTORLAYERSELECTIONPROPERTIES_H
20#define QGSVECTORLAYERSELECTIONPROPERTIES_H
21
22#include "qgis_core.h"
23#include "qgis.h"
24#include "qgis_sip.h"
26
27#include <QColor>
28
29class QgsSymbol;
30
39{
40 Q_OBJECT
41
42 public:
43
47 QgsVectorLayerSelectionProperties( QObject *parent SIP_TRANSFERTHIS = nullptr );
49
50 QDomElement writeXml( QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context ) override;
51 bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) override;
53
59 Qgis::SelectionRenderingMode selectionRenderingMode() const;
60
66 void setSelectionRenderingMode( Qgis::SelectionRenderingMode mode );
67
76 QColor selectionColor() const;
77
86 void setSelectionColor( const QColor &color );
87
95 QgsSymbol *selectionSymbol() const;
96
105 void setSelectionSymbol( QgsSymbol *symbol SIP_TRANSFER );
106
107 private:
108
109 Qgis::SelectionRenderingMode mSelectionRenderingMode = Qgis::SelectionRenderingMode::Default;
110 QColor mSelectionColor;
111 std::unique_ptr< QgsSymbol > mSelectionSymbol;
112};
113
114#endif // QGSVECTORLAYERSELECTIONPROPERTIES_H
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:54
Base class for storage of map layer selection properties.
virtual QDomElement writeXml(QDomElement &element, QDomDocument &doc, const QgsReadWriteContext &context)=0
Writes the properties to a DOM element, to be used later with readXml().
virtual bool readXml(const QDomElement &element, const QgsReadWriteContext &context)=0
Reads temporal properties from a DOM element previously written by writeXml().
virtual QgsMapLayerSelectionProperties * clone() const =0
Creates a clone of the properties.
The class is used as a container of context for various read/write operations on other objects.
Abstract base class for all rendered symbols.
Definition qgssymbol.h:231
Implementation of layer selection properties for vector layers.
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:76