mirror of
https://gitgud.io/wackyideas/aerothemeplasma.git
synced 2024-08-15 00:43:43 +00:00
Very early KDE 6 release.
This commit is contained in:
parent
7cc4ccabbc
commit
686046d4f7
6272 changed files with 140920 additions and 529657 deletions
|
@ -0,0 +1,54 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import org.kde.plasma.plasmoid
|
||||
|
||||
RowLayout {
|
||||
id: configSpinBox
|
||||
|
||||
property string configKey: ''
|
||||
property alias to: spinBox.to
|
||||
property alias from: spinBox.from
|
||||
property alias prefix: spinBox.prefix
|
||||
property alias stepSize: spinBox.stepSize
|
||||
property alias suffix: spinBox.suffix
|
||||
property alias value: spinBox.value
|
||||
|
||||
property alias before: labelBefore.text
|
||||
property alias after: labelAfter.text
|
||||
|
||||
Label {
|
||||
id: labelBefore
|
||||
text: ""
|
||||
visible: text
|
||||
}
|
||||
|
||||
SpinBox {
|
||||
id: spinBox
|
||||
|
||||
property string prefix
|
||||
property string suffix
|
||||
|
||||
value: Plasmoid.configuration[configKey]
|
||||
// onValueChanged: Plasmoid.configuration[configKey] = value
|
||||
onValueChanged: serializeTimer.start()
|
||||
to: 2147483647
|
||||
|
||||
textFromValue: function(value) {
|
||||
return prefix + value + suffix;
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
id: labelAfter
|
||||
text: ""
|
||||
visible: text
|
||||
}
|
||||
|
||||
Timer { // throttle
|
||||
id: serializeTimer
|
||||
interval: 300
|
||||
onTriggered: Plasmoid.configuration[configKey] = value
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue