Qgis class
The Qgis class provides global constants for use throughout the application.
Contents
- Reference
Public types
- enum DataType { UnknownDataType = 0, Byte = 1, UInt16 = 2, Int16 = 3, UInt32 = 4, Int32 = 5, Float32 = 6, Float64 = 7, CInt16 = 8, CInt32 = 9, CFloat32 = 10, CFloat64 = 11, ARGB32 = 12, ARGB32_Premultiplied = 13 }
- Raster data types.
- enum MessageLevel { Info = 0, Warning = 1, Critical = 2, Success = 3, None = 4 }
- Level for messages This will be used both for message log and message bar in application.
Public static variables
- static const double DEFAULT_HIGHLIGHT_BUFFER_MM
- Default highlight buffer in mm.
- static const QColor DEFAULT_HIGHLIGHT_COLOR
- Default highlight color.
- static const double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM
- Default highlight line/stroke minimum width in mm.
- static const float DEFAULT_MAPTOPIXEL_THRESHOLD
- Default threshold between map coordinates and device coordinates for map2pixel simplification.
- static const double DEFAULT_SEARCH_RADIUS_MM
- Identify search radius in mm.
- static const double DEFAULT_SNAP_TOLERANCE
- Default snapping distance tolerance.
-
static const QgsTolerance::
UnitType DEFAULT_SNAP_UNITS - Default snapping distance units.
- static const double DEFAULT_Z_COORDINATE
- 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.
- static const char* QGIS_DEV_VERSION
- The development version.
- static const QString QGIS_RELEASE_NAME
- Release name.
- static const QString QGIS_VERSION
- Version string.
- static const int QGIS_VERSION_INT
- Version number used for comparing versions using the "Check QGIS Version" function.
- static const double SCALE_PRECISION
- Fudge factor used to compare two scales.
- static const double UI_SCALE_FACTOR
- UI scaling factor.
Enum documentation
enum Qgis:: DataType
Raster data types.
This is modified and extended copy of GDALDataType.
| Enumerators | |
|---|---|
| UnknownDataType |
Unknown or unspecified type. |
| Byte |
Eight bit unsigned integer (quint8) |
| UInt16 |
Sixteen bit unsigned integer (quint16) |
| Int16 |
Sixteen bit signed integer (qint16) |
| UInt32 |
Thirty two bit unsigned integer (quint32) |
| Int32 |
Thirty two bit signed integer (qint32) |
| Float32 |
Thirty two bit floating point (float) |
| Float64 |
Sixty four bit floating point (double) |
| CInt16 |
Complex Int16. |
| CInt32 |
Complex Int32. |
| CFloat32 |
Complex Float32. |
| CFloat64 |
Complex Float64. |
| ARGB32 |
Color, alpha, red, green, blue, 4 bytes the same as QImage::Format_ARGB32. |
| ARGB32_Premultiplied |
Color, alpha, red, green, blue, 4 bytes the same as QImage::Format_ARGB32_Premultiplied. |
Variable documentation
static const double Qgis:: DEFAULT_HIGHLIGHT_BUFFER_MM
Default highlight buffer in mm.
static const QColor Qgis:: DEFAULT_HIGHLIGHT_COLOR
Default highlight color.
The transparency is expected to only be applied to polygon fill. Lines and outlines are rendered opaque.
static const double Qgis:: DEFAULT_HIGHLIGHT_MIN_WIDTH_MM
Default highlight line/stroke minimum width in mm.
static const double Qgis:: DEFAULT_SEARCH_RADIUS_MM
Identify search radius in mm.
static const double Qgis:: DEFAULT_SNAP_TOLERANCE
Default snapping distance tolerance.
static const QgsTolerance:: UnitType Qgis:: DEFAULT_SNAP_UNITS
Default snapping distance units.
static const double Qgis:: DEFAULT_Z_COORDINATE
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.
static const double Qgis:: SCALE_PRECISION
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 >=.
static const double Qgis:: UI_SCALE_FACTOR
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.