18 #ifndef QGSUNITTYPES_H 
   19 #define QGSUNITTYPES_H 
   21 #include "qgis_core.h" 
   51     Q_ENUM( SystemOfMeasurement )
 
   80     Q_ENUM( DistanceUnit )
 
  116       VolumeCubicMeters = 0, 
 
  164     Q_ENUM( TemporalUnit )
 
  169       RenderMillimeters = 0, 
 
  183       LayoutMillimeters = 0, 
 
  197       LayoutPaperUnits = 0, 
 
  599     Q_INVOKABLE 
static QString formatDistance( 
double distance, 
int decimals, 
QgsUnitTypes::DistanceUnit unit, 
bool keepBaseUnit = 
false );
 
  612     Q_INVOKABLE 
static QString formatArea( 
double area, 
int decimals, 
QgsUnitTypes::AreaUnit unit, 
bool keepBaseUnit = 
false );
 
Helper functions for various unit types.
 
DistanceUnit
Units of distance.
 
@ DistanceDegrees
Degrees, for planar geographic CRS distance measurements.
 
@ DistanceKilometers
Kilometers.
 
@ DistanceMiles
Terrestrial miles.
 
@ DistanceUnknownUnit
Unknown distance unit.
 
@ DistanceMillimeters
Millimeters.
 
@ DistanceYards
Imperial yards.
 
@ DistanceFeet
Imperial feet.
 
@ DistanceNauticalMiles
Nautical miles.
 
@ DistanceCentimeters
Centimeters.
 
LayoutUnit
Layout measurement units.
 
@ LayoutCentimeters
Centimeters.
 
@ LayoutPicas
Typographic picas.
 
@ LayoutPoints
Typographic points.
 
AngleUnit
Units of angles.
 
@ AngleRadians
Square kilometers.
 
@ AngleMilNATO
Angular mil (NATO definition, 6400 mil = 2PI radians)
 
@ AngleMilliradiansSI
Angular milliradians (SI definition, 1/1000 of radian)
 
@ AngleTurn
Turn/revolutions.
 
@ AngleUnknownUnit
Unknown angle unit.
 
@ AngleMinutesOfArc
Minutes of arc.
 
@ AngleSecondsOfArc
Seconds of arc.
 
SystemOfMeasurement
Systems of unit measurement.
 
@ MetricSystem
International System of Units (SI)
 
@ ImperialSystem
British Imperial.
 
VolumeUnit
Units of volume.
 
@ VolumeCubicYards
Cubic yards.
 
@ VolumeCubicDecimeter
Cubic decimeters.
 
@ VolumeCubicCentimeter
Cubic Centimeters.
 
@ VolumeCubicDegrees
Cubic degrees, for planar geographic CRS volume measurements.
 
@ VolumeCubicFeet
Cubic feet.
 
@ VolumeCubicInch
Cubic inches.
 
@ VolumeUnknownUnit
Unknown volume unit.
 
@ VolumeGallonUS
US Gallons.
 
QList< QgsUnitTypes::RenderUnit > RenderUnitList
List of render units.
 
DistanceUnitType
Types of distance units.
 
@ Geographic
Unit is a geographic (e.g., degree based) unit.
 
@ UnknownType
Unknown unit type.
 
@ TypeTemporal
Temporal unit.
 
@ TypeUnknown
Unknown unit type.
 
@ AreaSquareNauticalMiles
Square nautical miles.
 
@ AreaSquareYards
Square yards.
 
@ AreaSquareFeet
Square feet.
 
@ AreaUnknownUnit
Unknown areal unit.
 
@ AreaSquareMiles
Square miles.
 
@ AreaSquareCentimeters
Square centimeters.
 
@ AreaSquareKilometers
Square kilometers.
 
@ AreaSquareDegrees
Square degrees, for planar geographic CRS area measurements.
 
@ AreaSquareMillimeters
Square millimeters.
 
TemporalUnit
Temporal units.
 
@ TemporalMilliseconds
Milliseconds.
 
@ TemporalIrregularStep
Special "irregular step" time unit, used for temporal data which uses irregular, non-real-world unit ...
 
@ TemporalDecades
Decades.
 
@ TemporalCenturies
Centuries.
 
@ TemporalSeconds
Seconds.
 
@ TemporalMinutes
Minutes.
 
RenderUnit
Rendering size units.
 
@ RenderUnknownUnit
Mixed or unknown units.
 
@ RenderMetersInMapUnits
Meters value as Map units.
 
@ RenderPercentage
Percentage of another measurement (e.g., canvas size, feature size)
 
@ RenderPoints
Points (e.g., for font sizes)
 
@ RenderMapUnits
Map units.
 
LayoutUnitType
Types of layout units.
 
double ANALYSIS_EXPORT angle(QgsPoint *p1, QgsPoint *p2, QgsPoint *p3, QgsPoint *p4)
Calculates the angle between two segments (in 2 dimension, z-values are ignored)
 
A combination of area value and unit.
 
double value
The value part of the distance.
 
QgsUnitTypes::AreaUnit unit
The value part of the distance.
 
A combination of distance value and unit.
 
QgsUnitTypes::DistanceUnit unit
The value part of the distance.
 
double value
The value part of the distance.