2020-11-06 14:20:52 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.popups 1.0
|
|
|
|
import shared.controls 1.0
|
2020-11-06 14:20:52 +00:00
|
|
|
|
2021-10-27 09:37:58 +00:00
|
|
|
RadioButtonSelector {
|
|
|
|
id: root
|
|
|
|
|
2020-11-06 14:20:52 +00:00
|
|
|
property string fleetName: ""
|
|
|
|
property string newFleet: ""
|
2021-10-27 09:37:58 +00:00
|
|
|
|
|
|
|
title: fleetName
|
2021-12-13 14:24:21 +00:00
|
|
|
// Not Refactored Yet
|
|
|
|
// checked: profileModel.fleets.fleet === root.fleetName
|
2021-10-27 09:37:58 +00:00
|
|
|
|
|
|
|
onCheckedChanged: {
|
2021-12-13 14:24:21 +00:00
|
|
|
// Not Refactored Yet
|
|
|
|
// if (checked) {
|
|
|
|
// if (profileModel.fleets.fleet === root.fleetName) return;
|
|
|
|
// root.newFleet = root.fleetName;
|
|
|
|
// Global.openPopup(confirmDialogComponent)
|
|
|
|
// }
|
2021-03-19 10:25:29 +00:00
|
|
|
}
|
2021-06-04 17:38:25 +00:00
|
|
|
|
|
|
|
Component {
|
|
|
|
id: confirmDialogComponent
|
|
|
|
ConfirmationDialog {
|
|
|
|
//% "Warning!"
|
2021-09-09 09:10:29 +00:00
|
|
|
header.title: qsTrId("close-app-title")
|
2021-06-04 17:38:25 +00:00
|
|
|
//% "Change fleet to %1"
|
2021-10-27 09:37:58 +00:00
|
|
|
confirmationText: qsTrId("change-fleet-to--1").arg(root.newFleet)
|
2021-12-13 14:24:21 +00:00
|
|
|
// Not Refactored Yet
|
|
|
|
// onConfirmButtonClicked: profileModel.fleets.setFleet(root.newFleet)
|
2021-06-04 17:38:25 +00:00
|
|
|
onClosed: {
|
2021-12-13 14:24:21 +00:00
|
|
|
// Not Refactored Yet
|
|
|
|
// profileModel.fleets.triggerFleetChange()
|
2021-06-04 17:38:25 +00:00
|
|
|
destroy();
|
|
|
|
}
|
|
|
|
}
|
2020-11-06 14:20:52 +00:00
|
|
|
}
|
|
|
|
}
|