Populate the test of locale bindings
This commit is contained in:
parent
a820916926
commit
37dd4360d2
@ -23,43 +23,120 @@ import QtQuick 1.1
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.locale 0.1
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property int minimumHeight:200
|
||||
property int minimumWidth:500
|
||||
Column {
|
||||
id: column
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
spacing: 20
|
||||
Text {
|
||||
id: text
|
||||
anchors.horizontalCenter: column.horizontalCenter
|
||||
text: "<B>This is a test plasmoid for the locale bindings</B>"
|
||||
color: "red"
|
||||
}
|
||||
PlasmaComponents.Button {
|
||||
id: bt1
|
||||
anchors.horizontalCenter: column.horizontalCenter
|
||||
text: "click in order to test the Locale component"
|
||||
onClicked:{
|
||||
print("hello");
|
||||
Column {
|
||||
id: column
|
||||
anchors.horizontalCenter: root.horizontalCenter
|
||||
spacing: 20
|
||||
Text {
|
||||
id: text1
|
||||
anchors.horizontalCenter: column.horizontalCenter
|
||||
text: "<B>This is a test plasmoid for the locale bindings</B>"
|
||||
color: "black"
|
||||
}
|
||||
}
|
||||
PlasmaComponents.Button {
|
||||
id: bt2
|
||||
anchors.horizontalCenter: column.horizontalCenter
|
||||
text: "click in order to test the CalendarSystem component"
|
||||
onClicked:{
|
||||
print("hello again");
|
||||
|
||||
Text {
|
||||
id: text2
|
||||
anchors.horizontalCenter: column.horizontalCenter
|
||||
text: "<B>If you see this text,that means that every" +
|
||||
"non printable property/method has been already set. And it works!!</B>"
|
||||
color: "black"
|
||||
}
|
||||
}
|
||||
Locale {
|
||||
id: locale
|
||||
|
||||
PlasmaComponents.Button {
|
||||
id: bt1
|
||||
anchors.horizontalCenter: column.horizontalCenter
|
||||
text: "click in order to test the Locale component"
|
||||
onClicked:{
|
||||
console.log("=====Locale Component====")
|
||||
console.log("country:" + locale.country)
|
||||
|
||||
// locale.binaryUnitDialect = Locale.BinaryUnitDialect.IECBinaryDialect
|
||||
// locale.calendarSystem = CalendarSystem.CopticCalendar
|
||||
|
||||
locale.countryDivisionCode = "AL"
|
||||
console.log("countryDivisionCode:" + locale.countryDivisionCode)
|
||||
|
||||
//locale.currencyCode = "AFN" //TODO add the right value
|
||||
//console.log("currencyCode:" + locale.currencyCode)
|
||||
|
||||
//locale.currencySymbol = TODO
|
||||
//console.log("currencySymbol" + locale.currencySymbol)
|
||||
|
||||
locale.dateFormat = "Y"
|
||||
console.log("dateFormat:" + locale.dateFormat)
|
||||
|
||||
locale.dateFormatShort = "Y"
|
||||
console.log("dateFormatShort:" + locale.dateFormatShort)
|
||||
|
||||
locale.dateMonthNamePossessive = false
|
||||
console.log("dateMonthNamePossessive:" + locale.dateMonthNamePossessive)
|
||||
|
||||
console.log("===========end===========")
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaComponents.Button {
|
||||
id: bt2
|
||||
anchors.horizontalCenter: column.horizontalCenter
|
||||
text: "click in order to test the CalendarSystem component"
|
||||
onClicked:{
|
||||
console.log("=====CalendarSystem Component====")
|
||||
console.log("===============end===============")
|
||||
}
|
||||
}
|
||||
|
||||
Locale {
|
||||
id: locale
|
||||
binaryUnitDialect: BinaryUnitDialect.DefaultBinaryDialect
|
||||
onBinaryUnitDialectChanged: {
|
||||
console.log("the binaryUnitDialect property has been changed")
|
||||
}
|
||||
|
||||
calendarSystem: Locale.QDateCalendar
|
||||
onCalendarSystemChanged: {
|
||||
console.log("the calendarSystem property has been changed")
|
||||
}
|
||||
|
||||
//TODO:Add the proper value
|
||||
/*currencyCode: "AED"
|
||||
onCurrencyCodeChanged: {
|
||||
console.log("the currencyCode property has been changed")
|
||||
}*/
|
||||
|
||||
/*TODO
|
||||
currencySymbol: ""
|
||||
onCurrencySymbolChanged: {
|
||||
console.log("the currencySymbol property has been changed")
|
||||
}*/
|
||||
|
||||
countryDivisionCode: "AD"
|
||||
onCountryDivisionCodeChanged: {
|
||||
console.log("the countryDivisionCode property has been changed")
|
||||
}
|
||||
|
||||
dateFormat: "y"
|
||||
onDateFormatChanged: {
|
||||
console.log("the dateFormat property has been changed")
|
||||
}
|
||||
|
||||
dateFormatShort: "y"
|
||||
onDateFormatShortChanged: {
|
||||
console.log("the dateFormatShort property has been changed")
|
||||
}
|
||||
|
||||
dateMonthNamePossessive: true
|
||||
onDateMonthNamePossessiveChanged: {
|
||||
console.log("the dateMonthNamePossessive property has been changed")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CalendarSystem {
|
||||
id: calendar
|
||||
CalendarSystem {
|
||||
id: calendar
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user