This commit is contained in:
2026-02-24 22:57:14 +00:00
commit c9af844428
27 changed files with 1678 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import QtQuick
import org.kde.plasma.configuration
ConfigModel {
ConfigCategory {
name: i18n("General")
icon: "configure"
source: "configGeneral.qml"
}
}
+8
View File
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
<kcfgfile name=""/>
<group name="General"/>
</kcfg>
Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

+5
View File
@@ -0,0 +1,5 @@
import QtQuick
import org.kde.kcmutils as KCM
KCM.SimpleKCM {
}
+83
View File
@@ -0,0 +1,83 @@
import QtQuick
import QtQuick.Layouts
import "cppbridge" as CppBridge
import org.kde.kirigami as Kirigami
import org.kde.plasma.components as PlasmaComponents
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.plasmoid
PlasmoidItem {
id: root
// Widget setup
width: Kirigami.Units.gridUnit * 20
height: Kirigami.Units.gridUnit * 20
Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground
toolTipMainText: "katoclock"
Component.onCompleted: {
const initialized = clockBridge.initialize(Qt.resolvedUrl("assets/background.png"), Qt.resolvedUrl("assets/hand_hour.png"), Qt.resolvedUrl("assets/hand_minute.png"));
if (!initialized)
console.warn(clockBridge.errorString);
}
CppBridge.ClockBridge {
id: clockBridge
}
component ClockImageView: Item {
// asset image size -> 421x600, 1 is cropping artifact but I'll live with it
implicitWidth: 421
implicitHeight: 600
Image {
anchors.fill: parent
visible: clockBridge.ready
source: clockBridge.imageSource
fillMode: Image.PreserveAspectFit
asynchronous: true
cache: false
}
PlasmaComponents.Label {
anchors.fill: parent
visible: !clockBridge.ready
text: clockBridge.errorString.length > 0 ? clockBridge.errorString : "Loading..."
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.Wrap
}
}
// full representation (popup or desktop widget)
fullRepresentation: Item {
Layout.minimumWidth: Kirigami.Units.gridUnit * 12
Layout.minimumHeight: Kirigami.Units.gridUnit * 12
Layout.preferredWidth: root.width
Layout.preferredHeight: root.height
ClockImageView {
anchors.fill: parent
anchors.margins: Kirigami.Units.smallSpacing
}
}
// compact representation (icon in panel)
compactRepresentation: Item {
Layout.minimumWidth: Kirigami.Units.gridUnit * 6
Layout.minimumHeight: Kirigami.Units.gridUnit * 6
ClockImageView {
anchors.fill: parent
}
MouseArea {
anchors.fill: parent
onClicked: root.expanded = !root.expanded
}
}
}
+19
View File
@@ -0,0 +1,19 @@
{
"KPlugin": {
"Name": "KatoClock",
"Description": "Just a cat pointing you the time",
"Icon": "plasma",
"Category": "Development",
"Id": "katoclock.ruiny.de",
"Version": "1.0",
"Website": "https://github.com/ruinivist/katoclock",
"License": "GPL-3.0+",
"Authors": [
{
"Name": "ruinivist"
}
]
},
"X-Plasma-API-Minimum-Version": "6.0",
"KPackageStructure": "Plasma/Applet"
}