<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qlocale.qdoc --> <title>Qt 4.8: QSystemLocale Class Reference</title> <link rel="stylesheet" type="text/css" href="style/style.css" /> <script src="scripts/jquery.js" type="text/javascript"></script> <script src="scripts/functions.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="style/superfish.css" /> <link rel="stylesheet" type="text/css" href="style/narrow.css" /> <!--[if IE]> <meta name="MSSmartTagsPreventParsing" content="true"> <meta http-equiv="imagetoolbar" content="no"> <![endif]--> <!--[if lt IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie6.css"> <![endif]--> <!--[if IE 7]> <link rel="stylesheet" type="text/css" href="style/style_ie7.css"> <![endif]--> <!--[if IE 8]> <link rel="stylesheet" type="text/css" href="style/style_ie8.css"> <![endif]--> <script src="scripts/superfish.js" type="text/javascript"></script> <script src="scripts/narrow.js" type="text/javascript"></script> </head> <body class="" onload="CheckEmptyAndLoadList();"> <div class="header" id="qtdocheader"> <div class="content"> <div id="nav-logo"> <a href="index.html">Home</a></div> <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a> <div id="narrowsearch"></div> <div id="nav-topright"> <ul> <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li> <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li> <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/"> DOC</a></li> <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li> </ul> </div> <div id="shortCut"> <ul> <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li> <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS </a></li> </ul> </div> <ul class="sf-menu" id="narrowmenu"> <li><a href="#">API Lookup</a> <ul> <li><a href="classes.html">Class index</a></li> <li><a href="functions.html">Function index</a></li> <li><a href="modules.html">Modules</a></li> <li><a href="namespaces.html">Namespaces</a></li> <li><a href="qtglobal.html">Global Declarations</a></li> <li><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </li> <li><a href="#">Qt Topics</a> <ul> <li><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li><a href="supported-platforms.html">Supported Platforms</a></li> <li><a href="technology-apis.html">Qt and Key Technologies</a></li> <li><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </li> <li><a href="#">Examples</a> <ul> <li><a href="all-examples.html">Examples</a></li> <li><a href="tutorials.html">Tutorials</a></li> <li><a href="demos.html">Demos</a></li> <li><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </li> </ul> </div> </div> <div class="wrapper"> <div class="hd"> <span></span> </div> <div class="bd group"> <div class="sidebar"> <div class="searchlabel"> Search index:</div> <div class="search" id="sidebarsearch"> <form id="qtdocsearch" action="" onsubmit="return false;"> <fieldset> <input type="text" name="searchstring" id="pageType" value="" /> <div id="resultdialog"> <a href="#" id="resultclose">Close</a> <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span> results:</p> <ul id="resultlist" class="all"> </ul> </div> </fieldset> </form> </div> <div class="box first bottombar" id="lookup"> <h2 title="API Lookup"><span></span> API Lookup</h2> <div id="list001" class="list"> <ul id="ul001" > <li class="defaultLink"><a href="classes.html">Class index</a></li> <li class="defaultLink"><a href="functions.html">Function index</a></li> <li class="defaultLink"><a href="modules.html">Modules</a></li> <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li> <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li> <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li> </ul> </div> </div> <div class="box bottombar" id="topics"> <h2 title="Qt Topics"><span></span> Qt Topics</h2> <div id="list002" class="list"> <ul id="ul002" > <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> <li class="defaultLink"><a href="qtquick.html">Device UIs & Qt Quick</a></li> <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li> <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> </ul> </div> </div> <div class="box" id="examples"> <h2 title="Examples"><span></span> Examples</h2> <div id="list003" class="list"> <ul id="ul003"> <li class="defaultLink"><a href="all-examples.html">Examples</a></li> <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li> <li class="defaultLink"><a href="demos.html">Demos</a></li> <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li> </ul> </div> </div> </div> <div class="wrap"> <div class="toolbar"> <div class="breadcrumb toolblock"> <ul> <li class="first"><a href="index.html">Home</a></li> <!-- Breadcrumbs go here --> <li><a href="modules.html">Modules</a></li> <li><a href="qtcore.html">QtCore</a></li> <li>QSystemLocale</li> </ul> </div> <div class="toolbuttons toolblock"> <ul> <li id="smallA" class="t_button">A</li> <li id="medA" class="t_button active">A</li> <li id="bigA" class="t_button">A</li> <li id="print" class="t_button"><a href="javascript:this.print();"> <span>Print</span></a></li> </ul> </div> </div> <div class="content mainContent"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-types">Public Types</a></li> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <h1 class="title">QSystemLocale Class Reference</h1> <!-- $$$QSystemLocale-brief --> <p>The QSystemLocale class can be used to finetune the system locale of the user. <a href="#details">More...</a></p> <!-- @@@QSystemLocale --> <pre class="cpp"> <span class="preprocessor">#include <QSystemLocale></span></pre><p>This class was introduced in Qt 4.2.</p> <ul> <li><a href="qsystemlocale-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-types"></a> <h2>Public Types</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> class </td><td class="memItemRight bottomAlign"><b><a href="qsystemlocale-currencytostringargument.html">CurrencyToStringArgument</a></b></td></tr> <tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qsystemlocale.html#QueryType-enum">QueryType</a></b> { LanguageId, ScriptId, CountryId, DecimalPoint, ..., NativeCountryName }</td></tr> </table> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qsystemlocale.html#QSystemLocale">QSystemLocale</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qsystemlocale.html#dtor.QSystemLocale">~QSystemLocale</a></b> ()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QLocale </td><td class="memItemRight bottomAlign"><b><a href="qsystemlocale.html#fallbackLocale">fallbackLocale</a></b> () const</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QVariant </td><td class="memItemRight bottomAlign"><b><a href="qsystemlocale.html#query">query</a></b> ( QueryType <i>type</i>, QVariant <i>in</i> ) const</td></tr> </table> <a name="details"></a> <!-- $$$QSystemLocale-description --> <div class="descr"> <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> </div> <p><b>See also </b><a href="qlocale.html">QLocale</a>.</p> <!-- @@@QSystemLocale --> <div class="types"> <h2>Member Type Documentation</h2> <!-- $$$QueryType$$$LanguageId$$$CountryId$$$DecimalPoint$$$GroupSeparator$$$ZeroDigit$$$NegativeSign$$$DateFormatLong$$$DateFormatShort$$$TimeFormatLong$$$TimeFormatShort$$$DayNameLong$$$DayNameShort$$$MonthNameLong$$$MonthNameShort$$$DateToStringLong$$$DateToStringShort$$$TimeToStringLong$$$TimeToStringShort$$$DateTimeFormatLong$$$DateTimeFormatShort$$$DateTimeToStringLong$$$DateTimeToStringShort$$$MeasurementSystem$$$PositiveSign$$$AMText$$$PMText$$$FirstDayOfWeek$$$Weekdays$$$CurrencySymbol$$$CurrencyToString$$$UILanguages$$$StringToStandardQuotation$$$StringToAlternateQuotation$$$ScriptId$$$ListToSeparatedString$$$LocaleChanged$$$NativeLanguageName$$$NativeCountryName$$$StandaloneMonthNameLong$$$StandaloneMonthNameShort --> <h3 class="fn"><a name="QueryType-enum"></a>enum QSystemLocale::<span class="name">QueryType</span></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 valign="top" class="odd"><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> <!-- @@@QueryType --> </div> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QSystemLocale[overload1]$$$QSystemLocale --> <h3 class="fn"><a name="QSystemLocale"></a>QSystemLocale::<span class="name">QSystemLocale</span> ()</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> <!-- @@@QSystemLocale --> <!-- $$$~QSystemLocale[overload1]$$$~QSystemLocale --> <h3 class="fn"><a name="dtor.QSystemLocale"></a>QSystemLocale::<span class="name">~QSystemLocale</span> ()<tt> [virtual]</tt></h3> <p>Deletes the object.</p> <!-- @@@~QSystemLocale --> <!-- $$$fallbackLocale[overload1]$$$fallbackLocale --> <h3 class="fn"><a name="fallbackLocale"></a><span class="type"><a href="qlocale.html">QLocale</a></span> QSystemLocale::<span class="name">fallbackLocale</span> () const<tt> [virtual]</tt></h3> <p>Returns the fallback locale obtained from the system.</p> <p>This function was introduced in Qt 4.6.</p> <!-- @@@fallbackLocale --> <!-- $$$query[overload1]$$$queryQueryTypeQVariant --> <h3 class="fn"><a name="query"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QSystemLocale::<span class="name">query</span> ( <span class="type"><a href="qsystemlocale.html#QueryType-enum">QueryType</a></span> <i>type</i>, <span class="type"><a href="qvariant.html">QVariant</a></span> <i>in</i> ) const<tt> [virtual]</tt></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> <!-- @@@query --> </div> </div> </div> </div> <div class="ft"> <span></span> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its subsidiaries. Documentation contributions included herein are the copyrights of their respective owners.</p> <br /> <p> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.</p> <p> Documentation sources may be obtained from <a href="http://www.qt-project.org"> www.qt-project.org</a>.</p> <br /> <p> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. <a title="Privacy Policy" href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p> </div> <script src="scripts/functions.js" type="text/javascript"></script> </body> </html>