File: qgsdatetimestatisticalsummary.sip.in

package info (click to toggle)
qgis 3.40.11%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,183,800 kB
  • sloc: cpp: 1,595,841; python: 372,637; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 154
file content (167 lines) | stat: -rw-r--r-- 4,828 bytes parent folder | download | duplicates (12)
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
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/core/qgsdatetimestatisticalsummary.h                             *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/





class QgsDateTimeStatisticalSummary
{
%Docstring(signature="appended")
Calculator for summary statistics and aggregates for a list of
datetimes.

Statistics are calculated by calling :py:func:`~calculate` and passing a
list of datetimes. The individual statistics can then be retrieved using
the associated methods. Note that not all statistics are calculated by
default. Statistics which require slower computations are only
calculated by specifying the statistic in the constructor or via
:py:func:`~setStatistics`.
%End

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

    QgsDateTimeStatisticalSummary( Qgis::DateTimeStatistics stats = Qgis::DateTimeStatistic::All );
%Docstring
Constructor for QgsDateTimeStatisticalSummary

:param stats: flags for statistics to calculate
%End

    Qgis::DateTimeStatistics statistics() const;
%Docstring
Returns flags which specify which statistics will be calculated. Some
statistics are always calculated (e.g., count).

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

    void setStatistics( Qgis::DateTimeStatistics stats );
%Docstring
Sets flags which specify which statistics will be calculated. Some
statistics are always calculated (e.g., count).

:param stats: flags for statistics to calculate

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

    void reset();
%Docstring
Resets the calculated values
%End

    void calculate( const QVariantList &values );
%Docstring
Calculates summary statistics for a list of variants. Any non-datetime
variants will be ignored.

:param values: list of variants

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

    void addValue( const QVariant &value );
%Docstring
Adds a single datetime to the statistics calculation. Calling this
method allows datetimes to be added to the calculation one at a time.
For large quantities of dates this may be more efficient then first
adding all the variants to a list and calling
:py:func:`~QgsDateTimeStatisticalSummary.calculate`.

:param value: datetime to add. Any non-datetime variants will be
              ignored.

.. note::

   call :py:func:`~QgsDateTimeStatisticalSummary.reset` before adding the first datetime using this method
   to clear the results from any previous calculations

.. note::

   :py:func:`~QgsDateTimeStatisticalSummary.finalize` must be called after adding the final value and before
   retrieving calculated statistics.

.. seealso:: :py:func:`calculate`

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

    void finalize();
%Docstring
Must be called after adding all datetimes with
:py:func:`~QgsDateTimeStatisticalSummary.addValue` and before retrieving
any calculated datetime statistics.

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

    QVariant statistic( Qgis::DateTimeStatistic stat ) const;
%Docstring
Returns the value of a specified statistic

:param stat: statistic to return

:return: calculated value of statistic
%End

    int count() const;
%Docstring
Returns the calculated count of values.
%End

    int countDistinct() const;
%Docstring
Returns the number of distinct datetime values.
%End

    QSet< QDateTime > distinctValues() const;
%Docstring
Returns the set of distinct datetime values.
%End

    int countMissing() const;
%Docstring
Returns the number of missing (null) datetime values.
%End

    QDateTime min() const;
%Docstring
Returns the minimum (earliest) non-null datetime value.
%End

    QDateTime max() const;
%Docstring
Returns the maximum (latest) non-null datetime value.
%End

    QgsInterval range() const;
%Docstring
Returns the range (interval between earliest and latest non-null
datetime values).
%End

    static QString displayName( Qgis::DateTimeStatistic statistic );
%Docstring
Returns the friendly display name for a statistic

:param statistic: statistic to return name for
%End

};

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