<?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">  </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <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 <i>type</i>, QVariant <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><<a href="qt.html#DayOfWeek-enum">Qt.DayOfWeek</a>> 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> <i>type</i>, QVariant <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 4.10.3 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt 4.8.5</td></tr></table></div></address></body></html>