mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Fix this and that
This commit is contained in:
parent
abf9880182
commit
d26375abba
@ -32,20 +32,36 @@ The Qgis class provides global constants for use throughout the application.
|
||||
static const QMetaObject staticMetaObject;
|
||||
|
||||
public:
|
||||
|
||||
static QString version();
|
||||
%Docstring
|
||||
Version string
|
||||
Version string.
|
||||
|
||||
.. versionadded:: 3.12
|
||||
%End
|
||||
|
||||
static int versionInt();
|
||||
%Docstring
|
||||
Version number used for comparing versions using the "Check QGIS Version" function
|
||||
|
||||
.. versionadded:: 3.12
|
||||
%End
|
||||
|
||||
static QString releaseName();
|
||||
%Docstring
|
||||
Release name
|
||||
|
||||
.. versionadded:: 3.12
|
||||
%End
|
||||
|
||||
static const char *QGIS_DEV_VERSION;
|
||||
|
||||
static QString devVersion();
|
||||
%Docstring
|
||||
The development version
|
||||
|
||||
.. versionadded:: 3.12
|
||||
%End
|
||||
|
||||
|
||||
enum MessageLevel
|
||||
@ -103,6 +119,13 @@ Release name
|
||||
static const double DEFAULT_SNAP_TOLERANCE;
|
||||
|
||||
static const QgsTolerance::UnitType DEFAULT_SNAP_UNITS;
|
||||
|
||||
static QString defaultProjectScales();
|
||||
%Docstring
|
||||
A string with default project scales.
|
||||
|
||||
.. versionadded:: 3.12
|
||||
%End
|
||||
};
|
||||
|
||||
|
||||
@ -240,28 +263,27 @@ QString qgsVsiPrefix( const QString &path );
|
||||
|
||||
|
||||
|
||||
QString geoWkt();
|
||||
const QLatin1String geoWkt();
|
||||
%Docstring
|
||||
Wkt string that represents a geographic coord sys
|
||||
\since QGIS GEOWkt
|
||||
%End
|
||||
QString projectScales();
|
||||
|
||||
QString geoProj4();
|
||||
const QLatin1String geoProj4();
|
||||
%Docstring
|
||||
PROJ4 string that represents a geographic coord sys
|
||||
%End
|
||||
const long GEOSRID;
|
||||
const long GEOCRS_ID;
|
||||
const long GEO_EPSG_CRS_ID;
|
||||
QString geoEpsgCrsAuthId();
|
||||
const QLatin1String geoEpsgCrsAuthId();
|
||||
%Docstring
|
||||
Geographic coord sys from EPSG authority
|
||||
%End
|
||||
|
||||
const int USER_CRS_START_ID;
|
||||
|
||||
QString geoNone();
|
||||
const QLatin1String geoNone();
|
||||
%Docstring
|
||||
Constant that holds the string representation for "No ellips/No CRS"
|
||||
%End
|
||||
|
@ -13,7 +13,7 @@ sys.path.append(
|
||||
cpp = open(sys.argv[1], "w", encoding="utf-8")
|
||||
cpp.write(
|
||||
"#include \"qgsexpression.h\"\n"
|
||||
"#include \"qgsexpressionprivate.h\"\n"
|
||||
"#include \"qgsexpression_p.h\"\n"
|
||||
"\n"
|
||||
"void QgsExpression::initFunctionHelp()\n"
|
||||
"{\n"
|
||||
|
@ -15,7 +15,6 @@
|
||||
|
||||
#include "qgsexpression.h"
|
||||
#include "qgsexpressionfunction.h"
|
||||
#include "qgsexpressionprivate.h"
|
||||
#include "qgsexpressionnodeimpl.h"
|
||||
#include "qgsfeaturerequest.h"
|
||||
#include "qgscolorramp.h"
|
||||
|
@ -267,24 +267,24 @@ bool qgsVariantEqual( const QVariant &lhs, const QVariant &rhs )
|
||||
return ( lhs.isNull() == rhs.isNull() && lhs == rhs ) || ( lhs.isNull() && rhs.isNull() && lhs.isValid() && rhs.isValid() );
|
||||
}
|
||||
|
||||
QString geoNone()
|
||||
constexpr QLatin1String geoNone()
|
||||
{
|
||||
return QStringLiteral( "NONE" );
|
||||
return QLatin1String( "NONE" );
|
||||
}
|
||||
|
||||
QString geoEpsgCrsAuthId()
|
||||
constexpr QLatin1String geoEpsgCrsAuthId()
|
||||
{
|
||||
return QStringLiteral( "EPSG:4326" );
|
||||
return QLatin1String( "EPSG:4326" );
|
||||
}
|
||||
|
||||
QString geoProj4()
|
||||
constexpr QLatin1String geoProj4()
|
||||
{
|
||||
return QStringLiteral( "+proj=longlat +datum=WGS84 +no_defs" );
|
||||
return QLatin1String( "+proj=longlat +datum=WGS84 +no_defs" );
|
||||
}
|
||||
|
||||
QString geoWkt()
|
||||
constexpr QLatin1String geoWkt()
|
||||
{
|
||||
return QStringLiteral(
|
||||
return QLatin1String(
|
||||
"GEOGCS[\"WGS 84\", "
|
||||
" DATUM[\"WGS_1984\", "
|
||||
" SPHEROID[\"WGS 84\",6378137,298.257223563, "
|
||||
@ -299,7 +299,7 @@ QString geoWkt()
|
||||
);
|
||||
}
|
||||
|
||||
QString projectScales()
|
||||
QString Qgis::defaultProjectScales()
|
||||
{
|
||||
return QStringLiteral( "1:1000000,1:500000,1:250000,1:100000,1:50000,1:25000,"
|
||||
"1:10000,1:5000,1:2500,1:1000,1:500" );
|
||||
|
@ -46,16 +46,36 @@ class CORE_EXPORT Qgis
|
||||
{
|
||||
Q_GADGET
|
||||
public:
|
||||
// Version constants
|
||||
//
|
||||
//! Version string
|
||||
|
||||
/**
|
||||
* Version string.
|
||||
*
|
||||
* \since QGIS 3.12
|
||||
*/
|
||||
static QString version();
|
||||
//! Version number used for comparing versions using the "Check QGIS Version" function
|
||||
|
||||
/**
|
||||
* Version number used for comparing versions using the "Check QGIS Version" function
|
||||
*
|
||||
* \since QGIS 3.12
|
||||
*/
|
||||
static int versionInt();
|
||||
//! Release name
|
||||
|
||||
/**
|
||||
* Release name
|
||||
*
|
||||
* \since QGIS 3.12
|
||||
*/
|
||||
static QString releaseName();
|
||||
|
||||
//! The development version
|
||||
static const char *QGIS_DEV_VERSION;
|
||||
|
||||
/**
|
||||
* The development version
|
||||
*
|
||||
* \since QGIS 3.12
|
||||
*/
|
||||
static QString devVersion();
|
||||
|
||||
// Enumerations
|
||||
@ -112,7 +132,8 @@ class CORE_EXPORT Qgis
|
||||
|
||||
/**
|
||||
* Identify search radius in mm
|
||||
* \since QGIS 2.3 */
|
||||
* \since QGIS 2.3
|
||||
*/
|
||||
static const double DEFAULT_SEARCH_RADIUS_MM;
|
||||
|
||||
//! Default threshold between map coordinates and device coordinates for map2pixel simplification
|
||||
@ -120,51 +141,64 @@ class CORE_EXPORT Qgis
|
||||
|
||||
/**
|
||||
* Default highlight color. The transparency is expected to only be applied to polygon
|
||||
* fill. Lines and outlines are rendered opaque.
|
||||
* \since QGIS 2.3 */
|
||||
* fill. Lines and outlines are rendered opaque.
|
||||
*
|
||||
* \since QGIS 2.3
|
||||
*/
|
||||
static const QColor DEFAULT_HIGHLIGHT_COLOR;
|
||||
|
||||
/**
|
||||
* Default highlight buffer in mm.
|
||||
* \since QGIS 2.3 */
|
||||
* \since QGIS 2.3
|
||||
*/
|
||||
static const double DEFAULT_HIGHLIGHT_BUFFER_MM;
|
||||
|
||||
/**
|
||||
* Default highlight line/stroke minimum width in mm.
|
||||
* \since QGIS 2.3 */
|
||||
* \since QGIS 2.3
|
||||
*/
|
||||
static const double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM;
|
||||
|
||||
/**
|
||||
* Fudge factor used to compare two scales. The code is often going from scale to scale
|
||||
* denominator. So it looses precision and, when a limit is inclusive, can lead to errors.
|
||||
* To avoid that, use this factor instead of using <= or >=.
|
||||
* \since QGIS 2.15*/
|
||||
* \since QGIS 2.15
|
||||
*/
|
||||
static const double SCALE_PRECISION;
|
||||
|
||||
/**
|
||||
* Default Z coordinate value for 2.5d geometry
|
||||
* This value have to be assigned to the Z coordinate for the new 2.5d geometry vertex.
|
||||
* \since QGIS 3.0 */
|
||||
* \since QGIS 3.0
|
||||
*/
|
||||
static const double DEFAULT_Z_COORDINATE;
|
||||
|
||||
/**
|
||||
* UI scaling factor. This should be applied to all widget sizes obtained from font metrics,
|
||||
* to account for differences in the default font sizes across different platforms.
|
||||
* \since QGIS 3.0
|
||||
*/
|
||||
*/
|
||||
static const double UI_SCALE_FACTOR;
|
||||
|
||||
/**
|
||||
* Default snapping distance tolerance.
|
||||
* \since QGIS 3.0
|
||||
*/
|
||||
*/
|
||||
static const double DEFAULT_SNAP_TOLERANCE;
|
||||
|
||||
/**
|
||||
* Default snapping distance units.
|
||||
* \since QGIS 3.0
|
||||
*/
|
||||
*/
|
||||
static const QgsTolerance::UnitType DEFAULT_SNAP_UNITS;
|
||||
|
||||
/**
|
||||
* A string with default project scales.
|
||||
*
|
||||
* \since QGIS 3.12
|
||||
*/
|
||||
static QString defaultProjectScales();
|
||||
};
|
||||
|
||||
// hack to workaround warnings when casting void pointers
|
||||
@ -565,11 +599,10 @@ void CORE_EXPORT qgsFree( void *ptr ) SIP_SKIP;
|
||||
* Wkt string that represents a geographic coord sys
|
||||
* \since QGIS GEOWkt
|
||||
*/
|
||||
QString CORE_EXPORT geoWkt();
|
||||
QString CORE_EXPORT projectScales();
|
||||
constexpr QLatin1String CORE_EXPORT geoWkt();
|
||||
|
||||
//! PROJ4 string that represents a geographic coord sys
|
||||
QString CORE_EXPORT geoProj4();
|
||||
constexpr QLatin1String CORE_EXPORT geoProj4();
|
||||
//! Magic number for a geographic coord sys in POSTGIS SRID
|
||||
const long GEOSRID = 4326;
|
||||
//! Magic number for a geographic coord sys in QGIS srs.db tbl_srs.srs_id
|
||||
@ -577,7 +610,7 @@ const long GEOCRS_ID = 3452;
|
||||
//! Magic number for a geographic coord sys in EpsgCrsId ID format
|
||||
const long GEO_EPSG_CRS_ID = 4326;
|
||||
//! Geographic coord sys from EPSG authority
|
||||
QString CORE_EXPORT geoEpsgCrsAuthId();
|
||||
constexpr QLatin1String CORE_EXPORT geoEpsgCrsAuthId();
|
||||
|
||||
/**
|
||||
* Magick number that determines whether a projection crsid is a system (srs.db)
|
||||
@ -585,7 +618,7 @@ QString CORE_EXPORT geoEpsgCrsAuthId();
|
||||
const int USER_CRS_START_ID = 100000;
|
||||
|
||||
//! Constant that holds the string representation for "No ellips/No CRS"
|
||||
QString CORE_EXPORT geoNone();
|
||||
constexpr QLatin1String CORE_EXPORT geoNone();
|
||||
|
||||
//
|
||||
// Constants for point symbols
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "qgsexpression.h"
|
||||
#include "qgsexpressionnodeimpl.h"
|
||||
#include "qgsexpressionfunction.h"
|
||||
#include "qgsexpressionprivate.h"
|
||||
#include "qgsexpression_p.h"
|
||||
#include "qgsgeometry.h"
|
||||
#include "qgswkbptr.h"
|
||||
#include "qgscoordinatereferencesystem.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user