File: qsystemlocale.html

package info (click to toggle)
python-qt4 4.9.3-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 34,432 kB
  • sloc: python: 34,126; cpp: 11,938; xml: 290; makefile: 223; php: 27
file content (285 lines) | stat: -rw-r--r-- 13,410 bytes parent folder | download
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QSystemLocale Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QSystemLocale Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QSystemLocale class can be used to finetune the system
locale of the user. <a href="#details">More...</a></p>

<h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qsystemlocale.html#QueryType-enum">QueryType</a></b> { LanguageId, ScriptId, CountryId, DecimalPoint, ..., NativeCountryName }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qsystemlocale.html#QSystemLocale">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qsystemlocale.html#QSystemLocale-2">__init__</a></b> (<i>self</i>, QSystemLocale)</li><li><div class="fn" />QLocale <b><a href="qsystemlocale.html#fallbackLocale">fallbackLocale</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qsystemlocale.html#query">query</a></b> (<i>self</i>, QueryType&#160;<i>type</i>, QVariant&#160;<i>in</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QSystemLocale class can be used to finetune the system
locale of the user.</p>
<p><b>Warning:</b> This class is only useful in very rare cases.
Usually <a href="qlocale.html">QLocale</a> offers all the
functionality required for application development.</p>
<p>QSystemLocale allows to override the values provided by the
system locale (<a href="qlocale.html#system">QLocale.system</a>()).</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="QueryType-enum" />QSystemLocale.QueryType</h3><p>Specifies the type of information queried by <a href="qsystemlocale.html#query">query</a>(). For each value the type of
information to return from the <a href="qsystemlocale.html#query">query</a>() method is listed.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.LanguageId</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">a uint specifying the language.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.ScriptId</tt></td>
<td class="topAlign"><tt>33</tt></td>
<td class="topAlign">a uint specifying the script.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.CountryId</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">a uint specifying the country.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.DecimalPoint</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the decimal point.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.GroupSeparator</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the group separator.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.ZeroDigit</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the zero digit.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.NegativeSign</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the minus sign.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.PositiveSign</tt></td>
<td class="topAlign"><tt>23</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the plus sign.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.DateFormatLong</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the long date format</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.DateFormatShort</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the short date format</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.TimeFormatLong</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the long time format</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.TimeFormatShort</tt></td>
<td class="topAlign"><tt>9</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the short time format</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.DayNameLong</tt></td>
<td class="topAlign"><tt>10</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the name of a weekday. the in variant contains an
integer between 1 and 7 (Monday - Sunday)</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.DayNameShort</tt></td>
<td class="topAlign"><tt>11</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the short name of a weekday. the in variant contains an
integer between 1 and 7 (Monday - Sunday)</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.MonthNameLong</tt></td>
<td class="topAlign"><tt>12</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the name of a month. the in variant contains an integer
between 1 and 12</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.MonthNameShort</tt></td>
<td class="topAlign"><tt>13</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the short name of a month. the in variant contains an
integer between 1 and 12</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.DateToStringLong</tt></td>
<td class="topAlign"><tt>14</tt></td>
<td class="topAlign">converts the <a href="qdate.html">QDate</a>
stored in the in variant to a <a href="qstring.html">QString</a>
using the long date format</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.DateToStringShort</tt></td>
<td class="topAlign"><tt>15</tt></td>
<td class="topAlign">converts the <a href="qdate.html">QDate</a>
stored in the in variant to a <a href="qstring.html">QString</a>
using the short date format</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.TimeToStringLong</tt></td>
<td class="topAlign"><tt>16</tt></td>
<td class="topAlign">converts the <a href="qtime.html">QTime</a>
stored in the in variant to a <a href="qstring.html">QString</a>
using the long time format</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.TimeToStringShort</tt></td>
<td class="topAlign"><tt>17</tt></td>
<td class="topAlign">converts the <a href="qtime.html">QTime</a>
stored in the in variant to a <a href="qstring.html">QString</a>
using the short time format</td>
</tr>
<tr>
<td class="topAlign">
<tt>QSystemLocale.DateTimeFormatLong</tt></td>
<td class="topAlign"><tt>18</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the long date time format</td>
</tr>
<tr>
<td class="topAlign">
<tt>QSystemLocale.DateTimeFormatShort</tt></td>
<td class="topAlign"><tt>19</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
specifying the short date time format</td>
</tr>
<tr>
<td class="topAlign">
<tt>QSystemLocale.DateTimeToStringLong</tt></td>
<td class="topAlign"><tt>20</tt></td>
<td class="topAlign">converts the <a href="qdatetime.html">QDateTime</a> in the in variant to a <a href="qstring.html">QString</a> using the long datetime format</td>
</tr>
<tr>
<td class="topAlign">
<tt>QSystemLocale.DateTimeToStringShort</tt></td>
<td class="topAlign"><tt>21</tt></td>
<td class="topAlign">converts the <a href="qdatetime.html">QDateTime</a> in the in variant to a <a href="qstring.html">QString</a> using the short datetime format</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.MeasurementSystem</tt></td>
<td class="topAlign"><tt>22</tt></td>
<td class="topAlign">a <a href="qlocale.html#MeasurementSystem-enum">QLocale.MeasurementSystem</a>
enum specifying the measurement system</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.AMText</tt></td>
<td class="topAlign"><tt>24</tt></td>
<td class="topAlign">a string that represents the system AM
designator associated with a 12-hour clock.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.PMText</tt></td>
<td class="topAlign"><tt>25</tt></td>
<td class="topAlign">a string that represents the system PM
designator associated with a 12-hour clock.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.FirstDayOfWeek</tt></td>
<td class="topAlign"><tt>26</tt></td>
<td class="topAlign">a <a href="qt.html#DayOfWeek-enum">Qt.DayOfWeek</a> enum specifiying the
first day of the week</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.CurrencySymbol</tt></td>
<td class="topAlign"><tt>28</tt></td>
<td class="topAlign">a string that represents a currency in a
format QLocale.CurrencyFormat.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.CurrencyToString</tt></td>
<td class="topAlign"><tt>29</tt></td>
<td class="topAlign">a localized string representation of a number
with a currency symbol. Converts a <a href="qsystemlocale-currencytostringargument.html">QSystemLocale.CurrencyToStringArgument</a>
stored in the in variant to a <a href="qstring.html">QString</a>.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.UILanguages</tt></td>
<td class="topAlign"><tt>30</tt></td>
<td class="topAlign">a list of strings representing locale names
that could be used for UI translation.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QSystemLocale.StringToStandardQuotation</tt></td>
<td class="topAlign"><tt>31</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
containing a quoted version of the string ref stored in the in
variant using standard quotes.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QSystemLocale.StringToAlternateQuotation</tt></td>
<td class="topAlign"><tt>32</tt></td>
<td class="topAlign">a <a href="qstring.html">QString</a>
containing a quoted version of the string ref stored in the in
variant using alternate quotes.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.Weekdays</tt></td>
<td class="topAlign"><tt>27</tt></td>
<td class="topAlign">a <a href="qlist.html">QList</a>&lt;<a href="qt.html#DayOfWeek-enum">Qt.DayOfWeek</a>&gt; specifying the
regular weekdays</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.LocaleChanged</tt></td>
<td class="topAlign"><tt>35</tt></td>
<td class="topAlign">this type is queried whenever the system
locale is changed.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QSystemLocale.ListToSeparatedString</tt></td>
<td class="topAlign"><tt>34</tt></td>
<td class="topAlign">a string that represents a join of a given
<a href="qstringlist.html">QStringList</a> with a locale-defined
separator.</td>
</tr>
<tr>
<td class="topAlign">
<tt>QSystemLocale.NativeLanguageName</tt></td>
<td class="topAlign"><tt>36</tt></td>
<td class="topAlign">a string that represents the name of the
native language.</td>
</tr>
<tr>
<td class="topAlign"><tt>QSystemLocale.NativeCountryName</tt></td>
<td class="topAlign"><tt>37</tt></td>
<td class="topAlign">a string that represents the name of the
native country.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QSystemLocale" />QSystemLocale.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qsystemlocale.html">QSystemLocale</a>
object. The constructor will automatically install this object as
the system locale and remove any earlier installed system
locales.</p>


<h3 class="fn"><a name="QSystemLocale-2" />QSystemLocale.__init__ (<i>self</i>, <a href="qsystemlocale.html">QSystemLocale</a>)</h3><h3 class="fn"><a name="fallbackLocale" /><a href="qlocale.html">QLocale</a> QSystemLocale.fallbackLocale (<i>self</i>)</h3><p>Returns the fallback locale obtained from the system.</p>
<p>This function was introduced in Qt 4.6.</p>


<h3 class="fn"><a name="query" />QVariant QSystemLocale.query (<i>self</i>, <a href="qsystemlocale.html#QueryType-enum">QueryType</a>&#160;<i>type</i>, QVariant&#160;<i>in</i>)</h3><p>Generic query method for locale data. Provides indirection.
Denotes the <i>type</i> of the query with <i>in</i> as input data
depending on the query.</p>
<p><b>See also</b> <a href="qsystemlocale.html#QueryType-enum">QSystemLocale.QueryType</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.2</td></tr></table></div></address></body></html>