1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +02:00

Add available languages to choose from

This commit is contained in:
Elias 2019-01-16 19:55:32 +01:00
parent 35102ccbec
commit 1fcdece403

View File

@ -33,13 +33,12 @@ Item {
Column { Column {
id: columnWrapper id: columnWrapper
anchors.margins: 20 anchors.margins: 20
// height: 1200
width: 760 width: 760
spacing: 30 spacing: 30
Item { Item {
id: settingsGeneralWrapper id: settingsGeneralWrapper
height: 450 height: 520
width: parent.width width: parent.width
RectangularGlow { RectangularGlow {
@ -144,6 +143,7 @@ Item {
color: "#B5B5B5" color: "#B5B5B5"
height: 30 height: 30
width: parent.width width: parent.width
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
@ -156,6 +156,49 @@ Item {
} }
} }
SettingsHorizontalSeperator {
}
SettingsComboBox {
id: settingsLanguage
headline: qsTr("Language")
description: qsTr("Set the ScreenPlay UI Language")
onCurrentIndexChanged: {
var key = settingsLanguage.comboBoxListModel.get(
settingsLanguage.currentIndex).text.toString();
var languageKey;
switch (key) {
case "German":
languageKey = "de"
break;
case "English":
languageKey = "en"
break;
case "Russian":
languageKey = "ru"
break;
default:
languageKey = "en"
break;
}
print(key, languageKey)
screenPlaySettings.setqSetting("language", languageKey)
}
comboBoxListModel: ListModel {
ListElement {
text: "English"
}
ListElement {
text: "German"
}
ListElement {
text: "Russian"
}
}
}
} }
} }
} }
@ -229,6 +272,7 @@ Item {
comboBoxListModel: ListModel { comboBoxListModel: ListModel {
ListElement { ListElement {
text: "Stretch" text: "Stretch"
} }
ListElement { ListElement {
text: "PreserveAspectFit" text: "PreserveAspectFit"
@ -298,6 +342,7 @@ Item {
id: txtHeadline id: txtHeadline
color: "#5D5D5D" color: "#5D5D5D"
text: "Lore Ipsum" text: "Lore Ipsum"
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft
font.pixelSize: 16 font.pixelSize: 16
@ -312,6 +357,7 @@ Item {
id: txtDescriptionAbout id: txtDescriptionAbout
text: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. \n \n Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. " text: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. \n \n Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. "
color: "#B5B5B5" color: "#B5B5B5"
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
verticalAlignment: Text.AlignTop verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignLeft horizontalAlignment: Text.AlignLeft