QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
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 <sqlite3.h>
20
21#include "qgis.h"
22#include "qgis_core.h"
23#include "qgslegendpatchshape.h"
24#include "qgspallabeling.h"
25#include "qgssqliteutils.h"
26#include "qgssymbollayerutils.h"
27#include "qgstextformat.h"
28
29#include <QMap>
30#include <QMultiMap>
31#include <QString>
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#define QGSCLIPBOARD_STYLES_MIME "application/qgis.styles"
61
80typedef QMultiMap<QString, QString> QgsSmartConditionMap;
81
82
88class CORE_EXPORT QgsStyle : public QObject
89{
90 Q_OBJECT
91
92 public:
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, 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, const QgsSymbol *symbol, bool favorite, const QStringList &tags );
687
697 bool saveColorRamp( const QString &name, const 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, const 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 bool mInitialized = true;
1244 QString mName;
1245 bool mReadOnly = false;
1246
1247 QgsSymbolMap mSymbols;
1248 QgsVectorColorRampMap mColorRamps;
1249 QgsTextFormatMap mTextFormats;
1250 QgsLabelSettingsMap mLabelSettings;
1251 QMap<QString, QgsLegendPatchShape > mLegendPatchShapes;
1252 QMap<QString, QgsAbstract3DSymbol * > m3dSymbols;
1253
1254 QHash< QgsStyle::StyleEntity, QHash< QString, QStringList > > mCachedTags;
1255 QHash< QgsStyle::StyleEntity, QHash< QString, bool > > mCachedFavorites;
1256
1257 QString mErrorString;
1258 QString mFileName;
1259
1260 sqlite3_database_unique_ptr mCurrentDB;
1261
1262 std::unique_ptr< QgsSymbol > mPatchMarkerSymbol;
1263 std::unique_ptr< QgsSymbol > mPatchLineSymbol;
1264 std::unique_ptr< QgsSymbol > mPatchFillSymbol;
1265
1266 mutable QHash< int, QHash< QSizeF, QgsLegendPatchShape > > mDefaultPatchCache;
1267 mutable QHash< int, QHash< QSizeF, QList< QList< QPolygonF > > > > mDefaultPatchQPolygonFCache;
1268
1269 QMap< QString, QDomElement > mDeferred3DsymbolElements;
1270 void handleDeferred3DSymbolCreation();
1271
1272 static QgsStyle *sDefaultStyle;
1273
1279 void initializeDefaultStyle( const QString &filename );
1280
1282 bool openDatabase( const QString &filename );
1283
1285 bool importXml( const QString &filename, int sinceVersion );
1286
1293 bool runEmptyQuery( const QString &query );
1294
1296 int getId( const QString &table, const QString &name );
1297
1299 QString getName( const QString &table, int id ) const;
1300
1309 bool updateSymbol( StyleEntity type, const QString &name );
1310
1311 void clearCachedTags( StyleEntity type, const QString &name );
1312
1316 bool createStyleMetadataTableIfNeeded();
1317 void upgradeIfRequired();
1318
1322 static QString entityTableName( StyleEntity type );
1323
1327 static QString tagmapTableName( StyleEntity type );
1328
1332 static QString tagmapEntityIdFieldName( StyleEntity type );
1333
1334 friend class Qgs3D;
1335 friend class TestStyle;
1336
1337 Q_DISABLE_COPY( QgsStyle )
1338};
1339
1347{
1348#ifdef SIP_RUN
1350 switch ( sipCpp->type() )
1351 {
1353 sipType = sipType_QgsStyleSymbolEntity;
1354 break;
1355
1357 sipType = sipType_QgsStyleColorRampEntity;
1358 break;
1359
1361 sipType = sipType_QgsStyleTextFormatEntity;
1362 break;
1363
1365 sipType = sipType_QgsStyleLabelSettingsEntity;
1366 break;
1367
1370 sipType = 0;
1371 break;
1372 }
1373 SIP_END
1374#endif
1375
1376 public:
1377
1378 virtual ~QgsStyleEntityInterface() = default;
1379
1383 virtual QgsStyle::StyleEntity type() const = 0;
1384};
1385
1393{
1394 public:
1401 : mSymbol( symbol )
1402 {}
1403
1404 QgsStyle::StyleEntity type() const override;
1405
1409 QgsSymbol *symbol() const { return mSymbol; }
1410
1411 private:
1412 QgsSymbol *mSymbol = nullptr;
1413};
1414
1422{
1423 public:
1430 : mRamp( ramp )
1431 {}
1432
1433 QgsStyle::StyleEntity type() const override;
1434
1438 QgsColorRamp *ramp() const { return mRamp; }
1439
1440 private:
1441 QgsColorRamp *mRamp = nullptr;
1442};
1443
1451{
1452 public:
1457 : mFormat( format )
1458 {}
1459
1460 QgsStyle::StyleEntity type() const override;
1461
1465 QgsTextFormat format() const { return mFormat; }
1466
1467 private:
1468 QgsTextFormat mFormat;
1469};
1470
1478{
1479 public:
1486
1487 QgsStyle::StyleEntity type() const override;
1488
1489
1493 const QgsPalLayerSettings &settings() const { return mSettings; }
1494
1495 private:
1496 QgsPalLayerSettings mSettings;
1497};
1498
1506{
1507 public:
1514
1515 QgsStyle::StyleEntity type() const override;
1516
1517
1521 const QgsLegendPatchShape &shape() const { return mShape; }
1522
1523 private:
1524 QgsLegendPatchShape mShape;
1525};
1526
1534{
1535 public:
1542 : mSymbol( symbol )
1543 {}
1544
1545 QgsStyle::StyleEntity type() const override;
1546
1550 const QgsAbstract3DSymbol *symbol() const { return mSymbol; }
1551
1552 private:
1553 const QgsAbstract3DSymbol *mSymbol = nullptr;
1554};
1555
1556#endif
Provides global constants and enumerations for use throughout the application.
Definition qgis.h:62
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
Definition qgis.h:379
SymbolType
Symbol types.
Definition qgis.h:636
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:113
QgsStyleColorRampEntity(QgsColorRamp *ramp)
Constructor for QgsStyleColorRampEntity, with the specified color ramp.
Definition qgsstyle.h:1429
QgsColorRamp * ramp() const
Returns the entity's color ramp.
Definition qgsstyle.h:1438
An interface for entities which can be placed in a QgsStyle database.
Definition qgsstyle.h:1347
virtual QgsStyle::StyleEntity type() const =0
Returns the type of style entity.
virtual ~QgsStyleEntityInterface()=default
const QgsPalLayerSettings & settings() const
Returns the entity's label settings.
Definition qgsstyle.h:1493
QgsStyleLabelSettingsEntity(const QgsPalLayerSettings &settings)
Constructor for QgsStyleLabelSettingsEntity, with the specified label settings.
Definition qgsstyle.h:1483
const QgsLegendPatchShape & shape() const
Returns the entity's legend patch shape.
Definition qgsstyle.h:1521
QgsStyleLegendPatchShapeEntity(const QgsLegendPatchShape &shape)
Constructor for QgsStyleLegendPatchShapeEntity, with the specified legend patch shape.
Definition qgsstyle.h:1511
const QgsAbstract3DSymbol * symbol() const
Returns the entity's symbol.
Definition qgsstyle.h:1550
QgsStyleSymbol3DEntity(const QgsAbstract3DSymbol *symbol)
Constructor for QgsStyleSymbol3DEntity, with the specified symbol.
Definition qgsstyle.h:1541
QgsStyleSymbolEntity(QgsSymbol *symbol)
Constructor for QgsStyleSymbolEntity, with the specified symbol.
Definition qgsstyle.h:1400
QgsSymbol * symbol() const
Returns the entity's symbol.
Definition qgsstyle.h:1409
QgsTextFormat format() const
Returns the entity's text format.
Definition qgsstyle.h:1465
QgsStyleTextFormatEntity(const QgsTextFormat &format)
Constructor for QgsStyleTextFormatEntity, with the specified text format.
Definition qgsstyle.h:1456
A database of saved style entities, including symbols, color ramps, text formats and others.
Definition qgsstyle.h:89
void labelSettingsChanged(const QString &name)
Emitted whenever a label setting's definition is changed.
QString errorString() const
Returns the last error from a load() operation.
Definition qgsstyle.h:914
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
QgsSymbol * symbol(const QString &name)
Returns a NEW copy of symbol.
Definition qgsstyle.cpp:317
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: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: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...
bool isFavorite(StyleEntity type, const QString &name)
Returns true if the symbol with matching type and name is marked as a favorite.
QString name() const
Returns the name of the style.
Definition qgsstyle.cpp:110
QgsStyle(QObject *parent=nullptr)
Constructor for QgsStyle, with the specified parent object.
Definition qgsstyle.cpp:84
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.
friend class Qgs3D
Definition qgsstyle.h:1334
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.
Definition qgsstyle.h:811
void symbolRemoved(const QString &name)
Emitted whenever a symbol has been removed from the style and the database has been updated as a resu...
friend class TestStyle
Definition qgsstyle.h:1335
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...
bool importXml(const QString &filename)
Imports the symbols and colorramps into the default style database from the given XML file.
Abstract base class for symbol layers.
Abstract base class for all rendered symbols.
Definition qgssymbol.h:227
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:80
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:198
#define SIP_DEPRECATED
Definition qgis_sip.h:113
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:52
#define SIP_SKIP
Definition qgis_sip.h:133
#define SIP_TRANSFER
Definition qgis_sip.h:35
#define SIP_FACTORY
Definition qgis_sip.h:83
#define SIP_END
Definition qgis_sip.h:215
QMap< QString, QgsSymbol * > QgsSymbolMap
Definition qgsrenderer.h:52
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