70 lines
2.2 KiB
QML
70 lines
2.2 KiB
QML
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15
|
|
import QtQuick.Layouts 1.15
|
|
import org.kde.kirigami 2.20 as Kirigami
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
|
|
property alias cfg_ShowSkeleton: skeletonCheck.checked
|
|
property alias cfg_BaladaMode: baladaCheck.checked
|
|
property alias cfg_ChuvaMode: chuvaCheck.checked
|
|
property alias cfg_ShowConstellations: constellationsCheck.checked
|
|
property double cfg_Latitude
|
|
property double cfg_Longitude
|
|
|
|
spacing: Kirigami.Units.largeSpacing
|
|
|
|
Kirigami.FormLayout {
|
|
Layout.fillWidth: true
|
|
|
|
CheckBox {
|
|
id: skeletonCheck
|
|
Kirigami.FormData.label: i18n("Esqueleto:")
|
|
text: i18n("Mostrar o robô dançando")
|
|
}
|
|
|
|
CheckBox {
|
|
id: baladaCheck
|
|
Kirigami.FormData.label: i18n("Modo balada:")
|
|
text: i18n("Mirror ball + disco floor + refletores")
|
|
onCheckedChanged: if (checked) chuvaCheck.checked = false
|
|
}
|
|
|
|
CheckBox {
|
|
id: chuvaCheck
|
|
Kirigami.FormData.label: i18n("Modo chuva:")
|
|
text: i18n("Lua + chuva + relâmpagos")
|
|
onCheckedChanged: if (checked) baladaCheck.checked = false
|
|
}
|
|
|
|
CheckBox {
|
|
id: constellationsCheck
|
|
Kirigami.FormData.label: i18n("Constelações:")
|
|
text: i18n("Ligar estrelas e mostrar os nomes")
|
|
}
|
|
|
|
Kirigami.Separator { Kirigami.FormData.isSection: true }
|
|
|
|
// Observador do céu realista (aceita vírgula ou ponto decimal)
|
|
TextField {
|
|
id: latField
|
|
Kirigami.FormData.label: i18n("Latitude:")
|
|
Component.onCompleted: text = root.cfg_Latitude
|
|
onTextChanged: {
|
|
const v = parseFloat(text.replace(",", "."))
|
|
if (!isNaN(v) && v >= -90 && v <= 90) root.cfg_Latitude = v
|
|
}
|
|
}
|
|
|
|
TextField {
|
|
id: lonField
|
|
Kirigami.FormData.label: i18n("Longitude:")
|
|
Component.onCompleted: text = root.cfg_Longitude
|
|
onTextChanged: {
|
|
const v = parseFloat(text.replace(",", "."))
|
|
if (!isNaN(v) && v >= -180 && v <= 180) root.cfg_Longitude = v
|
|
}
|
|
}
|
|
}
|
|
}
|