mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Rename methods
This commit is contained in:
parent
76b2b8eed3
commit
456ca000a7
@ -785,7 +785,7 @@ Returns the number of registered layers.
|
||||
:rtype: QgsCoordinateReferenceSystem
|
||||
%End
|
||||
|
||||
void setTrust( bool trust );
|
||||
void setTrustLayerMetadata( bool trust );
|
||||
%Docstring
|
||||
Sets the trust option allowing to indicate if the extent has to be
|
||||
read from the XML document when data source has no metadata or if the
|
||||
@ -798,7 +798,7 @@ Returns the number of registered layers.
|
||||
.. versionadded:: 3.0
|
||||
%End
|
||||
|
||||
bool trust() const;
|
||||
bool trustLayerMetadata() const;
|
||||
%Docstring
|
||||
Returns true if the trust option is activated, false otherwise. This
|
||||
option allows indicateing if the extent has to be read from the XML
|
||||
|
@ -708,7 +708,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas *mapCanvas, QWidget *pa
|
||||
|
||||
mAutoTransaction->setChecked( QgsProject::instance()->autoTransaction() );
|
||||
mEvaluateDefaultValues->setChecked( QgsProject::instance()->evaluateDefaultValues() );
|
||||
mTrustProjectCheckBox->setChecked( QgsProject::instance()->trust() );
|
||||
mTrustProjectCheckBox->setChecked( QgsProject::instance()->trustLayerMetadata() );
|
||||
|
||||
// Variables editor
|
||||
mVariableEditor->context()->appendScope( QgsExpressionContextUtils::globalScope() );
|
||||
@ -765,7 +765,7 @@ void QgsProjectProperties::apply()
|
||||
QgsProject::instance()->setTitle( title() );
|
||||
QgsProject::instance()->setAutoTransaction( mAutoTransaction->isChecked() );
|
||||
QgsProject::instance()->setEvaluateDefaultValues( mEvaluateDefaultValues->isChecked() );
|
||||
QgsProject::instance()->setTrust( mTrustProjectCheckBox->isChecked() );
|
||||
QgsProject::instance()->setTrustLayerMetadata( mTrustProjectCheckBox->isChecked() );
|
||||
|
||||
// set the mouse display precision method and the
|
||||
// number of decimal places for the manual option
|
||||
|
@ -480,7 +480,7 @@ void QgsProject::clear()
|
||||
mAutoTransaction = false;
|
||||
mEvaluateDefaultValues = false;
|
||||
mDirty = false;
|
||||
mTrust = false;
|
||||
mTrustLayerMetadata = false;
|
||||
mCustomVariables.clear();
|
||||
|
||||
mEmbeddedLayers.clear();
|
||||
@ -722,7 +722,7 @@ bool QgsProject::addLayer( const QDomElement &layerElem, QList<QDomNode> &broken
|
||||
// apply specific settings to vector layer
|
||||
if ( QgsVectorLayer *vl = qobject_cast<QgsVectorLayer *>( mapLayer ) )
|
||||
{
|
||||
vl->setReadExtentFromXml( mTrust );
|
||||
vl->setReadExtentFromXml( mTrustLayerMetadata );
|
||||
}
|
||||
}
|
||||
else if ( type == QLatin1String( "raster" ) )
|
||||
@ -904,7 +904,7 @@ bool QgsProject::readProjectFile( const QString &filename )
|
||||
{
|
||||
QDomElement trustElement = nl.at( 0 ).toElement();
|
||||
if ( trustElement.attribute( QStringLiteral( "active" ), QStringLiteral( "0" ) ).toInt() == 1 )
|
||||
mTrust = true;
|
||||
mTrustLayerMetadata = true;
|
||||
}
|
||||
|
||||
// read the layer tree from project file
|
||||
@ -1312,7 +1312,7 @@ bool QgsProject::writeProjectFile( const QString &filename )
|
||||
qgisNode.appendChild( evaluateDefaultValuesNode );
|
||||
|
||||
QDomElement trustNode = doc->createElement( QStringLiteral( "trust" ) );
|
||||
trustNode.setAttribute( QStringLiteral( "active" ), mTrust ? "1" : "0" );
|
||||
trustNode.setAttribute( QStringLiteral( "active" ), mTrustLayerMetadata ? "1" : "0" );
|
||||
qgisNode.appendChild( trustNode );
|
||||
|
||||
QDomText titleText = doc->createTextNode( title() ); // XXX why have title TWICE?
|
||||
@ -2280,9 +2280,9 @@ QgsCoordinateReferenceSystem QgsProject::defaultCrsForNewLayers() const
|
||||
return defaultCrs;
|
||||
}
|
||||
|
||||
void QgsProject::setTrust( bool trust )
|
||||
void QgsProject::setTrustLayerMetadata( bool trust )
|
||||
{
|
||||
mTrust = trust;
|
||||
mTrustLayerMetadata = trust;
|
||||
|
||||
Q_FOREACH ( QgsMapLayer *layer, mapLayers().values() )
|
||||
{
|
||||
|
@ -766,7 +766,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
*
|
||||
* \since QGIS 3.0
|
||||
*/
|
||||
void setTrust( bool trust );
|
||||
void setTrustLayerMetadata( bool trust );
|
||||
|
||||
/**
|
||||
* Returns true if the trust option is activated, false otherwise. This
|
||||
@ -778,7 +778,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
*
|
||||
* \since QGIS 3.0
|
||||
*/
|
||||
bool trust() const { return mTrust; }
|
||||
bool trustLayerMetadata() const { return mTrustLayerMetadata; }
|
||||
|
||||
signals:
|
||||
//! emitted when project is being read
|
||||
@ -1107,7 +1107,7 @@ class CORE_EXPORT QgsProject : public QObject, public QgsExpressionContextGenera
|
||||
bool mEvaluateDefaultValues; // evaluate default values immediately
|
||||
QgsCoordinateReferenceSystem mCrs;
|
||||
bool mDirty; // project has been modified since it has been read or saved
|
||||
bool mTrust = false;
|
||||
bool mTrustLayerMetadata = false;
|
||||
};
|
||||
|
||||
/** Return the version string found in the given DOM document
|
||||
|
Loading…
x
Reference in New Issue
Block a user