Skip to content
Permalink
Browse files

Add missing docs

  • Loading branch information
nyalldawson committed Jun 26, 2017
1 parent 6a54130 commit 2bc8ff322efc2b5c33c74029f593f027f34ede6a
@@ -31,8 +31,6 @@ class QgsLayoutMeasurement
\param units measurement units
%End

~QgsLayoutMeasurement();

double length() const;
%Docstring
Returns the length of the measurement.
@@ -79,36 +77,52 @@ class QgsLayoutMeasurement
%Docstring
:rtype: bool
%End

QgsLayoutMeasurement operator+( const double v ) const;
%Docstring
Adds a scalar value to the measurement.
:rtype: QgsLayoutMeasurement
%End

QgsLayoutMeasurement operator+=( const double v );
%Docstring
Adds a scalar value to the measurement.
:rtype: QgsLayoutMeasurement
%End

QgsLayoutMeasurement operator-( const double v ) const;
%Docstring
Subtracts a scalar value from the measurement.
:rtype: QgsLayoutMeasurement
%End

QgsLayoutMeasurement operator-=( const double v );
%Docstring
Subtracts a scalar value from the measurement.
:rtype: QgsLayoutMeasurement
%End

QgsLayoutMeasurement operator*( const double v ) const;
%Docstring
Multiplies the measurement by a scalar value.
:rtype: QgsLayoutMeasurement
%End

QgsLayoutMeasurement operator*=( const double v );
%Docstring
Multiplies the measurement by a scalar value.
:rtype: QgsLayoutMeasurement
%End

QgsLayoutMeasurement operator/( const double v ) const;
%Docstring
Divides the measurement by a scalar value.
:rtype: QgsLayoutMeasurement
%End

QgsLayoutMeasurement operator/=( const double v );
%Docstring
Divides the measurement by a scalar value.
:rtype: QgsLayoutMeasurement
%End

@@ -28,8 +28,6 @@ class QgsLayoutMeasurementConverter

QgsLayoutMeasurementConverter();

~QgsLayoutMeasurementConverter();

void setDpi( const double dpi );
%Docstring
Sets the dots per inch (``dpi``) for the measurement converter. This is used
@@ -34,9 +34,6 @@ class QgsLayoutPoint
QgsLayoutPoint( const double x, const double y, const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters );
%Docstring
Constructor for QgsLayoutPoint.
\param x x coordinate
\param x y coordinate
\param units units for x and y
%End

explicit QgsLayoutPoint( const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters );
@@ -45,8 +42,6 @@ class QgsLayoutPoint
\param units units for measurement
%End

~QgsLayoutPoint();

void setPoint( const double x, const double y );
%Docstring
Sets new x and y coordinates for the point.
@@ -134,20 +129,28 @@ class QgsLayoutPoint
%Docstring
:rtype: bool
%End

QgsLayoutPoint operator*( const double v ) const;
%Docstring
Multiplies the x and y by a scalar value.
:rtype: QgsLayoutPoint
%End

QgsLayoutPoint operator*=( const double v );
%Docstring
Multiplies the x and y by a scalar value.
:rtype: QgsLayoutPoint
%End

QgsLayoutPoint operator/( const double v ) const;
%Docstring
Divides the x and y by a scalar value.
:rtype: QgsLayoutPoint
%End

QgsLayoutPoint operator/=( const double v );
%Docstring
Divides the x and y by a scalar value.
:rtype: QgsLayoutPoint
%End

@@ -46,8 +46,6 @@ class QgsLayoutSize
\param units units for measurement
%End

~QgsLayoutSize();

void setSize( const double width, const double height );
%Docstring
Sets new ``width`` and ``height`` for the size.
@@ -135,20 +133,28 @@ class QgsLayoutSize
%Docstring
:rtype: bool
%End

QgsLayoutSize operator*( const double v ) const;
%Docstring
Multiplies the width and height by a scalar value.
:rtype: QgsLayoutSize
%End

QgsLayoutSize operator*=( const double v );
%Docstring
Multiplies the width and height by a scalar value.
:rtype: QgsLayoutSize
%End

QgsLayoutSize operator/( const double v ) const;
%Docstring
Divides the width and height by a scalar value.
:rtype: QgsLayoutSize
%End

QgsLayoutSize operator/=( const double v );
%Docstring
Divides the width and height by a scalar value.
:rtype: QgsLayoutSize
%End

@@ -25,10 +25,6 @@ QgsLayoutMeasurement::QgsLayoutMeasurement( const double length, const QgsUnitTy
{
}

QgsLayoutMeasurement::~QgsLayoutMeasurement()
{
}

QString QgsLayoutMeasurement::encodeMeasurement() const
{
return QStringLiteral( "%1,%2" ).arg( mLength ).arg( QgsUnitTypes::encodeUnit( mUnits ) );
@@ -22,7 +22,8 @@

#include "qgsunittypes.h"

/** \ingroup Layout
/**
* \ingroup core
* \class QgsLayoutMeasurement
* \brief This class provides a method of storing measurements for use in QGIS layouts
* using a variety of different measurement units.
@@ -40,8 +41,6 @@ class CORE_EXPORT QgsLayoutMeasurement
*/
explicit QgsLayoutMeasurement( const double length, const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters );

~QgsLayoutMeasurement();

/**
* Returns the length of the measurement.
* \see setLength()
@@ -81,13 +80,45 @@ class CORE_EXPORT QgsLayoutMeasurement

bool operator==( const QgsLayoutMeasurement &other ) const;
bool operator!=( const QgsLayoutMeasurement &other ) const;

/**
* Adds a scalar value to the measurement.
*/
QgsLayoutMeasurement operator+( const double v ) const;

/**
* Adds a scalar value to the measurement.
*/
QgsLayoutMeasurement operator+=( const double v );

/**
* Subtracts a scalar value from the measurement.
*/
QgsLayoutMeasurement operator-( const double v ) const;

/**
* Subtracts a scalar value from the measurement.
*/
QgsLayoutMeasurement operator-=( const double v );

/**
* Multiplies the measurement by a scalar value.
*/
QgsLayoutMeasurement operator*( const double v ) const;

/**
* Multiplies the measurement by a scalar value.
*/
QgsLayoutMeasurement operator*=( const double v );

/**
* Divides the measurement by a scalar value.
*/
QgsLayoutMeasurement operator/( const double v ) const;

/**
* Divides the measurement by a scalar value.
*/
QgsLayoutMeasurement operator/=( const double v );

private:
@@ -23,10 +23,6 @@ QgsLayoutMeasurementConverter::QgsLayoutMeasurementConverter()
{
}

QgsLayoutMeasurementConverter::~QgsLayoutMeasurementConverter()
{
}

QgsLayoutMeasurement QgsLayoutMeasurementConverter::convert( const QgsLayoutMeasurement &measurement, const QgsUnitTypes::LayoutUnit targetUnits ) const
{
if ( measurement.units() == targetUnits )
@@ -28,7 +28,7 @@


/**
* \ingroup Layout
* \ingroup core
* \class QgsLayoutMeasurementConverter
* \brief This class provides a method of converting QgsLayoutMeasurements from
* one unit to another. Conversion to or from pixel units utilizes a specified
@@ -43,8 +43,6 @@ class CORE_EXPORT QgsLayoutMeasurementConverter

QgsLayoutMeasurementConverter();

~QgsLayoutMeasurementConverter();

/**
* Sets the dots per inch (\a dpi) for the measurement converter. This is used
* when converting measurements to and from pixels.
@@ -36,11 +36,6 @@ QgsLayoutPoint::QgsLayoutPoint( const QgsUnitTypes::LayoutUnit units )

}

QgsLayoutPoint::~QgsLayoutPoint()
{

}

bool QgsLayoutPoint::isNull() const
{
return qgsDoubleNear( mX, 0 ) && qgsDoubleNear( mY, 0 );
@@ -22,7 +22,8 @@
#include "qgsunittypes.h"
#include <QPointF>

/** \ingroup Layout
/**
* \ingroup core
* \class QgsLayoutPoint
* \brief This class provides a method of storing points, consisting of an x and y coordinate,
* for use in QGIS layouts. Measurement units are stored alongside the position.
@@ -41,9 +42,6 @@ class CORE_EXPORT QgsLayoutPoint

/**
* Constructor for QgsLayoutPoint.
* \param x x coordinate
* \param x y coordinate
* \param units units for x and y
*/
QgsLayoutPoint( const double x, const double y, const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters );

@@ -53,8 +51,6 @@ class CORE_EXPORT QgsLayoutPoint
*/
explicit QgsLayoutPoint( const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters );

~QgsLayoutPoint();

/**
* Sets new x and y coordinates for the point.
* \see setX()
@@ -132,9 +128,25 @@ class CORE_EXPORT QgsLayoutPoint

bool operator==( const QgsLayoutPoint &other ) const;
bool operator!=( const QgsLayoutPoint &other ) const;

/**
* Multiplies the x and y by a scalar value.
*/
QgsLayoutPoint operator*( const double v ) const;

/**
* Multiplies the x and y by a scalar value.
*/
QgsLayoutPoint operator*=( const double v );

/**
* Divides the x and y by a scalar value.
*/
QgsLayoutPoint operator/( const double v ) const;

/**
* Divides the x and y by a scalar value.
*/
QgsLayoutPoint operator/=( const double v );

private:
@@ -34,10 +34,6 @@ QgsLayoutSize::QgsLayoutSize( const QgsUnitTypes::LayoutUnit units )

}

QgsLayoutSize::~QgsLayoutSize()
{
}

bool QgsLayoutSize::isEmpty() const
{
return qgsDoubleNear( mWidth, 0 ) && qgsDoubleNear( mHeight, 0 );
@@ -24,7 +24,7 @@


/**
* \ingroup Layout
* \ingroup core
* \class QgsLayoutSize
* \brief This class provides a method of storing sizes, consisting of a width and height,
* for use in QGIS layouts. Measurement units are stored alongside the size.
@@ -55,8 +55,6 @@ class CORE_EXPORT QgsLayoutSize
*/
explicit QgsLayoutSize( const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters );

~QgsLayoutSize();

/**
* Sets new \a width and \a height for the size.
* \see setWidth()
@@ -134,9 +132,25 @@ class CORE_EXPORT QgsLayoutSize

bool operator==( const QgsLayoutSize &other ) const;
bool operator!=( const QgsLayoutSize &other ) const;

/**
* Multiplies the width and height by a scalar value.
*/
QgsLayoutSize operator*( const double v ) const;

/**
* Multiplies the width and height by a scalar value.
*/
QgsLayoutSize operator*=( const double v );

/**
* Divides the width and height by a scalar value.
*/
QgsLayoutSize operator/( const double v ) const;

/**
* Divides the width and height by a scalar value.
*/
QgsLayoutSize operator/=( const double v );

private:

0 comments on commit 2bc8ff3

Please sign in to comment.
You can’t perform that action at this time.