mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
Enable category selection when saving style to database
This commit is contained in:
parent
0b5910ac8e
commit
c31364f15a
@ -981,7 +981,21 @@ Export the properties of this layer as SLD style in a QDomDocument
|
||||
during the execution of writeSymbology
|
||||
%End
|
||||
|
||||
virtual QString saveDefaultStyle( bool &resultFlag /Out/ );
|
||||
virtual QString saveDefaultStyle( bool &resultFlag /Out/, StyleCategories categories );
|
||||
%Docstring
|
||||
Save the properties of this layer as the default style
|
||||
(either as a .qml file on disk or as a
|
||||
record in the users style table in their personal qgis.db)
|
||||
|
||||
:param categories: the style categories to be saved (since QGIS 3.26)
|
||||
|
||||
:return: - a QString with any status messages
|
||||
- resultFlag: a reference to a flag that will be set to ``False`` if we did not manage to save the default style.
|
||||
|
||||
.. seealso:: :py:func:`loadNamedStyle`
|
||||
%End
|
||||
|
||||
virtual QString saveDefaultStyle( bool &resultFlag /Out/ ) /Deprecated/;
|
||||
%Docstring
|
||||
Save the properties of this layer as the default style
|
||||
(either as a .qml file on disk or as a
|
||||
@ -992,6 +1006,8 @@ record in the users style table in their personal qgis.db)
|
||||
- resultFlag: a reference to a flag that will be set to ``False`` if we did not manage to save the default style.
|
||||
|
||||
.. seealso:: :py:func:`loadNamedStyle`
|
||||
|
||||
.. deprecated:: QGIS 3.26
|
||||
%End
|
||||
|
||||
virtual QString saveNamedStyle( const QString &uri, bool &resultFlag /Out/, StyleCategories categories = AllStyleCategories );
|
||||
|
@ -932,7 +932,8 @@ Resolves references to other layers (kept as layer IDs after reading XML) into l
|
||||
|
||||
virtual void saveStyleToDatabase( const QString &name, const QString &description,
|
||||
bool useAsDefault, const QString &uiFileContent,
|
||||
QString &msgError /Out/ );
|
||||
QString &msgError /Out/,
|
||||
QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
|
||||
%Docstring
|
||||
Saves named and sld style of the layer to the style table in the db.
|
||||
|
||||
@ -940,6 +941,8 @@ Saves named and sld style of the layer to the style table in the db.
|
||||
:param description: A description of the style
|
||||
:param useAsDefault: Set to ``True`` if style should be used as the default style for the layer
|
||||
:param uiFileContent:
|
||||
:param msgError: will be set to a descriptive error message if any occurs
|
||||
:param categories: the style categories to be saved.
|
||||
|
||||
.. note::
|
||||
|
||||
|
@ -213,9 +213,13 @@ void QgsAnnotationLayerProperties::saveDefaultStyle()
|
||||
|
||||
// a flag passed by reference
|
||||
bool defaultSavedFlag = false;
|
||||
// One the deprecated `saveDefaultStyle()` method is gone, just
|
||||
// remove the NOWARN_DEPRECATED tags
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
// after calling this the above flag will be set true for success
|
||||
// or false if the save operation failed
|
||||
const QString myMessage = mLayer->saveDefaultStyle( defaultSavedFlag );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
if ( !defaultSavedFlag )
|
||||
{
|
||||
// let the user know what went wrong
|
||||
|
@ -243,9 +243,13 @@ void QgsPointCloudLayerProperties::saveDefaultStyle()
|
||||
|
||||
// a flag passed by reference
|
||||
bool defaultSavedFlag = false;
|
||||
// One the deprecated `saveDefaultStyle()` method is gone, just
|
||||
// remove the NOWARN_DEPRECATED tags
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
// after calling this the above flag will be set true for success
|
||||
// or false if the save operation failed
|
||||
const QString myMessage = mLayer->saveDefaultStyle( defaultSavedFlag );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
if ( !defaultSavedFlag )
|
||||
{
|
||||
// let the user know what went wrong
|
||||
|
@ -9093,6 +9093,7 @@ void QgisApp::saveStyleFile( QgsMapLayer *layer )
|
||||
if ( dlg.exec() )
|
||||
{
|
||||
bool resultFlag = false;
|
||||
QString errorMessage;
|
||||
|
||||
QgsVectorLayerProperties::StyleType type = dlg.currentStyleType();
|
||||
switch ( type )
|
||||
@ -9100,12 +9101,11 @@ void QgisApp::saveStyleFile( QgsMapLayer *layer )
|
||||
case QgsVectorLayerProperties::QML:
|
||||
case QgsVectorLayerProperties::SLD:
|
||||
{
|
||||
QString message;
|
||||
QString filePath = dlg.outputFilePath();
|
||||
if ( type == QgsVectorLayerProperties::QML )
|
||||
message = vlayer->saveNamedStyle( filePath, resultFlag, dlg.styleCategories() );
|
||||
errorMessage = vlayer->saveNamedStyle( filePath, resultFlag, dlg.styleCategories() );
|
||||
else
|
||||
message = vlayer->saveSldStyle( filePath, resultFlag );
|
||||
errorMessage = vlayer->saveSldStyle( filePath, resultFlag );
|
||||
|
||||
if ( resultFlag )
|
||||
{
|
||||
@ -9113,7 +9113,7 @@ void QgisApp::saveStyleFile( QgsMapLayer *layer )
|
||||
}
|
||||
else
|
||||
{
|
||||
mInfoBar->pushMessage( tr( "Save Style" ), message, Qgis::MessageLevel::Warning );
|
||||
mInfoBar->pushMessage( tr( "Save Style" ), errorMessage, Qgis::MessageLevel::Warning );
|
||||
}
|
||||
|
||||
break;
|
||||
@ -9125,7 +9125,6 @@ void QgisApp::saveStyleFile( QgsMapLayer *layer )
|
||||
|
||||
QgsVectorLayerSaveStyleDialog::SaveToDbSettings dbSettings = dlg.saveToDbSettings();
|
||||
|
||||
QString errorMessage;
|
||||
if ( QgsProviderRegistry::instance()->styleExists( vlayer->providerType(), vlayer->source(), dbSettings.name, errorMessage ) )
|
||||
{
|
||||
if ( QMessageBox::question( nullptr, tr( "Save style in database" ),
|
||||
@ -9141,7 +9140,7 @@ void QgisApp::saveStyleFile( QgsMapLayer *layer )
|
||||
return;
|
||||
}
|
||||
|
||||
vlayer->saveStyleToDatabase( dbSettings.name, dbSettings.description, dbSettings.isDefault, dbSettings.uiFileContent, msgError );
|
||||
vlayer->saveStyleToDatabase( dbSettings.name, dbSettings.description, dbSettings.isDefault, dbSettings.uiFileContent, msgError, dlg.styleCategories() );
|
||||
|
||||
if ( !msgError.isNull() )
|
||||
{
|
||||
|
@ -193,9 +193,13 @@ void QgsVectorTileLayerProperties::saveDefaultStyle()
|
||||
|
||||
// a flag passed by reference
|
||||
bool defaultSavedFlag = false;
|
||||
// One the deprecated `saveDefaultStyle()` method is gone, just
|
||||
// remove the NOWARN_DEPRECATED tags
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
// after calling this the above flag will be set true for success
|
||||
// or false if the save operation failed
|
||||
const QString myMessage = mLayer->saveDefaultStyle( defaultSavedFlag );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
if ( !defaultSavedFlag )
|
||||
{
|
||||
// let the user know what went wrong
|
||||
|
@ -1322,7 +1322,12 @@ void QgsMapLayer::exportNamedStyle( QDomDocument &doc, QString &errorMsg, const
|
||||
|
||||
QString QgsMapLayer::saveDefaultStyle( bool &resultFlag )
|
||||
{
|
||||
return saveNamedStyle( styleURI(), resultFlag );
|
||||
return saveDefaultStyle( resultFlag, AllStyleCategories );
|
||||
}
|
||||
|
||||
QString QgsMapLayer::saveDefaultStyle( bool &resultFlag, StyleCategories categories )
|
||||
{
|
||||
return saveNamedStyle( styleURI(), resultFlag, categories );
|
||||
}
|
||||
|
||||
QString QgsMapLayer::saveNamedMetadata( const QString &uri, bool &resultFlag )
|
||||
|
@ -1102,10 +1102,23 @@ class CORE_EXPORT QgsMapLayer : public QObject
|
||||
* record in the users style table in their personal qgis.db)
|
||||
* \param resultFlag a reference to a flag that will be set to FALSE if
|
||||
* we did not manage to save the default style.
|
||||
* \param categories the style categories to be saved (since QGIS 3.26)
|
||||
* \returns a QString with any status messages
|
||||
* \see loadNamedStyle() and \see saveNamedStyle()
|
||||
*/
|
||||
virtual QString saveDefaultStyle( bool &resultFlag SIP_OUT );
|
||||
virtual QString saveDefaultStyle( bool &resultFlag SIP_OUT, StyleCategories categories );
|
||||
|
||||
/**
|
||||
* Save the properties of this layer as the default style
|
||||
* (either as a .qml file on disk or as a
|
||||
* record in the users style table in their personal qgis.db)
|
||||
* \param resultFlag a reference to a flag that will be set to FALSE if
|
||||
* we did not manage to save the default style.
|
||||
* \returns a QString with any status messages
|
||||
* \see loadNamedStyle() and \see saveNamedStyle()
|
||||
* \deprecated since QGIS 3.26
|
||||
*/
|
||||
Q_DECL_DEPRECATED virtual QString saveDefaultStyle( bool &resultFlag SIP_OUT ) SIP_DEPRECATED;
|
||||
|
||||
/**
|
||||
* Save the properties of this layer as a named style
|
||||
|
@ -5442,13 +5442,13 @@ bool QgsVectorLayer::deleteStyleFromDatabase( const QString &styleId, QString &m
|
||||
|
||||
|
||||
void QgsVectorLayer::saveStyleToDatabase( const QString &name, const QString &description,
|
||||
bool useAsDefault, const QString &uiFileContent, QString &msgError )
|
||||
bool useAsDefault, const QString &uiFileContent, QString &msgError, QgsMapLayer::StyleCategories categories )
|
||||
{
|
||||
|
||||
QString sldStyle, qmlStyle;
|
||||
QDomDocument qmlDocument, sldDocument;
|
||||
QgsReadWriteContext context;
|
||||
exportNamedStyle( qmlDocument, msgError, context );
|
||||
exportNamedStyle( qmlDocument, msgError, context, categories );
|
||||
if ( !msgError.isNull() )
|
||||
{
|
||||
return;
|
||||
|
@ -987,6 +987,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
|
||||
* \param useAsDefault Set to TRUE if style should be used as the default style for the layer
|
||||
* \param uiFileContent
|
||||
* \param msgError will be set to a descriptive error message if any occurs
|
||||
* \param categories the style categories to be saved.
|
||||
*
|
||||
*
|
||||
* \note Prior to QGIS 3.24, this method would show a message box warning when a
|
||||
@ -997,7 +998,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
|
||||
*/
|
||||
virtual void saveStyleToDatabase( const QString &name, const QString &description,
|
||||
bool useAsDefault, const QString &uiFileContent,
|
||||
QString &msgError SIP_OUT );
|
||||
QString &msgError SIP_OUT,
|
||||
QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
|
||||
|
||||
/**
|
||||
* Lists all the style in db split into related to the layer and not related to
|
||||
|
@ -268,9 +268,13 @@ void QgsMeshLayerProperties::saveDefaultStyle()
|
||||
|
||||
// a flag passed by reference
|
||||
bool defaultSavedFlag = false;
|
||||
// One the deprecated `saveDefaultStyle()` method is gone, just
|
||||
// remove the NOWARN_DEPRECATED tags
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
// after calling this the above flag will be set true for success
|
||||
// or false if the save operation failed
|
||||
QString myMessage = mMeshLayer->saveDefaultStyle( defaultSavedFlag );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
if ( !defaultSavedFlag )
|
||||
{
|
||||
// let the user know what went wrong
|
||||
|
@ -243,7 +243,11 @@ void QgsMapLayerStyleManagerWidget::saveAsDefault()
|
||||
}
|
||||
|
||||
bool defaultSavedFlag = false;
|
||||
// One the deprecated `saveDefaultStyle()` method is gone, just
|
||||
// remove the NOWARN_DEPRECATED tags
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
errorMsg = mLayer->saveDefaultStyle( defaultSavedFlag );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
if ( !defaultSavedFlag )
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Default Style" ), errorMsg );
|
||||
|
@ -1553,9 +1553,13 @@ void QgsRasterLayerProperties::saveDefaultStyle_clicked()
|
||||
|
||||
// a flag passed by reference
|
||||
bool defaultSavedFlag = false;
|
||||
// One the deprecated `saveDefaultStyle()` method is gone, just
|
||||
// remove the NOWARN_DEPRECATED tags
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
// after calling this the above flag will be set true for success
|
||||
// or false if the save operation failed
|
||||
QString myMessage = mRasterLayer->saveDefaultStyle( defaultSavedFlag );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
if ( !defaultSavedFlag )
|
||||
{
|
||||
//let the user know what went wrong
|
||||
|
@ -1091,7 +1091,11 @@ void QgsVectorLayerProperties::saveDefaultStyle_clicked()
|
||||
}
|
||||
|
||||
bool defaultSavedFlag = false;
|
||||
// One the deprecated `saveDefaultStyle()` method is gone, just
|
||||
// remove the NOWARN_DEPRECATED tags
|
||||
Q_NOWARN_DEPRECATED_PUSH
|
||||
errorMsg = mLayer->saveDefaultStyle( defaultSavedFlag );
|
||||
Q_NOWARN_DEPRECATED_POP
|
||||
if ( !defaultSavedFlag )
|
||||
{
|
||||
QMessageBox::warning( this, tr( "Default Style" ), errorMsg );
|
||||
@ -1213,6 +1217,7 @@ void QgsVectorLayerProperties::saveStyleAs()
|
||||
apply();
|
||||
|
||||
bool defaultLoadedFlag = false;
|
||||
QString errorMessage;
|
||||
|
||||
StyleType type = dlg.currentStyleType();
|
||||
switch ( type )
|
||||
@ -1220,12 +1225,11 @@ void QgsVectorLayerProperties::saveStyleAs()
|
||||
case QML:
|
||||
case SLD:
|
||||
{
|
||||
QString message;
|
||||
QString filePath = dlg.outputFilePath();
|
||||
if ( type == QML )
|
||||
message = mLayer->saveNamedStyle( filePath, defaultLoadedFlag, dlg.styleCategories() );
|
||||
errorMessage = mLayer->saveNamedStyle( filePath, defaultLoadedFlag, dlg.styleCategories() );
|
||||
else
|
||||
message = mLayer->saveSldStyle( filePath, defaultLoadedFlag );
|
||||
errorMessage = mLayer->saveSldStyle( filePath, defaultLoadedFlag );
|
||||
|
||||
//reset if the default style was loaded OK only
|
||||
if ( defaultLoadedFlag )
|
||||
@ -1235,7 +1239,7 @@ void QgsVectorLayerProperties::saveStyleAs()
|
||||
else
|
||||
{
|
||||
//let the user know what went wrong
|
||||
QMessageBox::information( this, tr( "Save Style" ), message );
|
||||
QMessageBox::information( this, tr( "Save Style" ), errorMessage );
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1243,11 +1247,9 @@ void QgsVectorLayerProperties::saveStyleAs()
|
||||
case DB:
|
||||
{
|
||||
QString infoWindowTitle = QObject::tr( "Save style to DB (%1)" ).arg( mLayer->providerType() );
|
||||
QString msgError;
|
||||
|
||||
QgsVectorLayerSaveStyleDialog::SaveToDbSettings dbSettings = dlg.saveToDbSettings();
|
||||
|
||||
QString errorMessage;
|
||||
if ( QgsProviderRegistry::instance()->styleExists( mLayer->providerType(), mLayer->source(), dbSettings.name, errorMessage ) )
|
||||
{
|
||||
if ( QMessageBox::question( nullptr, QObject::tr( "Save style in database" ),
|
||||
@ -1263,11 +1265,11 @@ void QgsVectorLayerProperties::saveStyleAs()
|
||||
return;
|
||||
}
|
||||
|
||||
mLayer->saveStyleToDatabase( dbSettings.name, dbSettings.description, dbSettings.isDefault, dbSettings.uiFileContent, msgError );
|
||||
mLayer->saveStyleToDatabase( dbSettings.name, dbSettings.description, dbSettings.isDefault, dbSettings.uiFileContent, errorMessage, dlg.styleCategories() );
|
||||
|
||||
if ( !msgError.isNull() )
|
||||
if ( !errorMessage.isNull() )
|
||||
{
|
||||
mMessageBar->pushMessage( infoWindowTitle, msgError, Qgis::MessageLevel::Warning );
|
||||
mMessageBar->pushMessage( infoWindowTitle, errorMessage, Qgis::MessageLevel::Warning );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1393,7 +1395,7 @@ void QgsVectorLayerProperties::saveMultipleStylesAs()
|
||||
return;
|
||||
}
|
||||
|
||||
mLayer->saveStyleToDatabase( name, dbSettings.description, dbSettings.isDefault, dbSettings.uiFileContent, msgError );
|
||||
mLayer->saveStyleToDatabase( name, dbSettings.description, dbSettings.isDefault, dbSettings.uiFileContent, msgError, dlg.styleCategories() );
|
||||
|
||||
if ( !msgError.isNull() )
|
||||
{
|
||||
@ -1461,21 +1463,20 @@ void QgsVectorLayerProperties::loadStyle()
|
||||
mOldStyle = mLayer->styleManager()->style( mLayer->styleManager()->currentStyle() );
|
||||
QgsMapLayer::StyleCategories categories = dlg.styleCategories();
|
||||
StyleType type = dlg.currentStyleType();
|
||||
bool defaultLoadedFlag = false;
|
||||
switch ( type )
|
||||
{
|
||||
case QML:
|
||||
case SLD:
|
||||
{
|
||||
QString message;
|
||||
bool defaultLoadedFlag = false;
|
||||
QString filePath = dlg.filePath();
|
||||
if ( type == SLD )
|
||||
{
|
||||
message = mLayer->loadSldStyle( filePath, defaultLoadedFlag );
|
||||
errorMsg = mLayer->loadSldStyle( filePath, defaultLoadedFlag );
|
||||
}
|
||||
else
|
||||
{
|
||||
message = mLayer->loadNamedStyle( filePath, defaultLoadedFlag, true, categories );
|
||||
errorMsg = mLayer->loadNamedStyle( filePath, defaultLoadedFlag, true, categories );
|
||||
}
|
||||
//reset if the default style was loaded OK only
|
||||
if ( defaultLoadedFlag )
|
||||
@ -1485,7 +1486,7 @@ void QgsVectorLayerProperties::loadStyle()
|
||||
else
|
||||
{
|
||||
//let the user know what went wrong
|
||||
QMessageBox::warning( this, tr( "Load Style" ), message );
|
||||
QMessageBox::warning( this, tr( "Load Style" ), errorMsg );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -46,9 +46,10 @@ QgsVectorLayerSaveStyleDialog::QgsVectorLayerSaveStyleDialog( QgsVectorLayer *la
|
||||
connect( mStyleTypeComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), this, [ = ]( int )
|
||||
{
|
||||
const QgsVectorLayerProperties::StyleType type = currentStyleType();
|
||||
mSaveToFileWidget->setVisible( type != QgsVectorLayerProperties::DB );
|
||||
mFileLabel->setVisible( type != QgsVectorLayerProperties::DB );
|
||||
mFileWidget->setVisible( type != QgsVectorLayerProperties::DB );
|
||||
mSaveToDbWidget->setVisible( type == QgsVectorLayerProperties::DB );
|
||||
mStyleCategoriesListView->setEnabled( type == QgsVectorLayerProperties::QML );
|
||||
mStyleCategoriesListView->setEnabled( type != QgsVectorLayerProperties::SLD );
|
||||
mFileWidget->setFilter( type == QgsVectorLayerProperties::QML ? tr( "QGIS Layer Style File (*.qml)" ) : tr( "SLD File (*.sld)" ) );
|
||||
updateSaveButtonState();
|
||||
} );
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>491</width>
|
||||
<height>535</height>
|
||||
<height>614</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -21,6 +21,36 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="mStyleTypeComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mStylesWidgetLabel">
|
||||
<property name="text">
|
||||
<string>Styles</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QListWidget" name="mStylesWidget"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="mFileLabel">
|
||||
<property name="text">
|
||||
<string>File</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QgsFileWidget" name="mFileWidget"/>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QWidget" name="mSaveToDbWidget" native="true">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
@ -36,6 +66,20 @@
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="2" column="1">
|
||||
<widget class="QgsFileWidget" name="mDbStyleUIFileWidget">
|
||||
<property name="toolTip">
|
||||
<string>Optionally pick an input form for attribute editing (QT Designer UI format), it will be stored in the database</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="mDbStyleUseAsDefault">
|
||||
<property name="text">
|
||||
<string>Use as default style for this layer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="nameLabel">
|
||||
<property name="text">
|
||||
@ -46,9 +90,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="mDbStyleNameEdit"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="descriptionLabel">
|
||||
<property name="text">
|
||||
@ -69,85 +110,30 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QCheckBox" name="mDbStyleUseAsDefault">
|
||||
<property name="text">
|
||||
<string>Use as default style for this layer</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QgsFileWidget" name="mDbStyleUIFileWidget" native="true">
|
||||
<property name="toolTip">
|
||||
<string>Optionally pick an input form for attribute editing (QT Designer UI format), it will be stored in the database</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="mStyleTypeComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QWidget" name="mSaveToFileWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Categories</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>File</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QListView" name="mStyleCategoriesListView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QgsFileWidget" name="mFileWidget" native="true"/>
|
||||
<widget class="QLineEdit" name="mDbStyleNameEdit"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Categories</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QListView" name="mStyleCategoriesListView">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -157,16 +143,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QListWidget" name="mStylesWidget"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="mStylesWidgetLabel">
|
||||
<property name="text">
|
||||
<string>Styles</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
@ -180,7 +156,6 @@
|
||||
<tabstops>
|
||||
<tabstop>mStyleTypeComboBox</tabstop>
|
||||
<tabstop>mStylesWidget</tabstop>
|
||||
<tabstop>mStyleCategoriesListView</tabstop>
|
||||
<tabstop>mDbStyleNameEdit</tabstop>
|
||||
<tabstop>mDbStyleDescriptionEdit</tabstop>
|
||||
<tabstop>mDbStyleUseAsDefault</tabstop>
|
||||
|
Loading…
x
Reference in New Issue
Block a user