[localeq] Hit QML file with a hammer
- io.calamares.modules doesn't exist - ResponsiveBase doesn't exist The module is now non-functional, but at least it loads and renders a list of regions and zones.
This commit is contained in:
parent
54b8ad5475
commit
6c418402e3
@ -199,5 +199,4 @@ void LocaleQmlViewStep::setConfigurationMap(const QVariantMap& configurationMap)
|
|||||||
|
|
||||||
checkRequirements();
|
checkRequirements();
|
||||||
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
|
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
|
||||||
setContextProperty( "Localeq", m_config );
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import io.calamares.modules 1.0 as Modules
|
import io.calamares.core 1.0
|
||||||
import io.calamares.ui 1.0
|
import io.calamares.ui 1.0
|
||||||
|
|
||||||
import QtQuick 2.10
|
import QtQuick 2.10
|
||||||
@ -7,104 +7,30 @@ import QtQuick.Layouts 1.3
|
|||||||
import org.kde.kirigami 2.7 as Kirigami
|
import org.kde.kirigami 2.7 as Kirigami
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
|
||||||
ResponsiveBase
|
RowLayout
|
||||||
{
|
{
|
||||||
id: control
|
Rectangle {
|
||||||
|
width: parent.width / 3
|
||||||
Modules.Locale //locale handler
|
|
||||||
{
|
|
||||||
id: _locale
|
|
||||||
}
|
|
||||||
|
|
||||||
title: stackView.currentItem.title
|
|
||||||
subtitle: stackView.currentItem.subtitle
|
|
||||||
message: stackView.currentItem.message
|
|
||||||
|
|
||||||
stackView.initialItem: Item
|
|
||||||
{
|
|
||||||
id: _regionsListComponent
|
|
||||||
|
|
||||||
property string title: qsTr("Region")
|
|
||||||
property string subtitle: qsTr("Pick your preferred region or use the default one based on your current location")
|
|
||||||
property string message: qsTr("Select your preferred zone within your location to continue with the installation")
|
|
||||||
|
|
||||||
ListViewTemplate
|
|
||||||
{
|
|
||||||
id: _regionListView
|
|
||||||
anchors.centerIn: parent
|
|
||||||
implicitWidth: Math.min(parent.width, 500)
|
|
||||||
implicitHeight: Math.min(contentHeight, 500)
|
|
||||||
currentIndex: model.currentIndex
|
|
||||||
model: _locale.Config.regionModel
|
|
||||||
|
|
||||||
delegate: ListItemDelegate
|
|
||||||
{
|
|
||||||
id: _delegate
|
|
||||||
label1.text: model.label
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
_regionListView.model.currentIndex = index
|
|
||||||
_stackView.push(_zonesListComponent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer: RowLayout
|
|
||||||
{
|
|
||||||
width: parent.width
|
|
||||||
z: 99999
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Timezones")
|
ColumnLayout {
|
||||||
icon.name: "go-previous"
|
id: regions
|
||||||
onClicked: control.stackView.push(_zonesListComponent)
|
Repeater {
|
||||||
|
model: config.regionModel
|
||||||
|
Text {
|
||||||
|
text: label
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width / 3
|
||||||
Component
|
|
||||||
{
|
|
||||||
id: _zonesListComponent
|
|
||||||
|
|
||||||
Item
|
|
||||||
{
|
|
||||||
property string title: qsTr("Timezone")
|
|
||||||
property string subtitle: _locale.Config.prettyStatus
|
|
||||||
property string message: ""
|
|
||||||
ListViewTemplate
|
|
||||||
{
|
|
||||||
id: _zonesListView
|
|
||||||
anchors.centerIn: parent
|
|
||||||
implicitWidth: Math.min(parent.width, 500)
|
|
||||||
implicitHeight: Math.min(contentHeight, 500)
|
|
||||||
currentIndex: model.currentIndex
|
|
||||||
model: _locale.Config.zonesModel
|
|
||||||
|
|
||||||
delegate: ListItemDelegate
|
|
||||||
{
|
|
||||||
id: _delegate
|
|
||||||
label1.text: model.label
|
|
||||||
onClicked:
|
|
||||||
{
|
|
||||||
_zonesListView.model.currentIndex = index
|
|
||||||
positionViewAtIndex(index, ListView.Center)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer: RowLayout
|
|
||||||
{
|
|
||||||
width: parent.width
|
|
||||||
z: 99999
|
|
||||||
|
|
||||||
Button
|
|
||||||
{
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
icon.name: "go-previous"
|
ColumnLayout {
|
||||||
text: qsTr("Regions")
|
id: zones
|
||||||
onClicked: control.stackView.pop()
|
Repeater {
|
||||||
}
|
model: config.zonesModel
|
||||||
|
Text {
|
||||||
|
text: label
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user