QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
32 bool automatic = project->
readBoolEntry( QStringLiteral(
"PositionPrecision" ), QStringLiteral(
"/Automatic" ) );
37 QString format = project->
readEntry( QStringLiteral(
"PositionPrecision" ), QStringLiteral(
"/DegreeFormat" ), QStringLiteral(
"MU" ) );
38 bool formatGeographic = ( format == QLatin1String(
"DM" ) || format == QLatin1String(
"DMS" ) || format == QLatin1String(
"D" ) );
50 dp =
static_cast<int>( std::ceil( -1.0 * std::log10( mapUnitsPerPixel ) ) );
54 if ( format == QLatin1String(
"D" ) )
61 dp = project->
readNumEntry( QStringLiteral(
"PositionPrecision" ), QStringLiteral(
"/DecimalPlaces" ) );
75 QString format = project->
readEntry( QStringLiteral(
"PositionPrecision" ), QStringLiteral(
"/DegreeFormat" ), QStringLiteral(
"MU" ) );
78 if ( format == QLatin1String(
"DM" ) || format == QLatin1String(
"DMS" ) || format == QLatin1String(
"D" ) )
87 geo = ct.transform( point );
95 if ( format == QLatin1String(
"DM" ) )
97 else if ( format == QLatin1String(
"DMS" ) )
static QgsProject * instance()
Returns the QgsProject singleton instance.
QString readEntry(const QString &scope, const QString &key, const QString &def=QString(), bool *ok=nullptr) const
bool readBoolEntry(const QString &scope, const QString &key, bool def=false, bool *ok=nullptr) const
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
bool isValid() const
Returns whether this CRS is correctly initialized and usable.
int readNumEntry(const QString &scope, const QString &key, int def=0, bool *ok=nullptr) const