2022-10-13 20:56:25 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
|
|
|
|
import AppLayouts.Profile.views 1.0
|
|
|
|
import AppLayouts.Profile.stores 1.0
|
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
|
|
|
|
LanguageView {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
contentWidth: parent.width
|
|
|
|
|
|
|
|
languageStore: LanguageStore {
|
2022-11-10 14:28:53 +00:00
|
|
|
property string currentLanguage: "en"
|
2022-10-13 20:56:25 +00:00
|
|
|
|
|
|
|
readonly property ListModel languageModel: ListModel {
|
|
|
|
ListElement {
|
|
|
|
locale: "ar"
|
|
|
|
name: "Arabic"
|
|
|
|
shortName: "العربية"
|
|
|
|
flag: "🇸🇦"
|
|
|
|
state: 0
|
2022-11-10 14:28:53 +00:00
|
|
|
selected: false
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
|
|
|
ListElement {
|
|
|
|
locale: "en"
|
|
|
|
name: "English"
|
|
|
|
shortName: "English"
|
|
|
|
flag: "🏴"
|
|
|
|
state: 2
|
2022-11-10 14:28:53 +00:00
|
|
|
selected: true
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-10 14:28:53 +00:00
|
|
|
function changeLanguage(language) {
|
|
|
|
logs.logEvent("languageStore::changeLanguage", ["language"], arguments)
|
|
|
|
currentLanguage = language
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
currencyStore: QtObject {
|
2023-01-17 20:05:21 +00:00
|
|
|
property string currentCurrency: "USD"
|
2022-11-10 14:28:53 +00:00
|
|
|
property string currentCurrencySymbol: "$"
|
2022-10-13 20:56:25 +00:00
|
|
|
|
|
|
|
readonly property ListModel currenciesModel: ListModel {
|
|
|
|
ListElement {
|
|
|
|
key: "usd"
|
|
|
|
shortName: "USD"
|
|
|
|
name: "US Dollars"
|
|
|
|
symbol: "$"
|
|
|
|
category: ""
|
2022-11-10 14:28:53 +00:00
|
|
|
imageSource: "../../assets/twemoji/svg/1f1fa-1f1f8.svg"
|
|
|
|
selected: true
|
2022-10-13 20:56:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ListElement {
|
|
|
|
key: "gbp"
|
|
|
|
shortName: "GBP"
|
|
|
|
name: "British Pound"
|
|
|
|
symbol: "£"
|
|
|
|
category: ""
|
2022-11-10 14:28:53 +00:00
|
|
|
imageSource: "../../assets/twemoji/svg/1f1ec-1f1e7.svg"
|
2022-10-13 20:56:25 +00:00
|
|
|
selected: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function updateCurrenciesModel() {
|
|
|
|
logs.logEvent("currencyStore::updateCurrenciesModel")
|
|
|
|
}
|
|
|
|
|
|
|
|
function updateCurrency(currencyKey) {
|
|
|
|
logs.logEvent("currencyStore::updateCurrency", ["currencyKey"], arguments)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 200
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Control {
|
|
|
|
SplitView.minimumWidth: 300
|
|
|
|
SplitView.preferredWidth: 300
|
|
|
|
|
|
|
|
font.pixelSize: 13
|
|
|
|
|
|
|
|
// model editor will go here
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-07-31 12:21:14 +00:00
|
|
|
// category: Components
|