19 #include "qgis_core.h" 43 #define QGSCLIPBOARD_STYLE_MIME "application/qgis.style" 116 bool addColorRamp(
const QString &name,
QgsColorRamp *colorRamp SIP_TRANSFER,
bool update =
false );
124 int addTag(
const QString &tagName );
133 int addSmartgroup(
const QString &name,
const QString &op,
const QgsSmartConditionMap &conditions );
141 QStringList tags()
const;
153 int colorRampCount();
156 QStringList colorRampNames();
159 const QgsColorRamp *colorRampRef(
const QString &name )
const;
165 int colorrampId(
const QString &name );
171 static void cleanDefaultStyle()
SIP_SKIP;
182 bool tagSymbol(
StyleEntity type,
const QString &symbol,
const QStringList &tags );
193 bool detagSymbol(
StyleEntity type,
const QString &symbol,
const QStringList &tags );
203 bool detagSymbol(
StyleEntity type,
const QString &symbol );
206 bool removeSymbol(
const QString &name );
209 bool renameSymbol(
const QString &oldName,
const QString &newName );
215 const QgsSymbol *symbolRef(
const QString &name )
const;
221 QStringList symbolNames();
227 int symbolId(
const QString &name );
229 int tagId(
const QString &tag );
231 int smartgroupId(
const QString &smartgroup );
239 QStringList symbolsOfFavorite(
StyleEntity type )
const;
248 QStringList symbolsWithTag(
StyleEntity type,
int tagid )
const;
257 bool addFavorite(
StyleEntity type,
const QString &name );
266 bool removeFavorite(
StyleEntity type,
const QString &name );
275 void rename(
StyleEntity type,
int id,
const QString &newName );
294 bool saveSymbol(
const QString &name,
QgsSymbol *symbol,
bool favorite,
const QStringList &tags );
305 bool saveColorRamp(
const QString &name,
QgsColorRamp *ramp,
bool favorite,
const QStringList &tags );
308 bool removeColorRamp(
const QString &name );
311 bool renameColorRamp(
const QString &oldName,
const QString &newName );
321 bool createDatabase(
const QString &filename );
331 bool createMemoryDatabase();
351 bool load(
const QString &filename );
354 bool save( QString filename = QString() );
369 QStringList findSymbols(
StyleEntity type,
const QString &qword );
378 QStringList tagsOfSymbol(
StyleEntity type,
const QString &symbol );
388 bool symbolHasTag(
StyleEntity type,
const QString &symbol,
const QString &tag );
391 QString tag(
int id )
const;
397 QStringList smartgroupNames();
406 QString smartgroupOperator(
int id );
409 QStringList symbolsOfSmartgroup(
StyleEntity type,
int id );
412 bool exportXml(
const QString &filename );
415 bool importXml(
const QString &filename );
419 void symbolSaved(
const QString &name,
QgsSymbol *symbol );
421 void groupsModified();
428 QString mErrorString;
436 bool openDatabase(
const QString &filename );
444 bool runEmptyQuery(
const QString &query );
447 int getId(
const QString &table,
const QString &name );
450 QString getName(
const QString &table,
int id )
const;
460 bool updateSymbol(
StyleEntity type,
const QString &name );
Abstract base class for color ramps.
QMap< int, QString > QgsSymbolGroupMap
StyleEntity
Enum for Entities involved in a style.
Unique pointer for sqlite3 databases, which automatically closes the database when the pointer goes o...
QMap< QString, QgsColorRamp *> QgsVectorColorRampMap
QString fileName()
Returns current file name of the style.
QMap< QString, QgsSymbol *> QgsSymbolMap
QString errorString()
Returns last error from load/save operation.
QMultiMap< QString, QString > QgsSmartConditionMap
A multimap to hold the smart group conditions as constraint and parameter pairs.