tSettingsPage.qml - sailfish-safe - Sailfish frontend for safe(1)
(HTM) git clone git://git.z3bra.org/sailfish-safe.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
tSettingsPage.qml (1982B)
---
1 /*
2 * Copyright (C) 2019 Daniel Vrátil <dvratil@kde.org>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18 import QtQuick 2.0
19 import Sailfish.Silica 1.0
20 import QtQuick 2.0
21 import harbour.safe 0.1
22
23 Dialog {
24 id: settingsDialog
25
26 onAccepted: {
27 Settings.expirationTimeout = expirationSlider.sliderValue
28 Settings.save()
29 }
30
31 DialogHeader {
32 id: dialogHeader
33 width: parent.width
34 }
35
36 SilicaFlickable {
37 anchors {
38 left: parent.left
39 right: parent.right
40 top: dialogHeader.bottom
41 bottom: parent.bottom
42 leftMargin: Theme.horizontalPageMargin
43 rightMargin: Theme.horizontalPageMargin
44 }
45
46 Column {
47 spacing: Theme.paddingMedium
48 width: parent.width
49
50 Label {
51 text: qsTr("Password expiration")
52 }
53 Slider {
54 id: expirationSlider
55 width: parent.width
56
57 minimumValue: 10
58 maximumValue: 120
59 stepSize: 1
60 //: number of seconds
61 valueText: qsTr("%1 s").arg(sliderValue)
62
63 Component.onCompleted: value = Settings.expirationTimeout
64 }
65 }
66
67 VerticalScrollDecorator {
68 flickable: parent
69 }
70 }
71 }