feat: latitude/longitude configuráveis para o céu realista
Padrão Toledo-PR (-24.72, -53.74); campos aceitam vírgula ou ponto. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015HtPHsTnDcLVSCiF5FGHZj
This commit is contained in:
parent
05e465e33f
commit
6415112f9a
3 changed files with 35 additions and 0 deletions
|
|
@ -9,6 +9,8 @@ ColumnLayout {
|
|||
property alias cfg_ShowSkeleton: skeletonCheck.checked
|
||||
property alias cfg_BaladaMode: baladaCheck.checked
|
||||
property alias cfg_ChuvaMode: chuvaCheck.checked
|
||||
property double cfg_Latitude
|
||||
property double cfg_Longitude
|
||||
|
||||
spacing: Kirigami.Units.largeSpacing
|
||||
|
||||
|
|
@ -34,5 +36,28 @@ ColumnLayout {
|
|||
text: i18n("Lua + chuva + relâmpagos")
|
||||
onCheckedChanged: if (checked) baladaCheck.checked = false
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue