source: trunk/doc/html/qlocale-h.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 14.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qlocale.h:1 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>qlocale.h Include File</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qlocale.h</h1>
33
34<p>This is the verbatim text of the qlocale.h include file. It is provided only for illustration; the copyright remains with Trolltech.
35<hr>
36<pre>
37/****************************************************************************
38** $Id: qlocale-h.html 2051 2007-02-21 10:04:20Z chehrlic $
39**
40** Declaration of the QLocale class
41**
42** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
43**
44** This file is part of the tools module of the Qt GUI Toolkit.
45**
46** This file may be distributed under the terms of the Q Public License
47** as defined by Trolltech ASA of Norway and appearing in the file
48** LICENSE.QPL included in the packaging of this file.
49**
50** This file may be distributed and/or modified under the terms of the
51** GNU General Public License version 2 as published by the Free Software
52** Foundation and appearing in the file LICENSE.GPL included in the
53** packaging of this file.
54**
55** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
56** licenses may use this file in accordance with the Qt Commercial License
57** Agreement provided with the Software.
58**
59** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
60** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
61**
62** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
63** information about Qt Commercial License Agreements.
64** See http://www.trolltech.com/qpl/ for QPL licensing information.
65** See http://www.trolltech.com/gpl/ for GPL licensing information.
66**
67** Contact info@trolltech.com if any conditions of this licensing are
68** not clear to you.
69**
70**********************************************************************/
71
72#ifndef QLOCALE_H
73#define QLOCALE_H
74
75#include "qstring.h"
76
77struct QLocalePrivate;
78
79class Q_EXPORT QLocale
80{
81 friend class QString;
82
83public:
84 enum Language {
85 C = 1,
86 Abkhazian = 2,
87 Afan = 3,
88 Afar = 4,
89 Afrikaans = 5,
90 Albanian = 6,
91 Amharic = 7,
92 Arabic = 8,
93 Armenian = 9,
94 Assamese = 10,
95 Aymara = 11,
96 Azerbaijani = 12,
97 Bashkir = 13,
98 Basque = 14,
99 Bengali = 15,
100 Bhutani = 16,
101 Bihari = 17,
102 Bislama = 18,
103 Breton = 19,
104 Bulgarian = 20,
105 Burmese = 21,
106 Byelorussian = 22,
107 Cambodian = 23,
108 Catalan = 24,
109 Chinese = 25,
110 Corsican = 26,
111 Croatian = 27,
112 Czech = 28,
113 Danish = 29,
114 Dutch = 30,
115 English = 31,
116 Esperanto = 32,
117 Estonian = 33,
118 Faroese = 34,
119 FijiLanguage = 35,
120 Finnish = 36,
121 French = 37,
122 Frisian = 38,
123 Gaelic = 39,
124 Galician = 40,
125 Georgian = 41,
126 German = 42,
127 Greek = 43,
128 Greenlandic = 44,
129 Guarani = 45,
130 Gujarati = 46,
131 Hausa = 47,
132 Hebrew = 48,
133 Hindi = 49,
134 Hungarian = 50,
135 Icelandic = 51,
136 Indonesian = 52,
137 Interlingua = 53,
138 Interlingue = 54,
139 Inuktitut = 55,
140 Inupiak = 56,
141 Irish = 57,
142 Italian = 58,
143 Japanese = 59,
144 Javanese = 60,
145 Kannada = 61,
146 Kashmiri = 62,
147 Kazakh = 63,
148 Kinyarwanda = 64,
149 Kirghiz = 65,
150 Korean = 66,
151 Kurdish = 67,
152 Kurundi = 68,
153 Laothian = 69,
154 Latin = 70,
155 Latvian = 71,
156 Lingala = 72,
157 Lithuanian = 73,
158 Macedonian = 74,
159 Malagasy = 75,
160 Malay = 76,
161 Malayalam = 77,
162 Maltese = 78,
163 Maori = 79,
164 Marathi = 80,
165 Moldavian = 81,
166 Mongolian = 82,
167 NauruLanguage = 83,
168 Nepali = 84,
169 Norwegian = 85,
170 Occitan = 86,
171 Oriya = 87,
172 Pashto = 88,
173 Persian = 89,
174 Polish = 90,
175 Portuguese = 91,
176 Punjabi = 92,
177 Quechua = 93,
178 RhaetoRomance = 94,
179 Romanian = 95,
180 Russian = 96,
181 Samoan = 97,
182 Sangho = 98,
183 Sanskrit = 99,
184 Serbian = 100,
185 SerboCroatian = 101,
186 Sesotho = 102,
187 Setswana = 103,
188 Shona = 104,
189 Sindhi = 105,
190 Singhalese = 106,
191 Siswati = 107,
192 Slovak = 108,
193 Slovenian = 109,
194 Somali = 110,
195 Spanish = 111,
196 Sundanese = 112,
197 Swahili = 113,
198 Swedish = 114,
199 Tagalog = 115,
200 Tajik = 116,
201 Tamil = 117,
202 Tatar = 118,
203 Telugu = 119,
204 Thai = 120,
205 Tibetan = 121,
206 Tigrinya = 122,
207 TongaLanguage = 123,
208 Tsonga = 124,
209 Turkish = 125,
210 Turkmen = 126,
211 Twi = 127,
212 Uigur = 128,
213 Ukrainian = 129,
214 Urdu = 130,
215 Uzbek = 131,
216 Vietnamese = 132,
217 Volapuk = 133,
218 Welsh = 134,
219 Wolof = 135,
220 Xhosa = 136,
221 Yiddish = 137,
222 Yoruba = 138,
223 Zhuang = 139,
224 Zulu = 140,
225 LastLanguage = Zulu
226 };
227
228 enum Country {
229 AnyCountry = 0,
230 Afghanistan = 1,
231 Albania = 2,
232 Algeria = 3,
233 AmericanSamoa = 4,
234 Andorra = 5,
235 Angola = 6,
236 Anguilla = 7,
237 Antarctica = 8,
238 AntiguaAndBarbuda = 9,
239 Argentina = 10,
240 Armenia = 11,
241 Aruba = 12,
242 Australia = 13,
243 Austria = 14,
244 Azerbaijan = 15,
245 Bahamas = 16,
246 Bahrain = 17,
247 Bangladesh = 18,
248 Barbados = 19,
249 Belarus = 20,
250 Belgium = 21,
251 Belize = 22,
252 Benin = 23,
253 Bermuda = 24,
254 Bhutan = 25,
255 Bolivia = 26,
256 BosniaAndHerzegowina = 27,
257 Botswana = 28,
258 BouvetIsland = 29,
259 Brazil = 30,
260 BritishIndianOceanTerritory = 31,
261 BruneiDarussalam = 32,
262 Bulgaria = 33,
263 BurkinaFaso = 34,
264 Burundi = 35,
265 Cambodia = 36,
266 Cameroon = 37,
267 Canada = 38,
268 CapeVerde = 39,
269 CaymanIslands = 40,
270 CentralAfricanRepublic = 41,
271 Chad = 42,
272 Chile = 43,
273 China = 44,
274 ChristmasIsland = 45,
275 CocosIslands = 46,
276 Colombia = 47,
277 Comoros = 48,
278 DemocraticRepublicOfCongo = 49,
279 PeoplesRepublicOfCongo = 50,
280 CookIslands = 51,
281 CostaRica = 52,
282 IvoryCoast = 53,
283 Croatia = 54,
284 Cuba = 55,
285 Cyprus = 56,
286 CzechRepublic = 57,
287 Denmark = 58,
288 Djibouti = 59,
289 Dominica = 60,
290 DominicanRepublic = 61,
291 EastTimor = 62,
292 Ecuador = 63,
293 Egypt = 64,
294 ElSalvador = 65,
295 EquatorialGuinea = 66,
296 Eritrea = 67,
297 Estonia = 68,
298 Ethiopia = 69,
299 FalklandIslands = 70,
300 FaroeIslands = 71,
301 FijiCountry = 72,
302 Finland = 73,
303 France = 74,
304 MetropolitanFrance = 75,
305 FrenchGuiana = 76,
306 FrenchPolynesia = 77,
307 FrenchSouthernTerritories = 78,
308 Gabon = 79,
309 Gambia = 80,
310 Georgia = 81,
311 Germany = 82,
312 Ghana = 83,
313 Gibraltar = 84,
314 Greece = 85,
315 Greenland = 86,
316 Grenada = 87,
317 Guadeloupe = 88,
318 Guam = 89,
319 Guatemala = 90,
320 Guinea = 91,
321 GuineaBissau = 92,
322 Guyana = 93,
323 Haiti = 94,
324 HeardAndMcDonaldIslands = 95,
325 Honduras = 96,
326 HongKong = 97,
327 Hungary = 98,
328 Iceland = 99,
329 India = 100,
330 Indonesia = 101,
331 Iran = 102,
332 Iraq = 103,
333 Ireland = 104,
334 Israel = 105,
335 Italy = 106,
336 Jamaica = 107,
337 Japan = 108,
338 Jordan = 109,
339 Kazakhstan = 110,
340 Kenya = 111,
341 Kiribati = 112,
342 DemocraticRepublicOfKorea = 113,
343 RepublicOfKorea = 114,
344 Kuwait = 115,
345 Kyrgyzstan = 116,
346 Lao = 117,
347 Latvia = 118,
348 Lebanon = 119,
349 Lesotho = 120,
350 Liberia = 121,
351 LibyanArabJamahiriya = 122,
352 Liechtenstein = 123,
353 Lithuania = 124,
354 Luxembourg = 125,
355 Macau = 126,
356 Macedonia = 127,
357 Madagascar = 128,
358 Malawi = 129,
359 Malaysia = 130,
360 Maldives = 131,
361 Mali = 132,
362 Malta = 133,
363 MarshallIslands = 134,
364 Martinique = 135,
365 Mauritania = 136,
366 Mauritius = 137,
367 Mayotte = 138,
368 Mexico = 139,
369 Micronesia = 140,
370 Moldova = 141,
371 Monaco = 142,
372 Mongolia = 143,
373 Montserrat = 144,
374 Morocco = 145,
375 Mozambique = 146,
376 Myanmar = 147,
377 Namibia = 148,
378 NauruCountry = 149,
379 Nepal = 150,
380 Netherlands = 151,
381 NetherlandsAntilles = 152,
382 NewCaledonia = 153,
383 NewZealand = 154,
384 Nicaragua = 155,
385 Niger = 156,
386 Nigeria = 157,
387 Niue = 158,
388 NorfolkIsland = 159,
389 NorthernMarianaIslands = 160,
390 Norway = 161,
391 Oman = 162,
392 Pakistan = 163,
393 Palau = 164,
394 PalestinianTerritory = 165,
395 Panama = 166,
396 PapuaNewGuinea = 167,
397 Paraguay = 168,
398 Peru = 169,
399 Philippines = 170,
400 Pitcairn = 171,
401 Poland = 172,
402 Portugal = 173,
403 PuertoRico = 174,
404 Qatar = 175,
405 Reunion = 176,
406 Romania = 177,
407 RussianFederation = 178,
408 Rwanda = 179,
409 SaintKittsAndNevis = 180,
410 StLucia = 181,
411 StVincentAndTheGrenadines = 182,
412 Samoa = 183,
413 SanMarino = 184,
414 SaoTomeAndPrincipe = 185,
415 SaudiArabia = 186,
416 Senegal = 187,
417 Seychelles = 188,
418 SierraLeone = 189,
419 Singapore = 190,
420 Slovakia = 191,
421 Slovenia = 192,
422 SolomonIslands = 193,
423 Somalia = 194,
424 SouthAfrica = 195,
425 SouthGeorgiaAndTheSouthSandwichIslands = 196,
426 Spain = 197,
427 SriLanka = 198,
428 StHelena = 199,
429 StPierreAndMiquelon = 200,
430 Sudan = 201,
431 Suriname = 202,
432 SvalbardAndJanMayenIslands = 203,
433 Swaziland = 204,
434 Sweden = 205,
435 Switzerland = 206,
436 SyrianArabRepublic = 207,
437 Taiwan = 208,
438 Tajikistan = 209,
439 Tanzania = 210,
440 Thailand = 211,
441 Togo = 212,
442 Tokelau = 213,
443 TongaCountry = 214,
444 TrinidadAndTobago = 215,
445 Tunisia = 216,
446 Turkey = 217,
447 Turkmenistan = 218,
448 TurksAndCaicosIslands = 219,
449 Tuvalu = 220,
450 Uganda = 221,
451 Ukraine = 222,
452 UnitedArabEmirates = 223,
453 UnitedKingdom = 224,
454 UnitedStates = 225,
455 UnitedStatesMinorOutlyingIslands = 226,
456 Uruguay = 227,
457 Uzbekistan = 228,
458 Vanuatu = 229,
459 VaticanCityState = 230,
460 Venezuela = 231,
461 VietNam = 232,
462 BritishVirginIslands = 233,
463 USVirginIslands = 234,
464 WallisAndFutunaIslands = 235,
465 WesternSahara = 236,
466 Yemen = 237,
467 Yugoslavia = 238,
468 Zambia = 239,
469 Zimbabwe = 240,
470 LastCountry = Zimbabwe
471 };
472
473 QLocale();
474 QLocale(const QString &amp;name);
475 QLocale(Language language, Country country = AnyCountry);
476 QLocale(const QLocale &amp;other);
477
478 QLocale &amp;operator=(const QLocale &amp;other);
479
480 Language language() const;
481 Country country() const;
482 QString name() const;
483
484 short toShort(const QString &amp;s, bool *ok = 0) const;
485 ushort toUShort(const QString &amp;s, bool *ok = 0) const;
486 int toInt(const QString &amp;s, bool *ok = 0) const;
487 uint toUInt(const QString &amp;s, bool *ok = 0) const;
488 Q_LONG toLong(const QString &amp;s, bool *ok = 0) const;
489 Q_ULONG toULong(const QString &amp;s, bool *ok = 0) const;
490 Q_LLONG toLongLong(const QString &amp;s, bool *ok = 0) const;
491 Q_ULLONG toULongLong(const QString &amp;s, bool *ok = 0) const;
492 float toFloat(const QString &amp;s, bool *ok = 0) const;
493 double toDouble(const QString &amp;s, bool *ok = 0) const;
494
495 QString toString(short i) const
496 { return toString((Q_LLONG)i); }
497 QString toString(ushort i) const
498 { return toString((Q_ULLONG)i); }
499 QString toString(int i) const
500 { return toString((Q_LLONG)i); }
501 QString toString(uint i) const
502 { return toString((Q_ULLONG)i); }
503#if !defined(Q_OS_WIN64)
504 QString toString(Q_LONG i) const
505 { return toString((Q_LLONG)i); }
506 QString toString(Q_ULONG i) const
507 { return toString((Q_ULLONG)i); }
508#endif
509 QString toString(Q_LLONG i) const;
510 QString toString(Q_ULLONG i) const;
511 QString toString(float i, char f = 'g', int prec = 6) const
512 { return toString((double) i, f, prec); }
513 QString toString(double i, char f = 'g', int prec = 6) const;
514
515 static QString languageToString(Language language);
516 static QString countryToString(Country country);
517 static void setDefault(const QLocale &amp;locale);
518
519 static QLocale c() { return QLocale(C); }
520 static QLocale system();
521
522private:
523 const QLocalePrivate *d;
524 static const QLocalePrivate *default_d;
525};
526
527#endif
528</pre>
529<!-- eof -->
530<p><address><hr><div align=center>
531<table width=100% cellspacing=0 border=0><tr>
532<td>Copyright &copy; 2007
533<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
534<td align=right><div align=right>Qt 3.3.8</div>
535</table></div></address></body>
536</html>
Note: See TracBrowser for help on using the repository browser.