QGIS API Documentation  3.2.0-Bonn (bc43194)
Public Types | Static Public Attributes | List of all members
Qgis Class Reference

The Qgis class provides global constants for use throughout the application. More...

#include <qgis.h>

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. More...
 
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. More...
 

Static Public Attributes

static const double DEFAULT_HIGHLIGHT_BUFFER_MM = 0.5
 Default highlight buffer in mm. More...
 
static const QColor DEFAULT_HIGHLIGHT_COLOR = QColor( 255, 0, 0, 128 )
 Default highlight color. More...
 
static const double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM = 1.0
 Default highlight line/stroke minimum width in mm. More...
 
static const float DEFAULT_MAPTOPIXEL_THRESHOLD = 1.0f
 Default threshold between map coordinates and device coordinates for map2pixel simplification. More...
 
static const double DEFAULT_SEARCH_RADIUS_MM = 2.
 Identify search radius in mm. More...
 
static const double DEFAULT_SNAP_TOLERANCE = 12.0
 Default snapping distance tolerance. More...
 
static const QgsTolerance::UnitType DEFAULT_SNAP_UNITS = QgsTolerance::Pixels
 Default snapping distance units. More...
 
static const double DEFAULT_Z_COORDINATE = 0.0
 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. More...
 
static const char * QGIS_DEV_VERSION = QGSVERSION
 The development version. More...
 
static const QString QGIS_RELEASE_NAME
 Release name. More...
 
static const QString QGIS_VERSION
 Version string. More...
 
static const int QGIS_VERSION_INT = VERSION_INT
 Version number used for comparing versions using the "Check QGIS Version" function. More...
 
static const double SCALE_PRECISION = 0.9999999999
 Fudge factor used to compare two scales. More...
 
static const double UI_SCALE_FACTOR = 1
 UI scaling factor. More...
 

Detailed Description

The Qgis class provides global constants for use throughout the application.

Definition at line 57 of file qgis.h.

Member Enumeration Documentation

◆ DataType

Raster data types.

This is modified and extended copy of GDALDataType.

Enumerator
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.

Definition at line 91 of file qgis.h.

◆ MessageLevel

Level for messages This will be used both for message log and message bar in application.

Enumerator
Info 
Warning 
Critical 
Success 
None 

Definition at line 78 of file qgis.h.

Member Data Documentation

◆ DEFAULT_HIGHLIGHT_BUFFER_MM

const double Qgis::DEFAULT_HIGHLIGHT_BUFFER_MM = 0.5
static

Default highlight buffer in mm.

Since
QGIS 2.3

Definition at line 126 of file qgis.h.

◆ DEFAULT_HIGHLIGHT_COLOR

const QColor Qgis::DEFAULT_HIGHLIGHT_COLOR = QColor( 255, 0, 0, 128 )
static

Default highlight color.

The transparency is expected to only be applied to polygon fill. Lines and outlines are rendered opaque.

Since
QGIS 2.3

Definition at line 121 of file qgis.h.

◆ DEFAULT_HIGHLIGHT_MIN_WIDTH_MM

const double Qgis::DEFAULT_HIGHLIGHT_MIN_WIDTH_MM = 1.0
static

Default highlight line/stroke minimum width in mm.

Since
QGIS 2.3

Definition at line 131 of file qgis.h.

◆ DEFAULT_MAPTOPIXEL_THRESHOLD

const float Qgis::DEFAULT_MAPTOPIXEL_THRESHOLD = 1.0f
static

Default threshold between map coordinates and device coordinates for map2pixel simplification.

Definition at line 115 of file qgis.h.

◆ DEFAULT_SEARCH_RADIUS_MM

const double Qgis::DEFAULT_SEARCH_RADIUS_MM = 2.
static

Identify search radius in mm.

Since
QGIS 2.3

Definition at line 112 of file qgis.h.

◆ DEFAULT_SNAP_TOLERANCE

const double Qgis::DEFAULT_SNAP_TOLERANCE = 12.0
static

Default snapping distance tolerance.

Since
QGIS 3.0

Definition at line 157 of file qgis.h.

◆ DEFAULT_SNAP_UNITS

const QgsTolerance::UnitType Qgis::DEFAULT_SNAP_UNITS = QgsTolerance::Pixels
static

Default snapping distance units.

Since
QGIS 3.0

Definition at line 163 of file qgis.h.

◆ DEFAULT_Z_COORDINATE

const double Qgis::DEFAULT_Z_COORDINATE = 0.0
static

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

Definition at line 144 of file qgis.h.

◆ QGIS_DEV_VERSION

const char * Qgis::QGIS_DEV_VERSION = QGSVERSION
static

The development version.

Definition at line 69 of file qgis.h.

◆ QGIS_RELEASE_NAME

const QString Qgis::QGIS_RELEASE_NAME
static

Release name.

Definition at line 67 of file qgis.h.

◆ QGIS_VERSION

const QString Qgis::QGIS_VERSION
static

Version string.

Definition at line 63 of file qgis.h.

◆ QGIS_VERSION_INT

const int Qgis::QGIS_VERSION_INT = VERSION_INT
static

Version number used for comparing versions using the "Check QGIS Version" function.

Definition at line 65 of file qgis.h.

◆ SCALE_PRECISION

const double Qgis::SCALE_PRECISION = 0.9999999999
static

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

Definition at line 138 of file qgis.h.

◆ UI_SCALE_FACTOR

const double Qgis::UI_SCALE_FACTOR = 1
static

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

Definition at line 151 of file qgis.h.


The documentation for this class was generated from the following files: