66 lines
1.7 KiB
QML
66 lines
1.7 KiB
QML
/*
|
|
* Config page for nl.a14r.bitcoinprice.
|
|
* Follows the canonical Plasma 5 config dialog pattern:
|
|
* Kirigami.FormLayout + cfg_ prefixed property aliases.
|
|
* Mode-specific settings are only visible for the matching style.
|
|
*/
|
|
|
|
import QtQuick 2.15
|
|
import QtQuick.Controls 2.15 as QQC2
|
|
import org.kde.kirigami 2.5 as Kirigami
|
|
|
|
Kirigami.FormLayout {
|
|
id: generalPage
|
|
|
|
// The cfg_ prefix is what Plasma uses to read/write plasmoid.configuration
|
|
property alias cfg_displayMode: modeCombo.currentIndex
|
|
property alias cfg_refreshMinutes: intervalSpin.value
|
|
property alias cfg_flapSeconds: flapSpin.value
|
|
property alias cfg_nixieFlicker: flickSpin.value
|
|
|
|
Item {
|
|
Kirigami.FormData.isSection: true
|
|
}
|
|
|
|
QQC2.ComboBox {
|
|
id: modeCombo
|
|
Kirigami.FormData.label: i18n("Display style:")
|
|
model: [i18n("Plain text"), i18n("Split-flap board"), i18n("Nixie tubes")]
|
|
}
|
|
|
|
QQC2.SpinBox {
|
|
id: flapSpin
|
|
visible: modeCombo.currentIndex === 1
|
|
Kirigami.FormData.label: i18n("Split-flap cascade (seconds):")
|
|
from: 1
|
|
to: 15
|
|
stepSize: 1
|
|
editable: true
|
|
}
|
|
|
|
QQC2.SpinBox {
|
|
id: flickSpin
|
|
visible: modeCombo.currentIndex === 2
|
|
Kirigami.FormData.label: i18n("Nixie flicker (0 = off):")
|
|
from: 0
|
|
to: 100
|
|
stepSize: 10
|
|
editable: true
|
|
}
|
|
|
|
QQC2.SpinBox {
|
|
id: intervalSpin
|
|
Kirigami.FormData.label: i18n("Refresh interval (minutes):")
|
|
from: 5
|
|
to: 1440
|
|
stepSize: 5
|
|
editable: true
|
|
}
|
|
|
|
QQC2.Label {
|
|
text: i18n("CoinGecko allows one request per 5 minutes; lower values are not possible.")
|
|
font.italic: true
|
|
opacity: 0.7
|
|
}
|
|
}
|