1.6 KiB · text History db86591
import QtQuick
import QtQuick.Controls as QQC2
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.kcmutils as KCM

KCM.SimpleKCM {
    id: configBehavior

    property alias cfg_updateInterval: updateIntervalSpinBox.value
    property alias cfg_activeInterval: activeIntervalSpinBox.value
    property alias cfg_runsPerRepo: runsPerRepoSpinBox.value
    property alias cfg_hideIdle: hideIdleCheckBox.checked

    Kirigami.FormLayout {
        QQC2.SpinBox {
            id: updateIntervalSpinBox
            Kirigami.FormData.label: i18n("Refresh every (seconds):")
            from: 10
            to: 3600
            value: 60
        }

        QQC2.SpinBox {
            id: activeIntervalSpinBox
            Kirigami.FormData.label: i18n("While a run is in flight (seconds):")
            from: 2
            to: 300
            value: 5
        }

        QQC2.Label {
            Layout.fillWidth: true
            wrapMode: Text.WordWrap
            font: Kirigami.Theme.smallFont
            color: Kirigami.Theme.disabledTextColor
            text: i18n("While anything is queued or running the widget polls faster, and only refetches repositories whose status moved.")
        }

        QQC2.SpinBox {
            id: runsPerRepoSpinBox
            Kirigami.FormData.label: i18n("Runs listed per repository:")
            from: 1
            to: 50
            value: 10
        }

        QQC2.CheckBox {
            id: hideIdleCheckBox
            Kirigami.FormData.label: i18n("Circles:")
            text: i18n("Hide repositories that have never run CI")
        }
    }
}