Skip to content
Permalink
Browse files

fixes: HIG guidelines, sipify, initialize, doxygen warnings

fix doxygen warning + docs

sipify

fix doxygen warning

initialize
  • Loading branch information
3nids authored and nyalldawson committed Sep 14, 2018
1 parent c776746 commit 4cdf0a2851b763254098d322f4c8ff8a62910616
@@ -793,7 +793,7 @@ record in the users style table in their personal qgis.db)
.. seealso:: :py:func:`also`
%End

virtual QString loadNamedStyle( const QString &uri, bool &resultFlag /Out/, StyleCategories categories = QgsMapLayer::AllStyleCategories );
virtual QString loadNamedStyle( const QString &uri, bool &resultFlag /Out/, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
%Docstring
Retrieve a named style for this layer if one
exists (either as a .qml file on disk or as a
@@ -806,6 +806,7 @@ record in the users style table in their personal qgis.db)
key matches the URI.
:param resultFlag: a reference to a flag that will be set to false if
we did not manage to load the default style.
:param categories: the style categories to be loaded.

:return: a QString with any status messages

@@ -821,7 +821,7 @@ Delete a style from the database
%End

virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/, bool loadFromLocalDb,
StyleCategories categories = QgsMapLayer::AllStyleCategories );
QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
%Docstring
Load a named style from file/local db/datasource db

@@ -50,7 +50,7 @@ class APP_EXPORT QgsVectorLayerLoadStyleDialog : public QDialog, private Ui::Qgs
void deleteStyleFromDB();

private:
QgsVectorLayer *mLayer;
QgsVectorLayer *mLayer = nullptr;
QString mSelectedStyleId;
QString mSelectedStyleName;
int mSectionLimit = 0;
@@ -48,10 +48,10 @@ QgsVectorLayerSaveStyleDialog::QgsVectorLayerSaveStyleDialog( QgsVectorLayer *la
mFileWidget->setFilter( type == QgsVectorLayerProperties::QML ? tr( "QGIS Layer Style File (*.qml)" ) : tr( "SLD File (*.sld)" ) );
updateSaveButtonState();
} );
mStyleTypeComboBox->addItem( tr( "as QGIS QML style file" ), QgsVectorLayerProperties::QML );
mStyleTypeComboBox->addItem( tr( "as SLD style file" ), QgsVectorLayerProperties::SLD );
mStyleTypeComboBox->addItem( tr( "As QGIS QML style file" ), QgsVectorLayerProperties::QML );
mStyleTypeComboBox->addItem( tr( "As SLD style file" ), QgsVectorLayerProperties::SLD );
if ( mLayer->dataProvider()->isSaveAndLoadStyleToDatabaseSupported() )
mStyleTypeComboBox->addItem( tr( "in database (%1)" ).arg( providerName ), QgsVectorLayerProperties::DB );
mStyleTypeComboBox->addItem( tr( "In database (%1)" ).arg( providerName ), QgsVectorLayerProperties::DB );

// Save to DB setup
connect( mDbStyleNameEdit, &QLineEdit::textChanged, this, &QgsVectorLayerSaveStyleDialog::updateSaveButtonState );
@@ -56,7 +56,7 @@ class QgsVectorLayerSaveStyleDialog : public QDialog, private Ui::QgsVectorLayer
void readUiFileContent( const QString &filePath );

private:
QgsVectorLayer *mLayer;
QgsVectorLayer *mLayer = nullptr;;
QString mUiFileContent;
};

@@ -975,7 +975,7 @@ bool QgsMapLayer::loadNamedPropertyFromDatabase( const QString &db, const QStrin
}


QString QgsMapLayer::loadNamedStyle( const QString &uri, bool &resultFlag, StyleCategories categories )
QString QgsMapLayer::loadNamedStyle( const QString &uri, bool &resultFlag, QgsMapLayer::StyleCategories categories )
{
return loadNamedProperty( uri, PropertyType::Style, resultFlag, categories );
}
@@ -769,10 +769,11 @@ class CORE_EXPORT QgsMapLayer : public QObject
* key matches the URI.
* \param resultFlag a reference to a flag that will be set to false if
* we did not manage to load the default style.
* \param categories the style categories to be loaded.
* \returns a QString with any status messages
* \see also loadDefaultStyle ();
*/
virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, StyleCategories categories = QgsMapLayer::AllStyleCategories );
virtual QString loadNamedStyle( const QString &uri, bool &resultFlag SIP_OUT, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );

/**
* Retrieve a named style for this layer from a sqlite database.
@@ -827,7 +827,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* \param categories the style categories to be loaded.
*/
virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT, bool loadFromLocalDb,
StyleCategories categories = QgsMapLayer::AllStyleCategories );
QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );

/**
* Calls loadNamedStyle( theURI, resultFlag, false );

0 comments on commit 4cdf0a2

Please sign in to comment.
You can’t perform that action at this time.