|
1 |
| -/** \ingroup core |
2 |
| - * \class QgsInterval |
3 |
| - * \brief A representation of the interval between two datetime values. |
4 |
| - * \note Added in version 2.16 |
5 |
| - */ |
| 1 | +/************************************************************************ |
| 2 | + * This file has been generated automatically from * |
| 3 | + * * |
| 4 | + * src/core/qgsinterval.h * |
| 5 | + * * |
| 6 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 7 | + ************************************************************************/ |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
6 | 14 |
|
7 | 15 | class QgsInterval
|
8 | 16 | {
|
9 |
| -%TypeHeaderCode |
10 |
| -#include <qgsinterval.h> |
| 17 | +%Docstring |
| 18 | + A representation of the interval between two datetime values. |
| 19 | +.. versionadded:: 2.16 |
11 | 20 | %End
|
12 | 21 |
|
| 22 | +%TypeHeaderCode |
| 23 | +#include "qgsinterval.h" |
| 24 | +%End |
13 | 25 | public:
|
14 | 26 |
|
15 |
| - // YEAR const value taken from postgres query |
16 |
| - // SELECT EXTRACT(EPOCH FROM interval '1 year') |
17 |
| - //! Seconds per year (average) |
18 | 27 | static const int YEARS;
|
19 |
| - //! Seconds per month, based on 30 day month |
| 28 | +%Docstring |
| 29 | +Seconds per year (average) |
| 30 | +%End |
20 | 31 | static const int MONTHS;
|
21 |
| - //! Seconds per week |
| 32 | +%Docstring |
| 33 | +Seconds per month, based on 30 day month |
| 34 | +%End |
22 | 35 | static const int WEEKS;
|
23 |
| - //! Seconds per day |
| 36 | +%Docstring |
| 37 | +Seconds per week |
| 38 | +%End |
24 | 39 | static const int DAY;
|
25 |
| - //! Seconds per hour |
| 40 | +%Docstring |
| 41 | +Seconds per day |
| 42 | +%End |
26 | 43 | static const int HOUR;
|
27 |
| - //! Seconds per minute |
| 44 | +%Docstring |
| 45 | +Seconds per hour |
| 46 | +%End |
28 | 47 | static const int MINUTE;
|
| 48 | +%Docstring |
| 49 | +Seconds per minute |
| 50 | +%End |
29 | 51 |
|
30 |
| - /** Default constructor for QgsInterval. Creates an invalid interval. |
31 |
| - */ |
32 | 52 | QgsInterval();
|
| 53 | +%Docstring |
| 54 | + Default constructor for QgsInterval. Creates an invalid interval. |
| 55 | +%End |
33 | 56 |
|
34 |
| - /** Constructor for QgsInterval. |
35 |
| - * @param seconds duration of interval in seconds |
36 |
| - */ |
37 | 57 | QgsInterval( double seconds );
|
| 58 | +%Docstring |
| 59 | + Constructor for QgsInterval. |
| 60 | + \param seconds duration of interval in seconds |
| 61 | +%End |
38 | 62 |
|
39 |
| - /** Returns the interval duration in years (based on an average year length) |
40 |
| - * @see setYears() |
41 |
| - */ |
42 | 63 | double years() const;
|
| 64 | +%Docstring |
| 65 | + Returns the interval duration in years (based on an average year length) |
| 66 | +.. seealso:: setYears() |
| 67 | + :rtype: float |
| 68 | +%End |
43 | 69 |
|
44 |
| - /** Sets the interval duration in years. |
45 |
| - * @param years duration in years (based on average year length) |
46 |
| - * @see years() |
47 |
| - */ |
48 | 70 | void setYears( double years );
|
| 71 | +%Docstring |
| 72 | + Sets the interval duration in years. |
| 73 | + \param years duration in years (based on average year length) |
| 74 | +.. seealso:: years() |
| 75 | +%End |
49 | 76 |
|
50 |
| - /** Returns the interval duration in months (based on a 30 day month). |
51 |
| - * @see setMonths() |
52 |
| - */ |
53 | 77 | double months() const;
|
| 78 | +%Docstring |
| 79 | + Returns the interval duration in months (based on a 30 day month). |
| 80 | +.. seealso:: setMonths() |
| 81 | + :rtype: float |
| 82 | +%End |
54 | 83 |
|
55 |
| - /** Sets the interval duration in months. |
56 |
| - * @param months duration in months (based on a 30 day month) |
57 |
| - * @see months() |
58 |
| - */ |
59 | 84 | void setMonths( double months );
|
| 85 | +%Docstring |
| 86 | + Sets the interval duration in months. |
| 87 | + \param months duration in months (based on a 30 day month) |
| 88 | +.. seealso:: months() |
| 89 | +%End |
60 | 90 |
|
61 |
| - /** Returns the interval duration in weeks. |
62 |
| - * @see setWeeks() |
63 |
| - */ |
64 | 91 | double weeks() const;
|
| 92 | +%Docstring |
| 93 | + Returns the interval duration in weeks. |
| 94 | +.. seealso:: setWeeks() |
| 95 | + :rtype: float |
| 96 | +%End |
65 | 97 |
|
66 |
| - /** Sets the interval duration in weeks. |
67 |
| - * @param weeks duration in weeks |
68 |
| - * @see weeks() |
69 |
| - */ |
70 | 98 | void setWeeks( double weeks );
|
| 99 | +%Docstring |
| 100 | + Sets the interval duration in weeks. |
| 101 | + \param weeks duration in weeks |
| 102 | +.. seealso:: weeks() |
| 103 | +%End |
71 | 104 |
|
72 |
| - /** Returns the interval duration in days. |
73 |
| - * @see setDays() |
74 |
| - */ |
75 | 105 | double days() const;
|
| 106 | +%Docstring |
| 107 | + Returns the interval duration in days. |
| 108 | +.. seealso:: setDays() |
| 109 | + :rtype: float |
| 110 | +%End |
76 | 111 |
|
77 |
| - /** Sets the interval duration in days. |
78 |
| - * @param days duration in days |
79 |
| - * @see days() |
80 |
| - */ |
81 | 112 | void setDays( double days );
|
| 113 | +%Docstring |
| 114 | + Sets the interval duration in days. |
| 115 | + \param days duration in days |
| 116 | +.. seealso:: days() |
| 117 | +%End |
82 | 118 |
|
83 |
| - /** Returns the interval duration in hours. |
84 |
| - * @see setHours() |
85 |
| - */ |
86 | 119 | double hours() const;
|
| 120 | +%Docstring |
| 121 | + Returns the interval duration in hours. |
| 122 | +.. seealso:: setHours() |
| 123 | + :rtype: float |
| 124 | +%End |
87 | 125 |
|
88 |
| - /** Sets the interval duration in hours. |
89 |
| - * @param hours duration in hours |
90 |
| - * @see hours() |
91 |
| - */ |
92 | 126 | void setHours( double hours );
|
| 127 | +%Docstring |
| 128 | + Sets the interval duration in hours. |
| 129 | + \param hours duration in hours |
| 130 | +.. seealso:: hours() |
| 131 | +%End |
93 | 132 |
|
94 |
| - /** Returns the interval duration in minutes. |
95 |
| - * @see setMinutes() |
96 |
| - */ |
97 | 133 | double minutes() const;
|
| 134 | +%Docstring |
| 135 | + Returns the interval duration in minutes. |
| 136 | +.. seealso:: setMinutes() |
| 137 | + :rtype: float |
| 138 | +%End |
98 | 139 |
|
99 |
| - /** Sets the interval duration in minutes. |
100 |
| - * @param minutes duration in minutes |
101 |
| - * @see minutes() |
102 |
| - */ |
103 | 140 | void setMinutes( double minutes );
|
| 141 | +%Docstring |
| 142 | + Sets the interval duration in minutes. |
| 143 | + \param minutes duration in minutes |
| 144 | +.. seealso:: minutes() |
| 145 | +%End |
104 | 146 |
|
105 |
| - /** Returns the interval duration in seconds. |
106 |
| - * @see setSeconds() |
107 |
| - */ |
108 | 147 | double seconds() const;
|
| 148 | +%Docstring |
| 149 | + Returns the interval duration in seconds. |
| 150 | +.. seealso:: setSeconds() |
| 151 | + :rtype: float |
| 152 | +%End |
109 | 153 |
|
110 |
| - /** Sets the interval duration in seconds. |
111 |
| - * @param seconds duration in seconds |
112 |
| - * @see seconds() |
113 |
| - */ |
114 | 154 | void setSeconds( double seconds );
|
| 155 | +%Docstring |
| 156 | + Sets the interval duration in seconds. |
| 157 | + \param seconds duration in seconds |
| 158 | +.. seealso:: seconds() |
| 159 | +%End |
115 | 160 |
|
116 |
| - /** Returns true if the interval is valid. |
117 |
| - * @see setValid() |
118 |
| - */ |
119 | 161 | bool isValid() const;
|
| 162 | +%Docstring |
| 163 | + Returns true if the interval is valid. |
| 164 | +.. seealso:: setValid() |
| 165 | + :rtype: bool |
| 166 | +%End |
120 | 167 |
|
121 |
| - /** Sets whether the interval is valid. |
122 |
| - * @param valid set to true to set the interval as valid. |
123 |
| - * @see isValid() |
124 |
| - */ |
125 | 168 | void setValid( bool valid );
|
| 169 | +%Docstring |
| 170 | + Sets whether the interval is valid. |
| 171 | + \param valid set to true to set the interval as valid. |
| 172 | +.. seealso:: isValid() |
| 173 | +%End |
126 | 174 |
|
127 | 175 | bool operator==( QgsInterval other ) const;
|
| 176 | +%Docstring |
| 177 | + :rtype: bool |
| 178 | +%End |
128 | 179 |
|
129 |
| - /** Converts a string to an interval |
130 |
| - * @param string string to parse |
131 |
| - * @returns interval, or invalid interval if string could not be parsed |
132 |
| - */ |
133 | 180 | static QgsInterval fromString( const QString &string );
|
| 181 | +%Docstring |
| 182 | + Converts a string to an interval |
| 183 | + \param string string to parse |
| 184 | + :return: interval, or invalid interval if string could not be parsed |
| 185 | + :rtype: QgsInterval |
| 186 | +%End |
134 | 187 |
|
135 |
| - //! Allows direct construction of QVariants from intervals. |
136 | 188 | operator QVariant() const;
|
| 189 | +%Docstring |
| 190 | +Allows direct construction of QVariants from intervals. |
| 191 | +%End |
137 | 192 |
|
138 | 193 | };
|
139 | 194 |
|
| 195 | + |
| 196 | + |
| 197 | +/************************************************************************ |
| 198 | + * This file has been generated automatically from * |
| 199 | + * * |
| 200 | + * src/core/qgsinterval.h * |
| 201 | + * * |
| 202 | + * Do not edit manually ! Edit header and run scripts/sipify.pl again * |
| 203 | + ************************************************************************/ |
0 commit comments