QGIS API Documentation 3.43.0-Master (b60ef06885e)
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
87class CORE_EXPORT QgsStyle : public QObject
88{
89 Q_OBJECT
90
91 public:
92
98 enum class SymbolTableColumn : int
99 {
100 Id,
101 Name,
102 XML,
103 FavoriteId,
104 };
105 Q_ENUM( SymbolTableColumn )
106
107
112 enum class TagTableColumn : int
113 {
114 Id,
115 Name,
116 };
117 Q_ENUM( TagTableColumn )
118
119
124 enum class TagmapTableColumn : int
125 {
126 TagId,
127 SymbolId,
128 };
129 Q_ENUM( TagmapTableColumn )
130
131
136 enum class ColorRampTableColumn : int
137 {
138 Id,
139 Name,
140 XML,
141 FavoriteId,
142 };
143 Q_ENUM( ColorRampTableColumn )
144
145
150 enum class TextFormatTableColumn : int
151 {
152 Id,
153 Name,
154 XML,
155 FavoriteId,
156 };
157 Q_ENUM( TextFormatTableColumn )
158
159
165 {
166 Id,
167 Name,
168 XML,
169 FavoriteId,
170 };
171 Q_ENUM( LabelSettingsTableColumn )
172
173
178 enum class SmartGroupTableColumn : int
179 {
180 Id,
181 Name,
182 XML,
183 };
184 Q_ENUM( SmartGroupTableColumn )
185
186
189 QgsStyle( QObject *parent SIP_TRANSFERTHIS = nullptr );
190 ~QgsStyle() override;
191
214
221 QString name() const;
222
229 void setName( const QString &name );
230
240 bool isInitialized() const { return mInitialized; }
241
251 bool isReadOnly() const;
252
262 void setReadOnly( bool readOnly );
263
275 bool addEntity( const QString &name, const QgsStyleEntityInterface *entity, bool update = false );
276
286 bool addSymbol( const QString &name, QgsSymbol *symbol SIP_TRANSFER, bool update = false );
287
296 bool addColorRamp( const QString &name, QgsColorRamp *colorRamp SIP_TRANSFER, bool update = false );
297
308 bool addTextFormat( const QString &name, const QgsTextFormat &format, bool update = false );
309
320 bool addLabelSettings( const QString &name, const QgsPalLayerSettings &settings, bool update = false );
321
332 bool addLegendPatchShape( const QString &name, const QgsLegendPatchShape &shape, bool update = false );
333
344 bool addSymbol3D( const QString &name, QgsAbstract3DSymbol *symbol SIP_TRANSFER, bool update = false );
345
352 int addTag( const QString &tagName );
353
363 int addSmartgroup( const QString &name, const QString &op, const QgsSmartConditionMap &conditions ) SIP_SKIP;
364
377 int addSmartgroup( const QString &name, const QString &op, const QStringList &matchTag, const QStringList &noMatchTag,
378 const QStringList &matchName, const QStringList &noMatchName );
379
385 QStringList tags() const;
386
388 void clear();
389
394 QgsColorRamp *colorRamp( const QString &name ) const SIP_FACTORY;
395
397 int colorRampCount();
398
400 QStringList colorRampNames() const;
401
403 const QgsColorRamp *colorRampRef( const QString &name ) const;
404
409 int colorrampId( const QString &name );
410
416 QgsTextFormat textFormat( const QString &name ) const;
417
422 int textFormatCount() const;
423
428 QStringList textFormatNames() const;
429
436 int textFormatId( const QString &name );
437
443 QgsPalLayerSettings labelSettings( const QString &name ) const;
444
450 QgsLegendPatchShape legendPatchShape( const QString &name ) const;
451
456 int legendPatchShapesCount() const;
457
465 Qgis::SymbolType legendPatchShapeSymbolType( const QString &name ) const;
466
472 QgsAbstract3DSymbol *symbol3D( const QString &name ) const SIP_FACTORY;
473
478 int symbol3DCount() const;
479
486 QList< Qgis::GeometryType > symbol3DCompatibleGeometryTypes( const QString &name ) const;
487
495 Qgis::GeometryType labelSettingsLayerType( const QString &name ) const;
496
501 int labelSettingsCount() const;
502
507 QStringList labelSettingsNames() const;
508
515 int labelSettingsId( const QString &name );
516
525 static QgsStyle *defaultStyle( bool initialize = true );
526
528 static void cleanDefaultStyle() SIP_SKIP;
529
539 bool tagSymbol( StyleEntity type, const QString &symbol, const QStringList &tags );
540
550 bool detagSymbol( StyleEntity type, const QString &symbol, const QStringList &tags );
551
560 bool detagSymbol( StyleEntity type, const QString &symbol );
561
563 bool removeSymbol( const QString &name );
564
572 bool renameEntity( StyleEntity type, const QString &oldName, const QString &newName );
573
579 bool renameSymbol( const QString &oldName, const QString &newName );
580
582 QgsSymbol *symbol( const QString &name ) SIP_FACTORY;
583
585 const QgsSymbol *symbolRef( const QString &name ) const;
586
588 int symbolCount();
589
591 QStringList symbolNames() const;
592
597 int symbolId( const QString &name );
598
603 int entityId( StyleEntity type, const QString &name );
604
606 int tagId( const QString &tag );
608 int smartgroupId( const QString &smartgroup );
609
614 QStringList allNames( StyleEntity type ) const;
615
622 QStringList symbolsOfFavorite( StyleEntity type ) const;
623
631 QStringList symbolsWithTag( StyleEntity type, int tagid ) const;
632
640 bool addFavorite( StyleEntity type, const QString &name );
641
649 bool removeFavorite( StyleEntity type, const QString &name );
650
658 bool rename( StyleEntity type, int id, const QString &newName );
659
668 bool remove( StyleEntity type, int id );
669
676 bool removeEntityByName( StyleEntity type, const QString &name );
677
687 bool saveSymbol( const QString &name, const QgsSymbol *symbol, bool favorite, const QStringList &tags );
688
698 bool saveColorRamp( const QString &name, const QgsColorRamp *ramp, bool favorite, const QStringList &tags );
699
701 bool removeColorRamp( const QString &name );
702
704 bool renameColorRamp( const QString &oldName, const QString &newName );
705
715 bool saveTextFormat( const QString &name, const QgsTextFormat &format, bool favorite, const QStringList &tags );
716
721 bool removeTextFormat( const QString &name );
722
728 bool renameTextFormat( const QString &oldName, const QString &newName );
729
739 bool saveLabelSettings( const QString &name, const QgsPalLayerSettings &settings, bool favorite, const QStringList &tags );
740
745 bool removeLabelSettings( const QString &name );
746
752 bool renameLabelSettings( const QString &oldName, const QString &newName );
753
765 bool saveLegendPatchShape( const QString &name, const QgsLegendPatchShape &shape, bool favorite, const QStringList &tags );
766
772 bool renameLegendPatchShape( const QString &oldName, const QString &newName );
773
778 QStringList legendPatchShapeNames() const;
779
787 const QgsSymbol *previewSymbolForPatchShape( const QgsLegendPatchShape &shape ) const;
788
795 QgsLegendPatchShape defaultPatch( Qgis::SymbolType type, QSizeF size ) const;
796
803 QList< QList< QPolygonF > > defaultPatchAsQPolygonF( Qgis::SymbolType type, QSizeF size ) const;
804
810 enum class TextFormatContext : int
811 {
812 Labeling,
813 };
814
821
827 static QgsTextFormat defaultTextFormatForProject( QgsProject *project, QgsStyle::TextFormatContext context = QgsStyle::TextFormatContext::Labeling );
828
840 bool saveSymbol3D( const QString &name, QgsAbstract3DSymbol *symbol SIP_TRANSFER, bool favorite, const QStringList &tags );
841
847 bool renameSymbol3D( const QString &oldName, const QString &newName );
848
853 QStringList symbol3DNames() const;
854
862 bool createDatabase( const QString &filename );
863
871 bool createMemoryDatabase();
872
880 void createTables();
881
892 bool load( const QString &filename );
893
908 Q_DECL_DEPRECATED bool save( const QString &filename = QString() ) SIP_DEPRECATED;
909
915 QString errorString() const { return mErrorString; }
916
926 QString fileName() const { return mFileName; }
927
939 void setFileName( const QString &filename );
940
948 QStringList findSymbols( StyleEntity type, const QString &qword );
949
957 QStringList tagsOfSymbol( StyleEntity type, const QString &symbol );
958
965 bool isFavorite( StyleEntity type, const QString &name );
966
975 bool symbolHasTag( StyleEntity type, const QString &symbol, const QString &tag );
976
978 QString tag( int id ) const;
979
981 QgsSymbolGroupMap smartgroupsListMap();
982
984 QStringList smartgroupNames() const;
985
987 QgsSmartConditionMap smartgroup( int id );
988
992 QString smartgroupOperator( int id );
993
995 QStringList symbolsOfSmartgroup( StyleEntity type, int id );
996
998 bool exportXml( const QString &filename );
999
1001 bool importXml( const QString &filename );
1002
1011 static bool isXmlStyleFile( const QString &path );
1012
1013 public slots:
1014#ifndef SIP_RUN
1015
1023 void triggerIconRebuild();
1024#endif
1025
1026 signals:
1027
1037
1048
1057 void symbolSaved( const QString &name, const QgsSymbol *symbol );
1058
1067 void symbolChanged( const QString &name );
1068
1071
1077 void entityTagsChanged( QgsStyle::StyleEntity entity, const QString &name, const QStringList &newTags );
1078
1084 void favoritedChanged( QgsStyle::StyleEntity entity, const QString &name, bool isFavorite );
1085
1091 void entityAdded( QgsStyle::StyleEntity entity, const QString &name );
1092
1099 void entityRemoved( QgsStyle::StyleEntity entity, const QString &name );
1100
1105 void entityRenamed( QgsStyle::StyleEntity entity, const QString &oldName, const QString &newName );
1106
1113 void entityChanged( QgsStyle::StyleEntity entity, const QString &name );
1114
1122 void symbolRemoved( const QString &name );
1123
1129 void symbolRenamed( const QString &oldName, const QString &newName );
1130
1136 void rampRenamed( const QString &oldName, const QString &newName );
1137
1145 void rampAdded( const QString &name );
1146
1154 void rampRemoved( const QString &name );
1155
1164 void rampChanged( const QString &name );
1165
1171 void textFormatRenamed( const QString &oldName, const QString &newName );
1172
1180 void textFormatAdded( const QString &name );
1181
1189 void textFormatRemoved( const QString &name );
1190
1199 void textFormatChanged( const QString &name );
1200
1206 void labelSettingsRenamed( const QString &oldName, const QString &newName );
1207
1215 void labelSettingsAdded( const QString &name );
1216
1224 void labelSettingsRemoved( const QString &name );
1225
1234 void labelSettingsChanged( const QString &name );
1235
1242
1243 private:
1244
1245 bool mInitialized = true;
1246 QString mName;
1247 bool mReadOnly = false;
1248
1249 QgsSymbolMap mSymbols;
1250 QgsVectorColorRampMap mColorRamps;
1251 QgsTextFormatMap mTextFormats;
1252 QgsLabelSettingsMap mLabelSettings;
1253 QMap<QString, QgsLegendPatchShape > mLegendPatchShapes;
1254 QMap<QString, QgsAbstract3DSymbol * > m3dSymbols;
1255
1256 QHash< QgsStyle::StyleEntity, QHash< QString, QStringList > > mCachedTags;
1257 QHash< QgsStyle::StyleEntity, QHash< QString, bool > > mCachedFavorites;
1258
1259 QString mErrorString;
1260 QString mFileName;
1261
1262 sqlite3_database_unique_ptr mCurrentDB;
1263
1264 std::unique_ptr< QgsSymbol > mPatchMarkerSymbol;
1265 std::unique_ptr< QgsSymbol > mPatchLineSymbol;
1266 std::unique_ptr< QgsSymbol > mPatchFillSymbol;
1267
1268 mutable QHash< int, QHash< QSizeF, QgsLegendPatchShape > > mDefaultPatchCache;
1269 mutable QHash< int, QHash< QSizeF, QList< QList< QPolygonF > > > > mDefaultPatchQPolygonFCache;
1270
1271 QMap< QString, QDomElement > mDeferred3DsymbolElements;
1272 void handleDeferred3DSymbolCreation();
1273
1274 static QgsStyle *sDefaultStyle;
1275
1281 void initializeDefaultStyle( const QString &filename );
1282
1284 bool openDatabase( const QString &filename );
1285
1287 bool importXml( const QString &filename, int sinceVersion );
1288
1295 bool runEmptyQuery( const QString &query );
1296
1298 int getId( const QString &table, const QString &name );
1299
1301 QString getName( const QString &table, int id ) const;
1302
1311 bool updateSymbol( StyleEntity type, const QString &name );
1312
1313 void clearCachedTags( StyleEntity type, const QString &name );
1314
1318 bool createStyleMetadataTableIfNeeded();
1319 void upgradeIfRequired();
1320
1324 static QString entityTableName( StyleEntity type );
1325
1329 static QString tagmapTableName( StyleEntity type );
1330
1334 static QString tagmapEntityIdFieldName( StyleEntity type );
1335
1336 friend class Qgs3D;
1337 friend class TestStyle;
1338
1339 Q_DISABLE_COPY( QgsStyle )
1340};
1341
1349{
1350
1351#ifdef SIP_RUN
1353 switch ( sipCpp->type() )
1354 {
1356 sipType = sipType_QgsStyleSymbolEntity;
1357 break;
1358
1360 sipType = sipType_QgsStyleColorRampEntity;
1361 break;
1362
1364 sipType = sipType_QgsStyleTextFormatEntity;
1365 break;
1366
1368 sipType = sipType_QgsStyleLabelSettingsEntity;
1369 break;
1370
1373 sipType = 0;
1374 break;
1375 }
1376 SIP_END
1377#endif
1378
1379 public:
1380
1381 virtual ~QgsStyleEntityInterface() = default;
1382
1386 virtual QgsStyle::StyleEntity type() const = 0;
1387
1388};
1389
1397{
1398 public:
1399
1406 : mSymbol( symbol )
1407 {}
1408
1409 QgsStyle::StyleEntity type() const override;
1410
1414 QgsSymbol *symbol() const { return mSymbol; }
1415
1416 private:
1417
1418 QgsSymbol *mSymbol = nullptr;
1419
1420};
1421
1429{
1430 public:
1431
1438 : mRamp( ramp )
1439 {}
1440
1441 QgsStyle::StyleEntity type() const override;
1442
1446 QgsColorRamp *ramp() const { return mRamp; }
1447
1448 private:
1449
1450 QgsColorRamp *mRamp = nullptr;
1451};
1452
1460{
1461 public:
1462
1467 : mFormat( format )
1468 {}
1469
1470 QgsStyle::StyleEntity type() const override;
1471
1475 QgsTextFormat format() const { return mFormat; }
1476
1477 private:
1478
1479 QgsTextFormat mFormat;
1480
1481};
1482
1490{
1491 public:
1492
1497 : mSettings( settings )
1498 {}
1499
1500 QgsStyle::StyleEntity type() const override;
1501
1502
1506 const QgsPalLayerSettings &settings() const { return mSettings; }
1507
1508 private:
1509
1510 QgsPalLayerSettings mSettings;
1511};
1512
1520{
1521 public:
1522
1527 : mShape( shape )
1528 {}
1529
1530 QgsStyle::StyleEntity type() const override;
1531
1532
1536 const QgsLegendPatchShape &shape() const { return mShape; }
1537
1538 private:
1539
1540 QgsLegendPatchShape mShape;
1541};
1542
1550{
1551 public:
1552
1559 : mSymbol( symbol )
1560 {}
1561
1562 QgsStyle::StyleEntity type() const override;
1563
1567 const QgsAbstract3DSymbol *symbol() const { return mSymbol; }
1568
1569 private:
1570
1571 const QgsAbstract3DSymbol *mSymbol = nullptr;
1572};
1573
1574#endif
Provides global constants and enumerations 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
A singleton class containing various registries and other global members related to 3D classes.
Definition qgs3d.h:34
Abstract base class for 3D symbols that are used by VectorLayer3DRenderer objects.
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:1429
QgsStyleColorRampEntity(QgsColorRamp *ramp)
Constructor for QgsStyleColorRampEntity, with the specified color ramp.
Definition qgsstyle.h:1437
QgsColorRamp * ramp() const
Returns the entity's color ramp.
Definition qgsstyle.h:1446
An interface for entities which can be placed in a QgsStyle database.
Definition qgsstyle.h:1349
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:1490
const QgsPalLayerSettings & settings() const
Returns the entity's label settings.
Definition qgsstyle.h:1506
QgsStyleLabelSettingsEntity(const QgsPalLayerSettings &settings)
Constructor for QgsStyleLabelSettingsEntity, with the specified label settings.
Definition qgsstyle.h:1496
A legend patch shape entity for QgsStyle databases.
Definition qgsstyle.h:1520
const QgsLegendPatchShape & shape() const
Returns the entity's legend patch shape.
Definition qgsstyle.h:1536
QgsStyleLegendPatchShapeEntity(const QgsLegendPatchShape &shape)
Constructor for QgsStyleLegendPatchShapeEntity, with the specified legend patch shape.
Definition qgsstyle.h:1526
A 3d symbol entity for QgsStyle databases.
Definition qgsstyle.h:1550
const QgsAbstract3DSymbol * symbol() const
Returns the entity's symbol.
Definition qgsstyle.h:1567
QgsStyleSymbol3DEntity(const QgsAbstract3DSymbol *symbol)
Constructor for QgsStyleSymbol3DEntity, with the specified symbol.
Definition qgsstyle.h:1558
A symbol entity for QgsStyle databases.
Definition qgsstyle.h:1397
QgsStyleSymbolEntity(QgsSymbol *symbol)
Constructor for QgsStyleSymbolEntity, with the specified symbol.
Definition qgsstyle.h:1405
QgsSymbol * symbol() const
Returns the entity's symbol.
Definition qgsstyle.h:1414
A text format entity for QgsStyle databases.
Definition qgsstyle.h:1460
QgsTextFormat format() const
Returns the entity's text format.
Definition qgsstyle.h:1475
QgsStyleTextFormatEntity(const QgsTextFormat &format)
Constructor for QgsStyleTextFormatEntity, with the specified text format.
Definition qgsstyle.h:1466
A database of saved style entities, including symbols, color ramps, text formats and others.
Definition qgsstyle.h:88
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 aboutToBeDestroyed()
Emitted just before the style object is destroyed.
LabelSettingsTableColumn
Columns available in the label settings table.
Definition qgsstyle.h:165
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:204
@ LabelSettingsEntity
Label settings.
Definition qgsstyle.h:210
@ TextFormatEntity
Text formats.
Definition qgsstyle.h:209
@ SmartgroupEntity
Smart groups.
Definition qgsstyle.h:208
@ Symbol3DEntity
3D symbol entity
Definition qgsstyle.h:212
@ SymbolEntity
Symbols.
Definition qgsstyle.h:205
@ TagEntity
Tags.
Definition qgsstyle.h:206
@ ColorrampEntity
Color ramps.
Definition qgsstyle.h:207
@ LegendPatchShapeEntity
Legend patch shape.
Definition qgsstyle.h:211
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:137
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 symbolSaved(const QString &name, const QgsSymbol *symbol)
Emitted every time a new symbol has been added to the database.
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:151
QString fileName() const
Returns the current file name of the style database.
Definition qgsstyle.h:926
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:240
SmartGroupTableColumn
Columns available in the smart group table.
Definition qgsstyle.h:179
TagTableColumn
Columns available in the Tags table.
Definition qgsstyle.h:113
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:99
TagmapTableColumn
Columns available in the tag to symbol table.
Definition qgsstyle.h:125
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:811
@ 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 symbol layers.
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