8import QtQuick.Controls as QQC2
9import org.kde.kirigami as Kirigami
10import org.kde.kosmindoorrouting
15 property routingProfile routingProfile
16 signal applyRoutingProfile()
18 title: i18n("Configure Routing Profile")
42 Kirigami.FormData.label:
"Cost factors"
66 id: streetCrossingCost
84 stairFlag.checked = root.routingProfile.flags & AreaFlag.Stairs;
85 escalatorFlag.checked = root.routingProfile.flags & AreaFlag.Escalator;
86 elevatorFlag.checked = root.routingProfile.flags & AreaFlag.Elevator;
88 stairCost.text = root.routingProfile.cost(AreaType.Stairs);
89 elevatorCost.text = root.routingProfile.cost(AreaType.Elevator);
90 escalatorCost.text = root.routingProfile.cost(AreaType.Escalator);
91 movingWalkwayCost.text = root.routingProfile.cost(AreaType.MovingWalkway);
92 tactilePavingCost.text = root.routingProfile.cost(AreaType.TactilePaving);
93 streetCrossingCost.text = root.routingProfile.cost(AreaType.StreetCrossing);
94 rampCost.text = root.routingProfile.cost(AreaType.Ramp);
95 roomCost.text = root.routingProfile.cost(AreaType.Room);
96 walkingCost.text = root.routingProfile.cost(AreaType.Walkable);
99 customFooterActions: [
102 icon.name: "dialog-ok-apply"
104 let flags = AreaFlag.Walkable;
105 if (stairFlag.checked)
106 flags |= AreaFlag.Stairs;
107 if (escalatorFlag.checked)
108 flags |= AreaFlag.Escalator;
109 if (elevatorFlag.checked)
110 flags |= AreaFlag.Elevator;
111 root.routingProfile.flags = flags;
113 root.routingProfile.setCost(AreaType.Stairs, stairCost.text);
114 root.routingProfile.setCost(AreaType.Elevator, elevatorCost.text);
115 root.routingProfile.setCost(AreaType.Escalator, escalatorCost.text);
116 root.routingProfile.setCost(AreaType.MovingWalkway, movingWalkwayCost.text);
117 root.routingProfile.setCost(AreaType.TactilePaving, tactilePavingCost.text);
118 root.routingProfile.setCost(AreaType.StreetCrossing, streetCrossingCost.text);
119 root.routingProfile.setCost(AreaType.Ramp, rampCost.text);
120 root.routingProfile.setCost(AreaType.Room, roomCost.text);
121 root.routingProfile.setCost(AreaType.Walkable, walkingCost.text);
124 root.applyRoutingProfile()
QString i18n(const char *text, const TYPE &arg...)