37 defaultTags.sort( Qt::CaseInsensitive );
38 mTags->addItems( defaultTags );
40 QList< QgsStyle::StyleEntity > possibleEntities;
44 this->setWindowTitle( tr(
"Save New Symbol" ) );
49 this->setWindowTitle( tr(
"Save New Color Ramp" ) );
54 this->setWindowTitle( tr(
"Save New Text Format" ) );
59 this->setWindowTitle( tr(
"Save New Label Settings" ) );
64 this->setWindowTitle( tr(
"Save New Legend Patch Shape" ) );
69 this->setWindowTitle( tr(
"Save New 3D Symbol" ) );
78 if ( possibleEntities.size() < 2 )
90 mComboSaveAs->addItem( tr(
"Symbol" ), e );
118 mComboSaveAs->setCurrentIndex( 0 );
124 return mName->text();
129 mTags->setCurrentText(
tags );
134 return mTags->currentText();
139 return mFavorite->isChecked();
144 if ( mComboSaveAs->count() > 0 )
static QIcon getThemeIcon(const QString &name, const QColor &fillColor=QColor(), const QColor &strokeColor=QColor())
Helper to get a theme icon.
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
bool isFavorite() const
Returns true if the favorite is checked for the symbol.
QString name() const
Returns the entered name for the new symbol.
QgsStyle::StyleEntity selectedType() const
Returns the type of style entity to save.
void setDefaultTags(const QString &tags)
Sets the default tags for the newly created item.
QgsStyleSaveDialog(QWidget *parent=nullptr, QgsStyle::StyleEntity type=QgsStyle::SymbolEntity)
Constructor for QgsSymbolSaveDialog.
QString tags() const
Returns any tags entered for the new symbol (as a comma separated value list).
QStringList tags() const
Returns a list of all tags in the style database.
StyleEntity
Enum for Entities involved in a style.
@ LabelSettingsEntity
Label settings.
@ TextFormatEntity
Text formats.
@ SmartgroupEntity
Smart groups.
@ Symbol3DEntity
3D symbol entity (since QGIS 3.14)
@ ColorrampEntity
Color ramps.
@ LegendPatchShapeEntity
Legend patch shape (since QGIS 3.14)
static QgsStyle * defaultStyle()
Returns default application-wide style.