calamares/src/modules/localeq/Offline.qml
demmm 34e7b06cc9 [localeq] move to QtLocation map based module
fully implemented:
* loading of a live map, ESRI based, zooming & dragging possible
* IP address is translated to map coordinates
* loading of the map centers to the obtained coordinates, with a marker set
* coordinates are translated to a timezone, label visible at bottom of the map
* mouse movement will show changing coordinates
* clicking on new location will center map there, marker moved too, timezone label adjusted
* hasInternet switch set to either load Map.qml or Offline.qml

not done:
* get hasInternet status
* fill the fine-tune 181n.qml with proper locale & language data
* connect the obtained timezone to globalstorage

comments are left in the various files for what needs attention/changes
2020-05-09 14:01:21 +02:00

81 lines
2.5 KiB
QML

/* === This file is part of Calamares - <https://github.com/calamares> ===
*
* Copyright 2020, Anke Boersma <demm@kaosx.us>
*
* Calamares is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Calamares is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Window 2.14
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.7 as Kirigami
Column {
width: parent.width
//Needs to come from localeq.conf
property var configTimezone: "America/New York"
Rectangle {
width: parent.width
height: parent.height / 1.28
Image {
id: image
anchors.fill: parent
source: "img/worldmap.png"
width: parent.width
}
}
Rectangle {
width: parent.width
height: 100
anchors.horizontalCenter: parent.horizontalCenter
Item {
id: location
Kirigami.Theme.inherit: false
Kirigami.Theme.colorSet: Kirigami.Theme.Complementary
anchors.horizontalCenter: parent.horizontalCenter
Rectangle {
anchors.centerIn: parent
width: 300
height: 30
color: Kirigami.Theme.backgroundColor
Text {
text: qsTr("Timezone: %1").arg(configTimezone)
color: Kirigami.Theme.textColor
anchors.centerIn: parent
}
}
}
Text {
anchors.top: location.bottom
anchors.topMargin: 20
padding: 10
width: parent.width
wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter
Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor
text: qsTr("To be able to select a timezone, make sure you are connected to the internet. Restart the installer after connecting. You can fine-tune Language and Locale settings below.")
}
}
}