Verified Commit a666317f authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Port time kcm to Kirigami

parent 1914d35a
......@@ -19,7 +19,6 @@
import QtQuick 2.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
//import org.kde.active.settings.time 2.0
//import "private"
......
......@@ -20,7 +20,6 @@
import QtQuick 2.1
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
//import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
// import org.kde.active.settings.time 2.0
......
// -*- coding: iso-8859-1 -*-
/*
* Copyright 2011 Sebastian Kügler <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2 or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Library General Public License for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import QtQuick 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
Item {
id: svgButton
objectName: "svgButton"
width: 48
height: 48
property Item targetItem
MobileComponents.ActionButton {
id: closeButtonSvg
svg: iconsSvg
iconSize: 22
backgroundVisible: false
elementId: "close"
anchors {
//verticalCenter: parent.verticalCenter
centerIn: parent
//right: parent.right
//rightMargin: parent.margins.right
}
onClicked: {
targetItem.state = "closed";
}
}
}
......@@ -20,12 +20,10 @@
import QtQuick 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.1
import QtQuick.Controls 2.3 as Controls
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.kirigami 2.4 as Kirigami
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
import org.kde.kcm 1.0
Item {
......@@ -33,16 +31,13 @@ Item {
objectName: "timeModule"
ScrollView {
Controls.ScrollView {
id: scrollView
anchors {
fill: parent
}
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
flickableItem.flickableDirection: Flickable.VerticalFlick
GridLayout {
id: formLayout
......@@ -66,19 +61,19 @@ Item {
Layout.columnSpan: 2
}
PlasmaExtras.Heading {
Kirigami.Heading {
Layout.columnSpan: 2
// Layout.rowSpacing: units.gridUnit * 4
text: i18n("Time Display")
level: 3
}
PlasmaComponents.Label {
Controls.Label {
text: i18n("Use 24-hour clock:")
Layout.fillWidth: true
}
PlasmaComponents.Switch {
Controls.Switch {
id: twentyFourSwitch
checked: kcm.twentyFour
Layout.alignment : Qt.AlignRight
......@@ -88,13 +83,13 @@ Item {
}
}
PlasmaComponents.Label {
Controls.Label {
id: timeZoneLabel
text: i18n("Timezone:")
Layout.fillWidth: true
}
PlasmaComponents.Button {
Controls.Button {
id: timeZoneButton
text: kcm.timeZone
onClicked: timeZonePickerDialog.open()
......@@ -104,20 +99,20 @@ Item {
height: units.gridUnit
}
PlasmaExtras.Heading {
Kirigami.Heading {
Layout.columnSpan: 2
// Layout.rowSpacing: units.gridUnit * 4
text: i18n("Set Time and Date")
level: 3
}
PlasmaComponents.Label {
Controls.Label {
id: ntpLabel
text: i18n("Set time automatically:")
Layout.fillWidth: true
}
PlasmaComponents.Switch {
Controls.Switch {
id: ntpCheckBox
Layout.alignment : Qt.AlignRight
checked: kcm.useNtp
......@@ -129,7 +124,7 @@ Item {
}
}
}
PlasmaExtras.Heading {
Kirigami.Heading {
Layout.columnSpan: 2
// Layout.rowSpacing: units.gridUnit * 4
text: i18n("Set Time")
......@@ -179,7 +174,7 @@ Item {
}
}
PlasmaExtras.Heading {
Kirigami.Heading {
Layout.columnSpan: 2
// Layout.rowSpacing: units.gridUnit * 4
text: i18n("Set Date")
......
......@@ -22,7 +22,6 @@ import QtQuick 2.2
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.mobilecomponents 0.2 as MobileComponents
import org.kde.active.settings 2.0
import org.kde.kquickcontrolsaddons 2.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment