Navigation Menu

Skip to content

Commit

Permalink
Fix Q_INVOKABLE in QgsUnitTypes class
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed May 28, 2021
1 parent c29288f commit 50faa7b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/core/qgsunittypes.h
Expand Up @@ -320,15 +320,15 @@ class CORE_EXPORT QgsUnitTypes
/**
* Returns the type for an areal unit.
*/
Q_INVOKABLE static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::AreaUnit unit );
static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::AreaUnit unit );

/**
* Encodes an areal unit to a string.
* \param unit unit to encode
* \returns encoded string
* \see decodeAreaUnit()
*/
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::AreaUnit unit );
static QString encodeUnit( QgsUnitTypes::AreaUnit unit );

/**
* Decodes an areal unit from a string.
Expand Down Expand Up @@ -370,7 +370,7 @@ class CORE_EXPORT QgsUnitTypes
* \param toUnit area unit to convert to
* \returns multiplication factor to convert between units
*/
Q_INVOKABLE static double fromUnitToUnitFactor( QgsUnitTypes::AreaUnit fromUnit, QgsUnitTypes::AreaUnit toUnit );
static double fromUnitToUnitFactor( QgsUnitTypes::AreaUnit fromUnit, QgsUnitTypes::AreaUnit toUnit );

/**
* Converts a distance unit to its corresponding area unit, e.g., meters to square meters
Expand All @@ -395,7 +395,7 @@ class CORE_EXPORT QgsUnitTypes
* \see decodeTemporalUnit()
* \since QGIS 3.14
*/
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::TemporalUnit unit );
static QString encodeUnit( QgsUnitTypes::TemporalUnit unit );

/**
* Decodes a temporal unit from a \a string.
Expand Down Expand Up @@ -443,23 +443,23 @@ class CORE_EXPORT QgsUnitTypes
* \returns multiplication factor to convert between units
* \since QGIS 3.14
*/
Q_INVOKABLE static double fromUnitToUnitFactor( QgsUnitTypes::TemporalUnit fromUnit, QgsUnitTypes::TemporalUnit toUnit );
static double fromUnitToUnitFactor( QgsUnitTypes::TemporalUnit fromUnit, QgsUnitTypes::TemporalUnit toUnit );

// VOLUME UNITS

/**
* Returns the type for an volume unit.
* \since QGIS 3.10
*/
Q_INVOKABLE static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::VolumeUnit unit );
static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::VolumeUnit unit );

/**
* Encodes a volume \a unit to a string.
* \returns encoded string
* \see decodeVolumeUnit()
* \since QGIS 3.10
*/
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::VolumeUnit unit );
static QString encodeUnit( QgsUnitTypes::VolumeUnit unit );

/**
* Decodes a volume unit from a \a string.
Expand Down Expand Up @@ -503,7 +503,7 @@ class CORE_EXPORT QgsUnitTypes
* \returns multiplication factor to convert between units
* \since QGIS 3.10
*/
Q_INVOKABLE static double fromUnitToUnitFactor( QgsUnitTypes::VolumeUnit fromUnit, QgsUnitTypes::VolumeUnit toUnit );
static double fromUnitToUnitFactor( QgsUnitTypes::VolumeUnit fromUnit, QgsUnitTypes::VolumeUnit toUnit );

/**
* Converts a distance unit to its corresponding volume unit, e.g., meters to cubic meters
Expand All @@ -529,7 +529,7 @@ class CORE_EXPORT QgsUnitTypes
* \returns encoded string
* \see decodeAngleUnit()
*/
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::AngleUnit unit );
static QString encodeUnit( QgsUnitTypes::AngleUnit unit );

/**
* Decodes an angular unit from a string.
Expand All @@ -552,7 +552,7 @@ class CORE_EXPORT QgsUnitTypes
* \param toUnit angle unit to convert to
* \returns multiplication factor to convert between units
*/
Q_INVOKABLE static double fromUnitToUnitFactor( QgsUnitTypes::AngleUnit fromUnit, QgsUnitTypes::AngleUnit toUnit );
static double fromUnitToUnitFactor( QgsUnitTypes::AngleUnit fromUnit, QgsUnitTypes::AngleUnit toUnit );

/**
* Returns an angle formatted as a friendly string.
Expand Down Expand Up @@ -620,7 +620,7 @@ class CORE_EXPORT QgsUnitTypes
* \returns encoded string
* \see decodeRenderUnit()
*/
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::RenderUnit unit );
static QString encodeUnit( QgsUnitTypes::RenderUnit unit );

/**
* Decodes a render unit from a string.
Expand Down Expand Up @@ -656,7 +656,7 @@ class CORE_EXPORT QgsUnitTypes
* \see decodeLayoutUnit()
* \since QGIS 3.0
*/
Q_INVOKABLE static QString encodeUnit( QgsUnitTypes::LayoutUnit unit );
static QString encodeUnit( QgsUnitTypes::LayoutUnit unit );

/**
* Decodes a layout unit from a string.
Expand Down

0 comments on commit 50faa7b

Please sign in to comment.