39 defaultTags.sort( Qt::CaseInsensitive );
40 mTags->addItems( defaultTags );
42 QList< QgsStyle::StyleEntity > possibleEntities;
46 this->setWindowTitle( tr(
"Save New Symbol" ) );
51 this->setWindowTitle( tr(
"Save New Color Ramp" ) );
56 this->setWindowTitle( tr(
"Save New Text Format" ) );
61 this->setWindowTitle( tr(
"Save New Label Settings" ) );
66 this->setWindowTitle( tr(
"Save New Legend Patch Shape" ) );
71 this->setWindowTitle( tr(
"Save New 3D Symbol" ) );
80 #if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
81 mLabelDestination->hide();
82 mComboBoxDestination->hide();
88 if ( styleProxyModel->rowCount( QModelIndex() ) == 0 )
90 mLabelDestination->hide();
91 mComboBoxDestination->hide();
96 mComboBoxDestination->setModel( styleProxyModel );
100 if ( possibleEntities.size() < 2 )
102 mLabelSaveAs->hide();
103 mComboSaveAs->hide();
112 mComboSaveAs->addItem( tr(
"Symbol" ), e );
140 mComboSaveAs->setCurrentIndex( 0 );
146 return mName->text();
151 mTags->setCurrentText( tags );
156 return mTags->currentText();
161 return mFavorite->isChecked();
166 if ( mComboSaveAs->count() > 0 )
174 #if QT_VERSION < QT_VERSION_CHECK(5, 13, 0)
177 if (
QgsStyle *style = qobject_cast< QgsStyle * >( mComboBoxDestination->model()->data( mComboBoxDestination->model()->index( mComboBoxDestination->currentIndex(), 0, QModelIndex() ),
QgsProjectStyleDatabaseModel::StyleRole ).value< QObject * >() ) )