Skip to content

Commit 8fd8b6e

Browse files
committedNov 15, 2017
Update sip bindings
1 parent 916c56b commit 8fd8b6e

File tree

2 files changed

+71
-47
lines changed

2 files changed

+71
-47
lines changed
 

‎python/core/core_auto.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
%Include qgscolorscheme.sip
2222
%Include qgscolorschemeregistry.sip
2323
%Include qgsconditionalstyle.sip
24+
%Include qgscoordinateformatter.sip
2425
%Include qgscoordinatetransform.sip
2526
%Include qgscrscache.sip
2627
%Include qgsdartmeasurement.sip
Lines changed: 70 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,93 @@
1-
/** \ingroup core
2-
* \class QgsCoordinateFormatter
3-
* \brief Contains methods for converting coordinates for display in various formats.
4-
*
5-
* QgsCoordinateFormatter contains static methods for converting numeric coordinates into different
6-
* formats, for instance as degrees, minutes, seconds values. Note that QgsCoordinateFormatter has
7-
* no consideration for the validity of converting coordinates to the various display formats, and it
8-
* is up to the caller to ensure that sensible formats are used for particular coordinates. For instance,
9-
* ensuring that only geographic coordinates and not projected coordinates are formatted to degree
10-
* based formats.
11-
*
12-
* \note Added in version 2.14
13-
*/
1+
/************************************************************************
2+
* This file has been generated automatically from *
3+
* *
4+
* src/core/qgscoordinateformatter.h *
5+
* *
6+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
7+
************************************************************************/
8+
9+
10+
11+
1412

1513
class QgsCoordinateFormatter
1614
{
17-
%TypeHeaderCode
18-
#include <qgscoordinateformatter.h>
15+
%Docstring
16+
Contains methods for converting coordinates for display in various formats.
17+
18+
QgsCoordinateFormatter contains static methods for converting numeric coordinates into different
19+
formats, for instance as degrees, minutes, seconds values. Note that QgsCoordinateFormatter has
20+
no consideration for the validity of converting coordinates to the various display formats, and it
21+
is up to the caller to ensure that sensible formats are used for particular coordinates. For instance,
22+
ensuring that only geographic coordinates and not projected coordinates are formatted to degree
23+
based formats.
24+
25+
.. note::
26+
27+
Added in version 2.14
1928
%End
2029

30+
%TypeHeaderCode
31+
#include "qgscoordinateformatter.h"
32+
%End
2133
public:
2234

23-
/** Available formats for displaying coordinates.
24-
*/
2535
enum Format
2636
{
27-
Pair, /*!< Formats coordinates as an "x,y" pair */
28-
DegreesMinutesSeconds, /*!< Degrees, minutes and seconds, eg 30 degrees 45'30" */
29-
DegreesMinutes, /*!< Degrees and decimal minutes, eg 30degrees 45.55' */
30-
DecimalDegrees, /*!< Decimal degrees, eg 30.7555 degrees */
37+
Pair,
38+
DegreesMinutesSeconds,
39+
DegreesMinutes,
40+
DecimalDegrees,
3141
};
3242

33-
/** Flags for controlling formatting of coordinates.
34-
*/
3543
enum FormatFlag
3644
{
37-
DegreesUseStringSuffix, /*!< include a direction suffix (eg 'N', 'E', 'S' or 'W'), otherwise a "-" prefix is used for west and south coordinates */
38-
DegreesPadMinutesSeconds, /*!< pad minute and second values with leading zeros, eg '05' instead of '5' */
45+
DegreesUseStringSuffix,
46+
DegreesPadMinutesSeconds,
3947
};
4048
typedef QFlags<QgsCoordinateFormatter::FormatFlag> FormatFlags;
4149

42-
/** Formats an X coordinate value according to the specified parameters.
43-
* @param x x-coordinate
44-
* @param format string format to use for coordinate
45-
* @param precision number of decimal places to include
46-
* @param flags flags controlling format options
47-
* @returns formatted X coordinate string
48-
* @see formatY()
49-
*/
50+
5051
static QString formatX( double x, Format format, int precision = 12, FormatFlags flags = DegreesUseStringSuffix );
52+
%Docstring
53+
Formats an X coordinate value according to the specified parameters.
54+
@param x x-coordinate
55+
@param format string format to use for coordinate
56+
@param precision number of decimal places to include
57+
@param flags flags controlling format options
58+
@returns formatted X coordinate string
59+
@see formatY()
60+
:rtype: str
61+
%End
5162

52-
/** Formats an Y coordinate value according to the specified parameters.
53-
* @param y y-coordinate
54-
* @param format string format to use for coordinate
55-
* @param precision number of decimal places to include
56-
* @param flags flags controlling format options
57-
* @returns formatted Y coordinate string
58-
* @see formatX()
59-
*/
6063
static QString formatY( double y, Format format, int precision = 12, FormatFlags flags = DegreesUseStringSuffix );
64+
%Docstring
65+
Formats an Y coordinate value according to the specified parameters.
66+
@param y y-coordinate
67+
@param format string format to use for coordinate
68+
@param precision number of decimal places to include
69+
@param flags flags controlling format options
70+
@returns formatted Y coordinate string
71+
@see formatX()
72+
:rtype: str
73+
%End
6174

62-
/** Formats coordinates as an "x,y" pair, with optional decimal precision.
63-
* @param x x-coordinate
64-
* @param y y-coordinate
65-
* @param precision number of decimal places to include
66-
* @returns formatted coordinate string
67-
*/
6875
static QString asPair( double x, double y, int precision = 12 );
76+
%Docstring
77+
Formats coordinates as an "x,y" pair, with optional decimal precision.
78+
@param x x-coordinate
79+
@param y y-coordinate
80+
@param precision number of decimal places to include
81+
@returns formatted coordinate string
82+
:rtype: str
83+
%End
6984

7085
};
86+
87+
/************************************************************************
88+
* This file has been generated automatically from *
89+
* *
90+
* src/core/qgscoordinateformatter.h *
91+
* *
92+
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
93+
************************************************************************/

0 commit comments

Comments
 (0)
Please sign in to comment.