Changeset View
Changeset View
Standalone View
Standalone View
applets/binary-clock/package/contents/ui/main.qml
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | 33 | Item { | |||
---|---|---|---|---|---|
44 | 44 | | |||
45 | Plasmoid.toolTipMainText: Qt.formatDate(dataSource.data["Local"]["DateTime"], "dddd") | 45 | Plasmoid.toolTipMainText: Qt.formatDate(dataSource.data["Local"]["DateTime"], "dddd") | ||
46 | Plasmoid.toolTipSubText: Qt.formatDate(dataSource.data["Local"]["DateTime"], Qt.locale().dateFormat(Locale.LongFormat).replace(/(^dddd.?\s)|(,?\sdddd$)/, "")) | 46 | Plasmoid.toolTipSubText: Qt.formatDate(dataSource.data["Local"]["DateTime"], Qt.locale().dateFormat(Locale.LongFormat).replace(/(^dddd.?\s)|(,?\sdddd$)/, "")) | ||
47 | 47 | | |||
48 | PlasmaCore.DataSource { | 48 | PlasmaCore.DataSource { | ||
49 | id: dataSource | 49 | id: dataSource | ||
50 | engine: "time" | 50 | engine: "time" | ||
51 | connectedSources: ["Local"] | 51 | connectedSources: ["Local"] | ||
52 | interval: showSeconds ? 1000 : 30000 | 52 | intervalAlignment: plasmoid.configuration.showSeconds ? PlasmaCore.Types.NoAlignment : PlasmaCore.Types.AlignToMinute | ||
53 | interval: showSeconds ? 1000 : 60000 | ||||
53 | onDataChanged: { | 54 | onDataChanged: { | ||
54 | var date = new Date(data["Local"]["DateTime"]); | 55 | var date = new Date(data["Local"]["DateTime"]); | ||
55 | hours = date.getHours(); | 56 | hours = date.getHours(); | ||
56 | minutes = date.getMinutes(); | 57 | minutes = date.getMinutes(); | ||
57 | seconds = date.getSeconds(); | 58 | seconds = date.getSeconds(); | ||
58 | } | 59 | } | ||
59 | Component.onCompleted: { | 60 | Component.onCompleted: { | ||
60 | onDataChanged(); | 61 | onDataChanged(); | ||
Show All 13 Lines |