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 );
179 bool tagSymbol(
StyleEntity type,
const QString &symbol,
const QStringList &tags );
190 bool detagSymbol(
StyleEntity type,
const QString &symbol,
const QStringList &tags );
200 bool detagSymbol(
StyleEntity type,
const QString &symbol );
203 bool removeSymbol(
const QString &name );
206 bool renameSymbol(
const QString &oldName,
const QString &newName );
212 const QgsSymbol *symbolRef(
const QString &name )
const;
218 QStringList symbolNames();
224 int symbolId(
const QString &name );
226 int tagId(
const QString &tag );
228 int smartgroupId(
const QString &smartgroup );
236 QStringList symbolsOfFavorite(
StyleEntity type )
const;
245 QStringList symbolsWithTag(
StyleEntity type,
int tagid )
const;
254 bool addFavorite(
StyleEntity type,
const QString &name );
263 bool removeFavorite(
StyleEntity type,
const QString &name );
272 void rename(
StyleEntity type,
int id,
const QString &newName );
291 bool saveSymbol(
const QString &name,
QgsSymbol *symbol,
bool favorite,
const QStringList &tags );
302 bool saveColorRamp(
const QString &name,
QgsColorRamp *ramp,
bool favorite,
const QStringList &tags );
305 bool removeColorRamp(
const QString &name );
308 bool renameColorRamp(
const QString &oldName,
const QString &newName );
318 bool createDatabase(
const QString &filename );
328 bool createMemoryDatabase();
347 bool load(
const QString &filename );
350 bool save( QString filename = QString() );
365 QStringList findSymbols(
StyleEntity type,
const QString &qword );
374 QStringList tagsOfSymbol(
StyleEntity type,
const QString &symbol );
384 bool symbolHasTag(
StyleEntity type,
const QString &symbol,
const QString &tag );
387 QString tag(
int id )
const;
393 QStringList smartgroupNames();
402 QString smartgroupOperator(
int id );
405 QStringList symbolsOfSmartgroup(
StyleEntity type,
int id );
408 bool exportXml(
const QString &filename );
411 bool importXml(
const QString &filename );
415 void symbolSaved(
const QString &name,
QgsSymbol *symbol );
417 void groupsModified();
432 bool openDatabase(
const QString &filename );
441 bool runEmptyQuery(
char *query,
bool freeQuery =
true );
444 int getId(
const QString &table,
const QString &name );
447 QString getName(
const QString &table,
int id )
const;
457 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.
static QgsStyle * sDefaultStyle
QgsVectorColorRampMap mColorRamps
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.
sqlite3_database_unique_ptr mCurrentDB
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.