Skip to content

Commit 2bc8ff3

Browse files
committedJun 26, 2017
Add missing docs
1 parent 6a54130 commit 2bc8ff3

12 files changed

+102
-43
lines changed
 

‎python/core/layout/qgslayoutmeasurement.sip

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ class QgsLayoutMeasurement
3131
\param units measurement units
3232
%End
3333

34-
~QgsLayoutMeasurement();
35-
3634
double length() const;
3735
%Docstring
3836
Returns the length of the measurement.
@@ -79,36 +77,52 @@ class QgsLayoutMeasurement
7977
%Docstring
8078
:rtype: bool
8179
%End
80+
8281
QgsLayoutMeasurement operator+( const double v ) const;
8382
%Docstring
83+
Adds a scalar value to the measurement.
8484
:rtype: QgsLayoutMeasurement
8585
%End
86+
8687
QgsLayoutMeasurement operator+=( const double v );
8788
%Docstring
89+
Adds a scalar value to the measurement.
8890
:rtype: QgsLayoutMeasurement
8991
%End
92+
9093
QgsLayoutMeasurement operator-( const double v ) const;
9194
%Docstring
95+
Subtracts a scalar value from the measurement.
9296
:rtype: QgsLayoutMeasurement
9397
%End
98+
9499
QgsLayoutMeasurement operator-=( const double v );
95100
%Docstring
101+
Subtracts a scalar value from the measurement.
96102
:rtype: QgsLayoutMeasurement
97103
%End
104+
98105
QgsLayoutMeasurement operator*( const double v ) const;
99106
%Docstring
107+
Multiplies the measurement by a scalar value.
100108
:rtype: QgsLayoutMeasurement
101109
%End
110+
102111
QgsLayoutMeasurement operator*=( const double v );
103112
%Docstring
113+
Multiplies the measurement by a scalar value.
104114
:rtype: QgsLayoutMeasurement
105115
%End
116+
106117
QgsLayoutMeasurement operator/( const double v ) const;
107118
%Docstring
119+
Divides the measurement by a scalar value.
108120
:rtype: QgsLayoutMeasurement
109121
%End
122+
110123
QgsLayoutMeasurement operator/=( const double v );
111124
%Docstring
125+
Divides the measurement by a scalar value.
112126
:rtype: QgsLayoutMeasurement
113127
%End
114128

‎python/core/layout/qgslayoutmeasurementconverter.sip

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ class QgsLayoutMeasurementConverter
2828

2929
QgsLayoutMeasurementConverter();
3030

31-
~QgsLayoutMeasurementConverter();
32-
3331
void setDpi( const double dpi );
3432
%Docstring
3533
Sets the dots per inch (``dpi``) for the measurement converter. This is used

‎python/core/layout/qgslayoutpoint.sip

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ class QgsLayoutPoint
3434
QgsLayoutPoint( const double x, const double y, const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters );
3535
%Docstring
3636
Constructor for QgsLayoutPoint.
37-
\param x x coordinate
38-
\param x y coordinate
39-
\param units units for x and y
4037
%End
4138

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

48-
~QgsLayoutPoint();
49-
5045
void setPoint( const double x, const double y );
5146
%Docstring
5247
Sets new x and y coordinates for the point.
@@ -134,20 +129,28 @@ class QgsLayoutPoint
134129
%Docstring
135130
:rtype: bool
136131
%End
132+
137133
QgsLayoutPoint operator*( const double v ) const;
138134
%Docstring
135+
Multiplies the x and y by a scalar value.
139136
:rtype: QgsLayoutPoint
140137
%End
138+
141139
QgsLayoutPoint operator*=( const double v );
142140
%Docstring
141+
Multiplies the x and y by a scalar value.
143142
:rtype: QgsLayoutPoint
144143
%End
144+
145145
QgsLayoutPoint operator/( const double v ) const;
146146
%Docstring
147+
Divides the x and y by a scalar value.
147148
:rtype: QgsLayoutPoint
148149
%End
150+
149151
QgsLayoutPoint operator/=( const double v );
150152
%Docstring
153+
Divides the x and y by a scalar value.
151154
:rtype: QgsLayoutPoint
152155
%End
153156

‎python/core/layout/qgslayoutsize.sip

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ class QgsLayoutSize
4646
\param units units for measurement
4747
%End
4848

49-
~QgsLayoutSize();
50-
5149
void setSize( const double width, const double height );
5250
%Docstring
5351
Sets new ``width`` and ``height`` for the size.
@@ -135,20 +133,28 @@ class QgsLayoutSize
135133
%Docstring
136134
:rtype: bool
137135
%End
136+
138137
QgsLayoutSize operator*( const double v ) const;
139138
%Docstring
139+
Multiplies the width and height by a scalar value.
140140
:rtype: QgsLayoutSize
141141
%End
142+
142143
QgsLayoutSize operator*=( const double v );
143144
%Docstring
145+
Multiplies the width and height by a scalar value.
144146
:rtype: QgsLayoutSize
145147
%End
148+
146149
QgsLayoutSize operator/( const double v ) const;
147150
%Docstring
151+
Divides the width and height by a scalar value.
148152
:rtype: QgsLayoutSize
149153
%End
154+
150155
QgsLayoutSize operator/=( const double v );
151156
%Docstring
157+
Divides the width and height by a scalar value.
152158
:rtype: QgsLayoutSize
153159
%End
154160

‎src/core/layout/qgslayoutmeasurement.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ QgsLayoutMeasurement::QgsLayoutMeasurement( const double length, const QgsUnitTy
2525
{
2626
}
2727

28-
QgsLayoutMeasurement::~QgsLayoutMeasurement()
29-
{
30-
}
31-
3228
QString QgsLayoutMeasurement::encodeMeasurement() const
3329
{
3430
return QStringLiteral( "%1,%2" ).arg( mLength ).arg( QgsUnitTypes::encodeUnit( mUnits ) );

‎src/core/layout/qgslayoutmeasurement.h

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222

2323
#include "qgsunittypes.h"
2424

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

43-
~QgsLayoutMeasurement();
44-
4544
/**
4645
* Returns the length of the measurement.
4746
* \see setLength()
@@ -81,13 +80,45 @@ class CORE_EXPORT QgsLayoutMeasurement
8180

8281
bool operator==( const QgsLayoutMeasurement &other ) const;
8382
bool operator!=( const QgsLayoutMeasurement &other ) const;
83+
84+
/**
85+
* Adds a scalar value to the measurement.
86+
*/
8487
QgsLayoutMeasurement operator+( const double v ) const;
88+
89+
/**
90+
* Adds a scalar value to the measurement.
91+
*/
8592
QgsLayoutMeasurement operator+=( const double v );
93+
94+
/**
95+
* Subtracts a scalar value from the measurement.
96+
*/
8697
QgsLayoutMeasurement operator-( const double v ) const;
98+
99+
/**
100+
* Subtracts a scalar value from the measurement.
101+
*/
87102
QgsLayoutMeasurement operator-=( const double v );
103+
104+
/**
105+
* Multiplies the measurement by a scalar value.
106+
*/
88107
QgsLayoutMeasurement operator*( const double v ) const;
108+
109+
/**
110+
* Multiplies the measurement by a scalar value.
111+
*/
89112
QgsLayoutMeasurement operator*=( const double v );
113+
114+
/**
115+
* Divides the measurement by a scalar value.
116+
*/
90117
QgsLayoutMeasurement operator/( const double v ) const;
118+
119+
/**
120+
* Divides the measurement by a scalar value.
121+
*/
91122
QgsLayoutMeasurement operator/=( const double v );
92123

93124
private:

‎src/core/layout/qgslayoutmeasurementconverter.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ QgsLayoutMeasurementConverter::QgsLayoutMeasurementConverter()
2323
{
2424
}
2525

26-
QgsLayoutMeasurementConverter::~QgsLayoutMeasurementConverter()
27-
{
28-
}
29-
3026
QgsLayoutMeasurement QgsLayoutMeasurementConverter::convert( const QgsLayoutMeasurement &measurement, const QgsUnitTypes::LayoutUnit targetUnits ) const
3127
{
3228
if ( measurement.units() == targetUnits )

‎src/core/layout/qgslayoutmeasurementconverter.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

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

4444
QgsLayoutMeasurementConverter();
4545

46-
~QgsLayoutMeasurementConverter();
47-
4846
/**
4947
* Sets the dots per inch (\a dpi) for the measurement converter. This is used
5048
* when converting measurements to and from pixels.

‎src/core/layout/qgslayoutpoint.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ QgsLayoutPoint::QgsLayoutPoint( const QgsUnitTypes::LayoutUnit units )
3636

3737
}
3838

39-
QgsLayoutPoint::~QgsLayoutPoint()
40-
{
41-
42-
}
43-
4439
bool QgsLayoutPoint::isNull() const
4540
{
4641
return qgsDoubleNear( mX, 0 ) && qgsDoubleNear( mY, 0 );

‎src/core/layout/qgslayoutpoint.h

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
#include "qgsunittypes.h"
2323
#include <QPointF>
2424

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

4243
/**
4344
* Constructor for QgsLayoutPoint.
44-
* \param x x coordinate
45-
* \param x y coordinate
46-
* \param units units for x and y
4745
*/
4846
QgsLayoutPoint( const double x, const double y, const QgsUnitTypes::LayoutUnit units = QgsUnitTypes::LayoutMillimeters );
4947

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

56-
~QgsLayoutPoint();
57-
5854
/**
5955
* Sets new x and y coordinates for the point.
6056
* \see setX()
@@ -132,9 +128,25 @@ class CORE_EXPORT QgsLayoutPoint
132128

133129
bool operator==( const QgsLayoutPoint &other ) const;
134130
bool operator!=( const QgsLayoutPoint &other ) const;
131+
132+
/**
133+
* Multiplies the x and y by a scalar value.
134+
*/
135135
QgsLayoutPoint operator*( const double v ) const;
136+
137+
/**
138+
* Multiplies the x and y by a scalar value.
139+
*/
136140
QgsLayoutPoint operator*=( const double v );
141+
142+
/**
143+
* Divides the x and y by a scalar value.
144+
*/
137145
QgsLayoutPoint operator/( const double v ) const;
146+
147+
/**
148+
* Divides the x and y by a scalar value.
149+
*/
138150
QgsLayoutPoint operator/=( const double v );
139151

140152
private:

‎src/core/layout/qgslayoutsize.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ QgsLayoutSize::QgsLayoutSize( const QgsUnitTypes::LayoutUnit units )
3434

3535
}
3636

37-
QgsLayoutSize::~QgsLayoutSize()
38-
{
39-
}
40-
4137
bool QgsLayoutSize::isEmpty() const
4238
{
4339
return qgsDoubleNear( mWidth, 0 ) && qgsDoubleNear( mHeight, 0 );

‎src/core/layout/qgslayoutsize.h

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525

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

58-
~QgsLayoutSize();
59-
6058
/**
6159
* Sets new \a width and \a height for the size.
6260
* \see setWidth()
@@ -134,9 +132,25 @@ class CORE_EXPORT QgsLayoutSize
134132

135133
bool operator==( const QgsLayoutSize &other ) const;
136134
bool operator!=( const QgsLayoutSize &other ) const;
135+
136+
/**
137+
* Multiplies the width and height by a scalar value.
138+
*/
137139
QgsLayoutSize operator*( const double v ) const;
140+
141+
/**
142+
* Multiplies the width and height by a scalar value.
143+
*/
138144
QgsLayoutSize operator*=( const double v );
145+
146+
/**
147+
* Divides the width and height by a scalar value.
148+
*/
139149
QgsLayoutSize operator/( const double v ) const;
150+
151+
/**
152+
* Divides the width and height by a scalar value.
153+
*/
140154
QgsLayoutSize operator/=( const double v );
141155

142156
private:

0 commit comments

Comments
 (0)
Please sign in to comment.