File: qgsbasicnumericformat.sip.in

package info (click to toggle)
qgis 3.40.14%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,185,400 kB
  • sloc: cpp: 1,616,418; python: 372,869; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,829; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 155
file content (182 lines) | stat: -rw-r--r-- 5,167 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/numericformats/qgsbasicnumericformat.h                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/


class QgsBasicNumericFormat : QgsNumericFormat
{
%Docstring(signature="appended")
A numeric formatter which returns a simple text representation of a
value.

.. versionadded:: 3.12
%End

%TypeHeaderCode
#include "qgsbasicnumericformat.h"
%End
  public:

    enum RoundingType
    {
      DecimalPlaces,
      SignificantFigures,
    };

    QgsBasicNumericFormat();
%Docstring
Default constructor
%End

    virtual QString id() const;

    virtual QString visibleName() const;

    virtual int sortKey();

    virtual QString formatDouble( double value, const QgsNumericFormatContext &context ) const;

    virtual QgsNumericFormat *clone() const /Factory/;

    virtual QgsNumericFormat *create( const QVariantMap &configuration, const QgsReadWriteContext &context ) const /Factory/;

    virtual QVariantMap configuration( const QgsReadWriteContext &context ) const;


    int numberDecimalPlaces() const;
%Docstring
Returns the maximum number of decimal places to show.

.. seealso:: :py:func:`setNumberDecimalPlaces`

.. seealso:: :py:func:`showTrailingZeros`
%End

    virtual void setNumberDecimalPlaces( int places );
%Docstring
Sets the maximum number of decimal ``places`` to show.

.. seealso:: :py:func:`numberDecimalPlaces`

.. seealso:: :py:func:`setShowTrailingZeros`
%End

    bool showThousandsSeparator() const;
%Docstring
Returns ``True`` if the thousands grouping separator will be shown.

.. seealso:: :py:func:`setShowThousandsSeparator`
%End

    void setShowThousandsSeparator( bool show );
%Docstring
Sets whether the thousands grouping separator will be shown.

.. seealso:: :py:func:`showThousandsSeparator`
%End

    bool showPlusSign() const;
%Docstring
Returns ``True`` if a leading plus sign will be shown for positive
values.

.. seealso:: :py:func:`setShowPlusSign`
%End

    void setShowPlusSign( bool show );
%Docstring
Sets whether a leading plus sign will be shown for positive values.

.. seealso:: :py:func:`showPlusSign`
%End

    bool showTrailingZeros() const;
%Docstring
Returns ``True`` if trailing zeros will be shown (up to the specified
:py:func:`~QgsBasicNumericFormat.numberDecimalPlaces`).

.. seealso:: :py:func:`setShowTrailingZeros`

.. seealso:: :py:func:`numberDecimalPlaces`
%End

    void setShowTrailingZeros( bool show );
%Docstring
Sets whether trailing zeros will be shown (up to the specified
:py:func:`~QgsBasicNumericFormat.numberDecimalPlaces`).

.. seealso:: :py:func:`showTrailingZeros`

.. seealso:: :py:func:`setNumberDecimalPlaces`
%End

    RoundingType roundingType() const;
%Docstring
Returns the rounding type, which controls the behavior of the
:py:func:`~QgsBasicNumericFormat.numberDecimalPlaces` setting.

.. seealso:: :py:func:`setRoundingType`
%End

    void setRoundingType( RoundingType type );
%Docstring
Sets the rounding ``type``, which controls the behavior of the
:py:func:`~QgsBasicNumericFormat.numberDecimalPlaces` setting.

.. seealso:: :py:func:`roundingType`
%End

    QChar thousandsSeparator() const;
%Docstring
Returns any override for the thousands separator character. If an
invalid QChar is returned, then the QGIS locale separator is used
instead.

.. seealso:: :py:func:`setThousandsSeparator`
%End

    void setThousandsSeparator( QChar character );
%Docstring
Sets an override ``character`` for the thousands separator character. If
an invalid QChar is set, then the QGIS locale separator is used instead.

.. seealso:: :py:func:`thousandsSeparator`
%End

    QChar decimalSeparator() const;
%Docstring
Returns any override for the decimal separator character. If an invalid
QChar is returned, then the QGIS locale separator is used instead.

.. seealso:: :py:func:`setDecimalSeparator`
%End

    void setDecimalSeparator( QChar character );
%Docstring
Sets an override ``character`` for the decimal separator character. If
an invalid QChar is set, then the QGIS locale separator is used instead.

.. seealso:: :py:func:`decimalSeparator`
%End

  protected:

    virtual void setConfiguration( const QVariantMap &configuration, const QgsReadWriteContext &context );
%Docstring
Sets the format's ``configuration``.
%End


};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/numericformats/qgsbasicnumericformat.h                      *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/