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" ) );
68 if ( possibleEntities.size() < 2 )
80 mComboSaveAs->addItem( tr(
"Symbol" ), e );
100 mComboSaveAs->setCurrentIndex( 0 );
106 return mName->text();
111 mTags->setCurrentText( tags );
116 return mTags->currentText();
121 return mFavorite->isChecked();
126 if ( mComboSaveAs->count() > 0 )
127 return static_cast< QgsStyle::StyleEntity >( mComboSaveAs->currentData().toInt() );
QString tags() const
Returns any tags entered for the new symbol (as a comma separated value list).
QString name() const
Returns the entered name for the new symbol.
static QIcon getThemeIcon(const QString &name)
Helper to get a theme icon.
static QgsStyle * defaultStyle()
Returns default application-wide style.
StyleEntity
Enum for Entities involved in a style.
QgsStyleSaveDialog(QWidget *parent=nullptr, QgsStyle::StyleEntity type=QgsStyle::SymbolEntity)
Constructor for QgsSymbolSaveDialog.
void setDefaultTags(const QString &tags)
Sets the default tags for the newly created item.
QStringList tags() const
Returns a list of all tags in the style database.
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.
QgsStyle::StyleEntity selectedType() const
Returns the type of style entity to save.