Debian Codegraph @

tests/auto/qml/qqmllocale/data/functions.qml

raw
1 import QtQuick 2.0
2
3 QtObject {
4 property var locale: Qt.locale()
5
6 function setLocale(l) {
7 locale = Qt.locale(l)
8 }
9
10 function currencySymbol(type) {
11 if (type < 0)
12 return locale.currencySymbol()
13 else
14 return locale.currencySymbol(type)
15 }
16
17 function monthName(month,type) {
18 if (type < 0)
19 return locale.monthName(month)
20 else
21 return locale.monthName(month, type)
22 }
23
24 function standaloneMonthName(month,type) {
25 if (type < 0)
26 return locale.standaloneMonthName(month)
27 else
28 return locale.standaloneMonthName(month, type)
29 }
30
31 function dayName(month,type) {
32 if (type < 0)
33 return locale.dayName(month)
34 else
35 return locale.dayName(month, type)
36 }
37
38 function standaloneDayName(month,type) {
39 if (type < 0)
40 return locale.standaloneDayName(month)
41 else
42 return locale.standaloneDayName(month, type)
43 }
44
45 function dateTimeFormat(fmt) {
46 if (fmt < 0)
47 return locale.dateTimeFormat()
48 else
49 return locale.dateTimeFormat(fmt)
50 }
51
52 function dateFormat(fmt) {
53 if (fmt < 0)
54 return locale.dateFormat()
55 else
56 return locale.dateFormat(fmt)
57 }
58
59 function timeFormat(fmt) {
60 if (fmt < 0)
61 return locale.timeFormat()
62 else
63 return locale.timeFormat(fmt)
64 }
65 }