QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
qgsstyle.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsstyle.h
3 ---------------------
4 begin : November 2009
5 copyright : (C) 2009 by Martin Dobias
6 email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSSTYLE_H
17#define QGSSTYLE_H
18
19#include "qgis_core.h"
20#include "qgis.h"
21#include <QMap>
22#include <QMultiMap>
23#include <QString>
24
25#include <sqlite3.h>
26
27#include "qgssqliteutils.h"
28#include "qgssymbollayerutils.h" // QgsStringMap
29#include "qgstextformat.h"
30#include "qgspallabeling.h"
31#include "qgslegendpatchshape.h"
32
33class QgsSymbol;
34class QgsSymbolLayer;
35class QgsColorRamp;
38class QDomDocument;
39class QDomElement;
40
41typedef QMap<QString, QgsColorRamp * > QgsVectorColorRampMap;
42typedef QMap<int, QString> QgsSymbolGroupMap;
43
48typedef QMap<QString, QgsTextFormat > QgsTextFormatMap;
49
54typedef QMap<QString, QgsPalLayerSettings > QgsLabelSettingsMap;
55
56/*
57 * Constants used to describe copy-paste MIME types
58 */
59#define QGSCLIPBOARD_STYLE_MIME "application/qgis.style"
60
79typedef QMultiMap<QString, QString> QgsSmartConditionMap;
80
81
86class CORE_EXPORT QgsStyle : public QObject
87{
88 Q_OBJECT
89
90 public:
91
97 enum class SymbolTableColumn : int
98 {
99 Id,
100 Name,
101 XML,
102 FavoriteId,
103 };
104 Q_ENUM( SymbolTableColumn )
105
106
111 enum class TagTableColumn : int
112 {
113 Id,
114 Name,
115 };
116 Q_ENUM( TagTableColumn )
117
118
123 enum class TagmapTableColumn : int
124 {
125 TagId,
126 SymbolId,
127 };
128 Q_ENUM( TagmapTableColumn )
129
130
135 enum class ColorRampTableColumn : int
136 {
137 Id,
138 Name,
139 XML,
140 FavoriteId,
141 };
142 Q_ENUM( ColorRampTableColumn )
143
144
149 enum class TextFormatTableColumn : int
150 {
151 Id,
152 Name,
153 XML,
154 FavoriteId,
155 };
156 Q_ENUM( TextFormatTableColumn )
157
158
164 {
165 Id,
166 Name,
167 XML,
168 FavoriteId,
169 };
170 Q_ENUM( LabelSettingsTableColumn )
171
172
177 enum class SmartGroupTableColumn : int
178 {
179 Id,
180 Name,
181 XML,
182 };
183 Q_ENUM( SmartGroupTableColumn )
184
185
188 QgsStyle( QObject *parent SIP_TRANSFERTHIS = nullptr );
189 ~QgsStyle() override;
190
213
220 QString name() const;
221
228 void setName( const QString &name );
229
239 bool isInitialized() const { return mInitialized; }
240
250 bool isReadOnly() const;
251
261 void setReadOnly( bool readOnly );
262
274 bool addEntity( const QString &name, const QgsStyleEntityInterface *entity, bool update = false );
275
285 bool addSymbol( const QString &name, QgsSymbol *symbol SIP_TRANSFER, bool update = false );
286
295 bool addColorRamp( const QString &name, QgsColorRamp *colorRamp SIP_TRANSFER, bool update = false );
296
307 bool addTextFormat( const QString &name, const QgsTextFormat &format, bool update = false );
308
319 bool addLabelSettings( const QString &name, const QgsPalLayerSettings &settings, bool update = false );
320
331 bool addLegendPatchShape( const QString &name, const QgsLegendPatchShape &shape, bool update = false );
332
343 bool addSymbol3D( const QString &name, QgsAbstract3DSymbol *symbol SIP_TRANSFER, bool update = false );
344
351 int addTag( const QString &tagName );
352
362 int addSmartgroup( const QString &name, const QString &op, const QgsSmartConditionMap &conditions ) SIP_SKIP;
363
376 int addSmartgroup( const QString &name, const QString &op, const QStringList &matchTag, const QStringList &noMatchTag,
377 const QStringList &matchName, const QStringList &noMatchName );
378
384 QStringList tags() const;
385
387 void clear();
388
393 QgsColorRamp *colorRamp( const QString &name ) const SIP_FACTORY;
394
396 int colorRampCount();
397
399 QStringList colorRampNames() const;
400
402 const QgsColorRamp *colorRampRef( const QString &name ) const;
403
408 int colorrampId( const QString &name );
409
415 QgsTextFormat textFormat( const QString &name ) const;
416
421 int textFormatCount() const;
422
427 QStringList textFormatNames() const;
428
435 int textFormatId( const QString &name );
436
442 QgsPalLayerSettings labelSettings( const QString &name ) const;
443
449 QgsLegendPatchShape legendPatchShape( const QString &name ) const;
450
455 int legendPatchShapesCount() const;
456
464 Qgis::SymbolType legendPatchShapeSymbolType( const QString &name ) const;
465
471 QgsAbstract3DSymbol *symbol3D( const QString &name ) const SIP_FACTORY;
472
477 int symbol3DCount() const;
478
485 QList< Qgis::GeometryType > symbol3DCompatibleGeometryTypes( const QString &name ) const;
486
494 Qgis::GeometryType labelSettingsLayerType( const QString &name ) const;
495
500 int labelSettingsCount() const;
501
506 QStringList labelSettingsNames() const;
507
514 int labelSettingsId( const QString &name );
515
524 static QgsStyle *defaultStyle( bool initialize = true );
525
527 static void cleanDefaultStyle() SIP_SKIP;
528
538 bool tagSymbol( StyleEntity type, const QString &symbol, const QStringList &tags );
539
549 bool detagSymbol( StyleEntity type, const QString &symbol, const QStringList &tags );
550
559 bool detagSymbol( StyleEntity type, const QString &symbol );
560
562 bool removeSymbol( const QString &name );
563
571 bool renameEntity( StyleEntity type, const QString &oldName, const QString &newName );
572
578 bool renameSymbol( const QString &oldName, const QString &newName );
579
581 QgsSymbol *symbol( const QString &name ) SIP_FACTORY;
582
584 const QgsSymbol *symbolRef( const QString &name ) const;
585
587 int symbolCount();
588
590 QStringList symbolNames() const;
591
596 int symbolId( const QString &name );
597
602 int entityId( StyleEntity type, const QString &name );
603
605 int tagId( const QString &tag );
607 int smartgroupId( const QString &smartgroup );
608
613 QStringList allNames( StyleEntity type ) const;
614
621 QStringList symbolsOfFavorite( StyleEntity type ) const;
622
630 QStringList symbolsWithTag( StyleEntity type, int tagid ) const;
631
639 bool addFavorite( StyleEntity type, const QString &name );
640
648 bool removeFavorite( StyleEntity type, const QString &name );
649
657 bool rename( StyleEntity type, int id, const QString &newName );
658
667 bool remove( StyleEntity type, int id );
668
675 bool removeEntityByName( StyleEntity type, const QString &name );
676
686 bool saveSymbol( const QString &name, QgsSymbol *symbol, bool favorite, const QStringList &tags );
687
697 bool saveColorRamp( const QString &name, QgsColorRamp *ramp, bool favorite, const QStringList &tags );
698
700 bool removeColorRamp( const QString &name );
701
703 bool renameColorRamp( const QString &oldName, const QString &newName );
704
714 bool saveTextFormat( const QString &name, const QgsTextFormat &format, bool favorite, const QStringList &tags );
715
720 bool removeTextFormat( const QString &name );
721
727 bool renameTextFormat( const QString &oldName, const QString &newName );
728
738 bool saveLabelSettings( const QString &name, const QgsPalLayerSettings &settings, bool favorite, const QStringList &tags );
739
744 bool removeLabelSettings( const QString &name );
745
751 bool renameLabelSettings( const QString &oldName, const QString &newName );
752
764 bool saveLegendPatchShape( const QString &name, const QgsLegendPatchShape &shape, bool favorite, const QStringList &tags );
765
771 bool renameLegendPatchShape( const QString &oldName, const QString &newName );
772
777 QStringList legendPatchShapeNames() const;
778
786 const QgsSymbol *previewSymbolForPatchShape( const QgsLegendPatchShape &shape ) const;
787
794 QgsLegendPatchShape defaultPatch( Qgis::SymbolType type, QSizeF size ) const;
795
802 QList< QList< QPolygonF > > defaultPatchAsQPolygonF( Qgis::SymbolType type, QSizeF size ) const;
803
809 enum class TextFormatContext : int
810 {
811 Labeling,
812 };
813
820
826 static QgsTextFormat defaultTextFormatForProject( QgsProject *project, QgsStyle::TextFormatContext context = QgsStyle::TextFormatContext::Labeling );
827
839 bool saveSymbol3D( const QString &name, QgsAbstract3DSymbol *symbol SIP_TRANSFER, bool favorite, const QStringList &tags );
840
846 bool renameSymbol3D( const QString &oldName, const QString &newName );
847
852 QStringList symbol3DNames() const;
853
861 bool createDatabase( const QString &filename );
862
870 bool createMemoryDatabase();
871
879 void createTables();
880
891 bool load( const QString &filename );
892
907 Q_DECL_DEPRECATED bool save( const QString &filename = QString() ) SIP_DEPRECATED;
908
914 QString errorString() const { return mErrorString; }
915
925 QString fileName() const { return mFileName; }
926
938 void setFileName( const QString &filename );
939
947 QStringList findSymbols( StyleEntity type, const QString &qword );
948
956 QStringList tagsOfSymbol( StyleEntity type, const QString &symbol );
957
964 bool isFavorite( StyleEntity type, const QString &name );
965
974 bool symbolHasTag( StyleEntity type, const QString &symbol, const QString &tag );
975
977 QString tag( int id ) const;
978
980 QgsSymbolGroupMap smartgroupsListMap();
981
983 QStringList smartgroupNames() const;
984
986 QgsSmartConditionMap smartgroup( int id );
987
991 QString smartgroupOperator( int id );
992
994 QStringList symbolsOfSmartgroup( StyleEntity type, int id );
995
997 bool exportXml( const QString &filename );
998
1000 bool importXml( const QString &filename );
1001
1010 static bool isXmlStyleFile( const QString &path );
1011
1012 public slots:
1013#ifndef SIP_RUN
1014
1022 void triggerIconRebuild();
1023#endif
1024
1025 signals:
1026
1036
1047
1056 void symbolSaved( const QString &name, QgsSymbol *symbol );
1057
1066 void symbolChanged( const QString &name );
1067
1070
1076 void entityTagsChanged( QgsStyle::StyleEntity entity, const QString &name, const QStringList &newTags );
1077
1083 void favoritedChanged( QgsStyle::StyleEntity entity, const QString &name, bool isFavorite );
1084
1090 void entityAdded( QgsStyle::StyleEntity entity, const QString &name );
1091
1098 void entityRemoved( QgsStyle::StyleEntity entity, const QString &name );
1099
1104 void entityRenamed( QgsStyle::StyleEntity entity, const QString &oldName, const QString &newName );
1105
1112 void entityChanged( QgsStyle::StyleEntity entity, const QString &name );
1113
1121 void symbolRemoved( const QString &name );
1122
1128 void symbolRenamed( const QString &oldName, const QString &newName );
1129
1135 void rampRenamed( const QString &oldName, const QString &newName );
1136
1144 void rampAdded( const QString &name );
1145
1153 void rampRemoved( const QString &name );
1154
1163 void rampChanged( const QString &name );
1164
1170 void textFormatRenamed( const QString &oldName, const QString &newName );
1171
1179 void textFormatAdded( const QString &name );
1180
1188 void textFormatRemoved( const QString &name );
1189
1198 void textFormatChanged( const QString &name );
1199
1205 void labelSettingsRenamed( const QString &oldName, const QString &newName );
1206
1214 void labelSettingsAdded( const QString &name );
1215
1223 void labelSettingsRemoved( const QString &name );
1224
1233 void labelSettingsChanged( const QString &name );
1234
1241
1242 private:
1243
1244 bool mInitialized = true;
1245 QString mName;
1246 bool mReadOnly = false;
1247
1248 QgsSymbolMap mSymbols;
1249 QgsVectorColorRampMap mColorRamps;
1250 QgsTextFormatMap mTextFormats;
1251 QgsLabelSettingsMap mLabelSettings;
1252 QMap<QString, QgsLegendPatchShape > mLegendPatchShapes;
1253 QMap<QString, QgsAbstract3DSymbol * > m3dSymbols;
1254
1255 QHash< QgsStyle::StyleEntity, QHash< QString, QStringList > > mCachedTags;
1256 QHash< QgsStyle::StyleEntity, QHash< QString, bool > > mCachedFavorites;
1257
1258 QString mErrorString;
1259 QString mFileName;
1260
1261 sqlite3_database_unique_ptr mCurrentDB;
1262
1263 std::unique_ptr< QgsSymbol > mPatchMarkerSymbol;
1264 std::unique_ptr< QgsSymbol > mPatchLineSymbol;
1265 std::unique_ptr< QgsSymbol > mPatchFillSymbol;
1266
1267 mutable QHash< int, QHash< QSizeF, QgsLegendPatchShape > > mDefaultPatchCache;
1268 mutable QHash< int, QHash< QSizeF, QList< QList< QPolygonF > > > > mDefaultPatchQPolygonFCache;
1269
1270 QMap< QString, QDomElement > mDeferred3DsymbolElements;
1271 void handleDeferred3DSymbolCreation();
1272
1273 static QgsStyle *sDefaultStyle;
1274
1280 void initializeDefaultStyle( const QString &filename );
1281
1283 bool openDatabase( const QString &filename );
1284
1286 bool importXml( const QString &filename, int sinceVersion );
1287
1294 bool runEmptyQuery( const QString &query );
1295
1297 int getId( const QString &table, const QString &name );
1298
1300 QString getName( const QString &table, int id ) const;
1301
1310 bool updateSymbol( StyleEntity type, const QString &name );
1311
1312 void clearCachedTags( StyleEntity type, const QString &name );
1313
1317 bool createStyleMetadataTableIfNeeded();
1318 void upgradeIfRequired();
1319
1323 static QString entityTableName( StyleEntity type );
1324
1328 static QString tagmapTableName( StyleEntity type );
1329
1333 static QString tagmapEntityIdFieldName( StyleEntity type );
1334
1335 friend class Qgs3D;
1336 friend class TestStyle;
1337
1338 Q_DISABLE_COPY( QgsStyle )
1339};
1340
1348{
1349
1350#ifdef SIP_RUN
1352 switch ( sipCpp->type() )
1353 {
1355 sipType = sipType_QgsStyleSymbolEntity;
1356 break;
1357
1359 sipType = sipType_QgsStyleColorRampEntity;
1360 break;
1361
1363 sipType = sipType_QgsStyleTextFormatEntity;
1364 break;
1365
1367 sipType = sipType_QgsStyleLabelSettingsEntity;
1368 break;
1369
1372 sipType = 0;
1373 break;
1374 }
1375 SIP_END
1376#endif
1377
1378 public:
1379
1380 virtual ~QgsStyleEntityInterface() = default;
1381
1385 virtual QgsStyle::StyleEntity type() const = 0;
1386
1387};
1388
1396{
1397 public:
1398
1405 : mSymbol( symbol )
1406 {}
1407
1408 QgsStyle::StyleEntity type() const override;
1409
1413 QgsSymbol *symbol() const { return mSymbol; }
1414
1415 private:
1416
1417 QgsSymbol *mSymbol = nullptr;
1418
1419};
1420
1428{
1429 public:
1430
1437 : mRamp( ramp )
1438 {}
1439
1440 QgsStyle::StyleEntity type() const override;
1441
1445 QgsColorRamp *ramp() const { return mRamp; }
1446
1447 private:
1448
1449 QgsColorRamp *mRamp = nullptr;
1450};
1451
1459{
1460 public:
1461
1466 : mFormat( format )
1467 {}
1468
1469 QgsStyle::StyleEntity type() const override;
1470
1474 QgsTextFormat format() const { return mFormat; }
1475
1476 private:
1477
1478 QgsTextFormat mFormat;
1479
1480};
1481
1489{
1490 public:
1491
1496 : mSettings( settings )
1497 {}
1498
1499 QgsStyle::StyleEntity type() const override;
1500
1501
1505 const QgsPalLayerSettings &settings() const { return mSettings; }
1506
1507 private:
1508
1509 QgsPalLayerSettings mSettings;
1510};
1511
1519{
1520 public:
1521
1526 : mShape( shape )
1527 {}
1528
1529 QgsStyle::StyleEntity type() const override;
1530
1531
1535 const QgsLegendPatchShape &shape() const { return mShape; }
1536
1537 private:
1538
1539 QgsLegendPatchShape mShape;
1540};
1541
1549{
1550 public:
1551
1558 : mSymbol( symbol )
1559 {}
1560
1561 QgsStyle::StyleEntity type() const override;
1562
1566 const QgsAbstract3DSymbol *symbol() const { return mSymbol; }
1567
1568 private:
1569
1570 const QgsAbstract3DSymbol *mSymbol = nullptr;
1571};
1572
1573#endif
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:54
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:337
SymbolType
Symbol types.
Definition qgis.h:574
Qgs3D is a singleton class containing various registries and other global members related to 3D class...
Definition qgs3d.h:33
Abstract base class for color ramps.
Represents a patch shape for use in map legends.
Contains settings for how a map layer will be labeled.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:107
A color ramp entity for QgsStyle databases.
Definition qgsstyle.h:1428
QgsStyleColorRampEntity(QgsColorRamp *ramp)
Constructor for QgsStyleColorRampEntity, with the specified color ramp.
Definition qgsstyle.h:1436
QgsColorRamp * ramp() const
Returns the entity's color ramp.
Definition qgsstyle.h:1445
An interface for entities which can be placed in a QgsStyle database.
Definition qgsstyle.h:1348
virtual QgsStyle::StyleEntity type() const =0
Returns the type of style entity.
virtual ~QgsStyleEntityInterface()=default
A label settings entity for QgsStyle databases.
Definition qgsstyle.h:1489
const QgsPalLayerSettings & settings() const
Returns the entity's label settings.
Definition qgsstyle.h:1505
QgsStyleLabelSettingsEntity(const QgsPalLayerSettings &settings)
Constructor for QgsStyleLabelSettingsEntity, with the specified label settings.
Definition qgsstyle.h:1495
A legend patch shape entity for QgsStyle databases.
Definition qgsstyle.h:1519
const QgsLegendPatchShape & shape() const
Returns the entity's legend patch shape.
Definition qgsstyle.h:1535
QgsStyleLegendPatchShapeEntity(const QgsLegendPatchShape &shape)
Constructor for QgsStyleLegendPatchShapeEntity, with the specified legend patch shape.
Definition qgsstyle.h:1525
A 3d symbol entity for QgsStyle databases.
Definition qgsstyle.h:1549
const QgsAbstract3DSymbol * symbol() const
Returns the entity's symbol.
Definition qgsstyle.h:1566
QgsStyleSymbol3DEntity(const QgsAbstract3DSymbol *symbol)
Constructor for QgsStyleSymbol3DEntity, with the specified symbol.
Definition qgsstyle.h:1557
A symbol entity for QgsStyle databases.
Definition qgsstyle.h:1396
QgsStyleSymbolEntity(QgsSymbol *symbol)
Constructor for QgsStyleSymbolEntity, with the specified symbol.
Definition qgsstyle.h:1404
QgsSymbol * symbol() const
Returns the entity's symbol.
Definition qgsstyle.h:1413
A text format entity for QgsStyle databases.
Definition qgsstyle.h:1459
QgsTextFormat format() const
Returns the entity's text format.
Definition qgsstyle.h:1474
QgsStyleTextFormatEntity(const QgsTextFormat &format)
Constructor for QgsStyleTextFormatEntity, with the specified text format.
Definition qgsstyle.h:1465
void labelSettingsChanged(const QString &name)
Emitted whenever a label setting's definition is changed.
void entityChanged(QgsStyle::StyleEntity entity, const QString &name)
Emitted whenever an entity's definition is changed.
void labelSettingsAdded(const QString &name)
Emitted whenever label settings have been added to the style and the database has been updated as a r...
void rampAdded(const QString &name)
Emitted whenever a color ramp has been added to the style and the database has been updated as a resu...
void rebuildIconPreviews()
Emitted whenever icon previews for entities in the style must be rebuilt.
void symbolSaved(const QString &name, QgsSymbol *symbol)
Emitted every time a new symbol has been added to the database.
void aboutToBeDestroyed()
Emitted just before the style object is destroyed.
LabelSettingsTableColumn
Columns available in the label settings table.
Definition qgsstyle.h:164
void labelSettingsRemoved(const QString &name)
Emitted whenever label settings have been removed from the style and the database has been updated as...
StyleEntity
Enum for Entities involved in a style.
Definition qgsstyle.h:203
@ LabelSettingsEntity
Label settings.
Definition qgsstyle.h:209
@ TextFormatEntity
Text formats.
Definition qgsstyle.h:208
@ SmartgroupEntity
Smart groups.
Definition qgsstyle.h:207
@ Symbol3DEntity
3D symbol entity
Definition qgsstyle.h:211
@ SymbolEntity
Symbols.
Definition qgsstyle.h:204
@ TagEntity
Tags.
Definition qgsstyle.h:205
@ ColorrampEntity
Color ramps.
Definition qgsstyle.h:206
@ LegendPatchShapeEntity
Legend patch shape.
Definition qgsstyle.h:210
void symbolRenamed(const QString &oldName, const QString &newName)
Emitted whenever a symbol has been renamed from oldName to newName.
ColorRampTableColumn
Columns available in the color ramp table.
Definition qgsstyle.h:136
void groupsModified()
Emitted every time a tag or smartgroup has been added, removed, or renamed.
void rampRemoved(const QString &name)
Emitted whenever a color ramp has been removed from the style and the database has been updated as a ...
void entityRenamed(QgsStyle::StyleEntity entity, const QString &oldName, const QString &newName)
Emitted whenever a entity of the specified type has been renamed from oldName to newName.
void textFormatChanged(const QString &name)
Emitted whenever a text format's definition is changed.
void textFormatRenamed(const QString &oldName, const QString &newName)
Emitted whenever a text format has been renamed from oldName to newName.
void labelSettingsRenamed(const QString &oldName, const QString &newName)
Emitted whenever label settings have been renamed from oldName to newName.
void initialized()
Emitted when the style database has been fully initialized.
TextFormatTableColumn
Columns available in the text format table.
Definition qgsstyle.h:150
QString fileName() const
Returns the current file name of the style database.
Definition qgsstyle.h:925
void rampRenamed(const QString &oldName, const QString &newName)
Emitted whenever a color ramp has been renamed from oldName to newName.
bool isInitialized() const
Returns true if the style is initialized and ready for use.
Definition qgsstyle.h:239
SmartGroupTableColumn
Columns available in the smart group table.
Definition qgsstyle.h:178
TagTableColumn
Columns available in the Tags table.
Definition qgsstyle.h:112
void textFormatAdded(const QString &name)
Emitted whenever a text format has been added to the style and the database has been updated as a res...
SymbolTableColumn
Columns available in the Symbols table.
Definition qgsstyle.h:98
TagmapTableColumn
Columns available in the tag to symbol table.
Definition qgsstyle.h:124
void rampChanged(const QString &name)
Emitted whenever a color ramp's definition is changed.
void entityTagsChanged(QgsStyle::StyleEntity entity, const QString &name, const QStringList &newTags)
Emitted whenever an entity's tags are changed.
void favoritedChanged(QgsStyle::StyleEntity entity, const QString &name, bool isFavorite)
Emitted whenever an entity is either favorited or un-favorited.
void entityRemoved(QgsStyle::StyleEntity entity, const QString &name)
Emitted whenever an entity of the specified type is removed from the style and the database has been ...
void entityAdded(QgsStyle::StyleEntity entity, const QString &name)
Emitted every time a new entity has been added to the database.
TextFormatContext
Text format context.
Definition qgsstyle.h:810
@ Labeling
Text format used in labeling.
void symbolRemoved(const QString &name)
Emitted whenever a symbol has been removed from the style and the database has been updated as a resu...
void symbolChanged(const QString &name)
Emitted whenever a symbol's definition is changed.
void textFormatRemoved(const QString &name)
Emitted whenever a text format has been removed from the style and the database has been updated as a...
Abstract base class for all rendered symbols.
Definition qgssymbol.h:231
Container for all settings relating to text rendering.
Unique pointer for sqlite3 databases, which automatically closes the database when the pointer goes o...
QMultiMap< QString, QString > QgsSmartConditionMap
A multimap to hold the smart group conditions as constraint and parameter pairs.
Definition qgsstyle.h:79
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:191
#define SIP_DEPRECATED
Definition qgis_sip.h:106
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_TRANSFER
Definition qgis_sip.h:36
#define SIP_FACTORY
Definition qgis_sip.h:76
#define SIP_END
Definition qgis_sip.h:208
QMap< QString, QgsSymbol * > QgsSymbolMap
Definition qgsrenderer.h:48
QMap< QString, QgsPalLayerSettings > QgsLabelSettingsMap
Map of name to label settings.
Definition qgsstyle.h:54
QMap< QString, QgsTextFormat > QgsTextFormatMap
Map of name to text format.
Definition qgsstyle.h:48
QMap< QString, QgsColorRamp * > QgsVectorColorRampMap
Definition qgsstyle.h:41
QMap< int, QString > QgsSymbolGroupMap
Definition qgsstyle.h:42