| 1 |
/* |
| 2 |
* Copyright (C) 2015-2016 Canonical Ltd. |
| 3 |
* |
| 4 |
* This file is part of Lomiri Weather App |
| 5 |
* |
| 6 |
* Lomiri Weather App is free software: you can redistribute it and/or modify |
| 7 |
* it under the terms of the GNU General Public License version 3 as |
| 8 |
* published by the Free Software Foundation. |
| 9 |
* |
| 10 |
* Lomiri Weather App is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
import QtQuick 2.12 |
| 20 |
import Lomiri.Components 1.3 |
| 21 |
|
| 22 |
Item { |
| 23 |
id: locationPage |
| 24 |
height: listItem.height |
| 25 |
|
| 26 |
ListItem { |
| 27 |
id: listItem |
| 28 |
height: locationLayout.height |
| 29 |
divider.visible: false |
| 30 |
ListItemLayout { |
| 31 |
id: locationLayout |
| 32 |
title.text: i18n.tr("Detect current location") |
| 33 |
Switch { |
| 34 |
id: locationSwitch |
| 35 |
SlotsLayout.position: SlotsLayout.Last |
| 36 |
checked: settings.detectCurrentLocation |
| 37 |
onCheckedChanged: settings.detectCurrentLocation = checked; |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
onClicked: locationSwitch.checked = !locationSwitch.checked |
| 42 |
} |
| 43 |
} |