|
| QgsStyle (QObject *parent=nullptr) |
| Constructor for QgsStyle, with the specified parent object. More...
|
|
| ~QgsStyle () override |
|
bool | addColorRamp (const QString &name, QgsColorRamp *colorRamp, bool update=false) |
| Adds a color ramp to the style. More...
|
|
bool | addEntity (const QString &name, const QgsStyleEntityInterface *entity, bool update=false) |
| Adds an entity to the style, with the specified name. More...
|
|
bool | addFavorite (StyleEntity type, const QString &name) |
| Adds the specified symbol to favorites. More...
|
|
bool | addLabelSettings (const QString &name, const QgsPalLayerSettings &settings, bool update=false) |
| Adds label settings with the specified name to the style. More...
|
|
bool | addLegendPatchShape (const QString &name, const QgsLegendPatchShape &shape, bool update=false) |
| Adds a legend patch shape with the specified name to the style. More...
|
|
int | addSmartgroup (const QString &name, const QString &op, const QgsSmartConditionMap &conditions) |
| Adds a new smartgroup to the database and returns the id. More...
|
|
int | addSmartgroup (const QString &name, const QString &op, const QStringList &matchTag, const QStringList &noMatchTag, const QStringList &matchName, const QStringList &noMatchName) |
| Adds a new smartgroup to the database and returns the id. More...
|
|
bool | addSymbol (const QString &name, QgsSymbol *symbol, bool update=false) |
| Adds a symbol to style and takes symbol's ownership. More...
|
|
bool | addSymbol3D (const QString &name, QgsAbstract3DSymbol *symbol, bool update=false) |
| Adds a 3d symbol with the specified name to the style. More...
|
|
int | addTag (const QString &tagName) |
| Adds a new tag and returns the tag's id. More...
|
|
bool | addTextFormat (const QString &name, const QgsTextFormat &format, bool update=false) |
| Adds a text format with the specified name to the style. More...
|
|
QStringList | allNames (StyleEntity type) const |
| Returns a list of the names of all existing entities of the specified type. More...
|
|
void | clear () |
| Removes all contents of the style. More...
|
|
QgsColorRamp * | colorRamp (const QString &name) const |
| Returns a new copy of the specified color ramp. More...
|
|
int | colorRampCount () |
| Returns count of color ramps. More...
|
|
int | colorrampId (const QString &name) |
| Returns the id in the style database for the given colorramp name returns 0 if not found. More...
|
|
QStringList | colorRampNames () const |
| Returns a list of names of color ramps. More...
|
|
const QgsColorRamp * | colorRampRef (const QString &name) const |
| Returns a const pointer to a symbol (doesn't create new instance) More...
|
|
bool | createDatabase (const QString &filename) |
| Creates an on-disk database. More...
|
|
bool | createMemoryDatabase () |
| Creates a temporary memory database. More...
|
|
void | createTables () |
| Creates tables structure for new database. More...
|
|
QgsLegendPatchShape | defaultPatch (Qgis::SymbolType type, QSizeF size) const |
| Returns the default legend patch shape for the given symbol type. More...
|
|
QList< QList< QPolygonF > > | defaultPatchAsQPolygonF (Qgis::SymbolType type, QSizeF size) const |
| Returns the default patch geometry for the given symbol type and size as a set of QPolygonF objects (parts and rings). More...
|
|
QgsTextFormat | defaultTextFormat (QgsStyle::TextFormatContext context=QgsStyle::TextFormatContext::Labeling) const |
| Returns the default text format to use for new text based objects in the specified context. More...
|
|
bool | detagSymbol (StyleEntity type, const QString &symbol) |
| Clears the symbol from all attached tags. More...
|
|
bool | detagSymbol (StyleEntity type, const QString &symbol, const QStringList &tags) |
| Detags the symbol with the given list. More...
|
|
int | entityId (StyleEntity type, const QString &name) |
| Returns the id in the style database for the given name of the specified entity type. More...
|
|
QString | errorString () const |
| Returns the last error from a load() operation. More...
|
|
bool | exportXml (const QString &filename) |
| Exports the style as a XML file. More...
|
|
QString | fileName () const |
| Returns the current file name of the style database. More...
|
|
QStringList | findSymbols (StyleEntity type, const QString &qword) |
| Returns the names of the symbols which have a matching 'substring' in its definition. More...
|
|
bool | importXml (const QString &filename) |
| Imports the symbols and colorramps into the default style database from the given XML file. More...
|
|
bool | isFavorite (StyleEntity type, const QString &name) |
| Returns true if the symbol with matching type and name is marked as a favorite. More...
|
|
bool | isReadOnly () const |
| Returns true if the style is considered a read-only library. More...
|
|
QgsPalLayerSettings | labelSettings (const QString &name) const |
| Returns the label settings with the specified name. More...
|
|
int | labelSettingsCount () const |
| Returns count of label settings in the style. More...
|
|
int | labelSettingsId (const QString &name) |
| Returns the ID in the style database for the given label settings by name. More...
|
|
QgsWkbTypes::GeometryType | labelSettingsLayerType (const QString &name) const |
| Returns the layer geometry type corresponding to the label settings with the specified name, or QgsWkbTypes::UnknownGeometry if matching label settings are not present. More...
|
|
QStringList | labelSettingsNames () const |
| Returns a list of names of label settings in the style. More...
|
|
QgsLegendPatchShape | legendPatchShape (const QString &name) const |
| Returns the legend patch shape with the specified name. More...
|
|
QStringList | legendPatchShapeNames () const |
| Returns a list of names of legend patch shapes in the style. More...
|
|
int | legendPatchShapesCount () const |
| Returns count of legend patch shapes in the style. More...
|
|
Qgis::SymbolType | legendPatchShapeSymbolType (const QString &name) const |
| Returns the symbol type corresponding to the legend patch shape with the specified name, or QgsSymbol::Hybrid if a matching legend patch shape is not present. More...
|
|
bool | load (const QString &filename) |
| Loads a file into the style. More...
|
|
QString | name () const |
| Returns the name of the style. More...
|
|
const QgsSymbol * | previewSymbolForPatchShape (const QgsLegendPatchShape &shape) const |
| Returns a symbol to use for rendering preview icons for a patch shape. More...
|
|
bool | remove (StyleEntity type, int id) |
| Removes the specified entity from the database. More...
|
|
bool | removeColorRamp (const QString &name) |
| Removes color ramp from style (and delete it) More...
|
|
bool | removeEntityByName (StyleEntity type, const QString &name) |
| Removes the entry of the specified type with matching name from the database. More...
|
|
bool | removeFavorite (StyleEntity type, const QString &name) |
| Removes the specified symbol from favorites. More...
|
|
bool | removeLabelSettings (const QString &name) |
| Removes label settings from the style. More...
|
|
bool | removeSymbol (const QString &name) |
| Removes symbol from style (and delete it) More...
|
|
bool | removeTextFormat (const QString &name) |
| Removes a text format from the style. More...
|
|
bool | rename (StyleEntity type, int id, const QString &newName) |
| Renames the given entity with the specified id. More...
|
|
bool | renameColorRamp (const QString &oldName, const QString &newName) |
| Changes ramp's name. More...
|
|
bool | renameEntity (StyleEntity type, const QString &oldName, const QString &newName) |
| Renames an entity of the specified type from oldName to newName. More...
|
|
bool | renameLabelSettings (const QString &oldName, const QString &newName) |
| Changes a label setting's name. More...
|
|
bool | renameLegendPatchShape (const QString &oldName, const QString &newName) |
| Changes a legend patch shape's name. More...
|
|
bool | renameSymbol (const QString &oldName, const QString &newName) |
| Renames a symbol from oldName to newName. More...
|
|
bool | renameSymbol3D (const QString &oldName, const QString &newName) |
| Changes a 3d symbol's name. More...
|
|
bool | renameTextFormat (const QString &oldName, const QString &newName) |
| Changes a text format's name. More...
|
|
Q_DECL_DEPRECATED bool | save (const QString &filename=QString()) |
| Saves style into a file. More...
|
|
bool | saveColorRamp (const QString &name, QgsColorRamp *ramp, bool favorite, const QStringList &tags) |
| Adds the colorramp to the database. More...
|
|
bool | saveLabelSettings (const QString &name, const QgsPalLayerSettings &settings, bool favorite, const QStringList &tags) |
| Adds label settings to the database. More...
|
|
bool | saveLegendPatchShape (const QString &name, const QgsLegendPatchShape &shape, bool favorite, const QStringList &tags) |
| Adds a legend patch shape to the database. More...
|
|
bool | saveSymbol (const QString &name, QgsSymbol *symbol, bool favorite, const QStringList &tags) |
| Adds the symbol to the database with tags. More...
|
|
bool | saveSymbol3D (const QString &name, QgsAbstract3DSymbol *symbol, bool favorite, const QStringList &tags) |
| Adds a 3d symbol to the database. More...
|
|
bool | saveTextFormat (const QString &name, const QgsTextFormat &format, bool favorite, const QStringList &tags) |
| Adds a text format to the database. More...
|
|
void | setFileName (const QString &filename) |
| Sets the current file name of the style database. More...
|
|
void | setName (const QString &name) |
| Sets the name of the style. More...
|
|
void | setReadOnly (bool readOnly) |
| Sets whether the style is considered a read-only library. More...
|
|
QgsSmartConditionMap | smartgroup (int id) |
| Returns the QgsSmartConditionMap for the given id. More...
|
|
int | smartgroupId (const QString &smartgroup) |
| Returns the database id for the given smartgroup name. More...
|
|
QStringList | smartgroupNames () const |
| Returns the smart groups list. More...
|
|
QString | smartgroupOperator (int id) |
| Returns the operator for the smartgroup. More...
|
|
QgsSymbolGroupMap | smartgroupsListMap () |
| Returns the smart groups map with id as key and name as value. More...
|
|
QgsSymbol * | symbol (const QString &name) |
| Returns a NEW copy of symbol. More...
|
|
QgsAbstract3DSymbol * | symbol3D (const QString &name) const |
| Returns a new copy of the 3D symbol with the specified name. More...
|
|
QList< QgsWkbTypes::GeometryType > | symbol3DCompatibleGeometryTypes (const QString &name) const |
| Returns the list of the vector layer geometry types which are compatible with the 3D symbol with the specified name, or an empty list if a matching 3d symbol is not present. More...
|
|
int | symbol3DCount () const |
| Returns count of 3D symbols in the style. More...
|
|
QStringList | symbol3DNames () const |
| Returns a list of names of 3d symbols in the style. More...
|
|
int | symbolCount () |
| Returns count of symbols in style. More...
|
|
bool | symbolHasTag (StyleEntity type, const QString &symbol, const QString &tag) |
| Returns whether a given tag is associated with the symbol. More...
|
|
int | symbolId (const QString &name) |
| Returns the id in the style database for the given symbol name returns 0 if not found. More...
|
|
QStringList | symbolNames () const |
| Returns a list of names of symbols. More...
|
|
const QgsSymbol * | symbolRef (const QString &name) const |
| Returns a const pointer to a symbol (doesn't create new instance) More...
|
|
QStringList | symbolsOfFavorite (StyleEntity type) const |
| Returns the symbol names which are flagged as favorite. More...
|
|
QStringList | symbolsOfSmartgroup (StyleEntity type, int id) |
| Returns the symbols for the smartgroup. More...
|
|
QStringList | symbolsWithTag (StyleEntity type, int tagid) const |
| Returns the symbol names with which have the given tag. More...
|
|
QString | tag (int id) const |
| Returns the tag name for the given id. More...
|
|
int | tagId (const QString &tag) |
| Returns the database id for the given tag name. More...
|
|
QStringList | tags () const |
| Returns a list of all tags in the style database. More...
|
|
QStringList | tagsOfSymbol (StyleEntity type, const QString &symbol) |
| Returns the tags associated with the symbol. More...
|
|
bool | tagSymbol (StyleEntity type, const QString &symbol, const QStringList &tags) |
| Tags the symbol with the tags in the list. More...
|
|
QgsTextFormat | textFormat (const QString &name) const |
| Returns the text format with the specified name. More...
|
|
int | textFormatCount () const |
| Returns count of text formats in the style. More...
|
|
int | textFormatId (const QString &name) |
| Returns the ID in the style database for the given text format by name. More...
|
|
QStringList | textFormatNames () const |
| Returns a list of names of text formats in the style. More...
|
|