Warning, /plasma/kdeplasma-addons/applets/colorpicker/package/contents/ui/configGeneral.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 * SPDX-FileCopyrightText: 2015 Kai Uwe Broulik <kde@privat.broulik.de>
0003 *
0004 * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006
0007 import QtQuick 2.0
0008 import QtQuick.Controls 2.5 as QQC2
0009 import org.kde.kirigami 2.5 as Kirigami
0010 import org.kde.kcmutils as KCM
0011
0012 import "logic.js" as Logic
0013
0014 KCM.SimpleKCM {
0015 property alias cfg_autoClipboard: autoClipboardCheckBox.checked
0016 property alias cfg_compactPreviewCount: compactPreviewCountSpinBox.value
0017 property string cfg_defaultFormat
0018 property bool cfg_pickOnActivate
0019
0020 Kirigami.FormLayout {
0021 QQC2.ComboBox {
0022 id: defaultFormatCombo
0023 Kirigami.FormData.label: i18nc("@label:listbox", "Default color format:")
0024 model: Logic.formats
0025 currentIndex: defaultFormatCombo.model.indexOf(cfg_defaultFormat)
0026 onActivated: cfg_defaultFormat = model[index]
0027 }
0028
0029 QQC2.CheckBox {
0030 id: autoClipboardCheckBox
0031 text: i18nc("@option:check", "Automatically copy color to clipboard")
0032 }
0033
0034 Item {
0035 Kirigami.FormData.isSection: true
0036 }
0037
0038 QQC2.RadioButton {
0039 Kirigami.FormData.label: i18nc("@label", "When pressing the keyboard shortcut:")
0040 text: i18nc("@option:radio", "Pick a color")
0041 checked: cfg_pickOnActivate
0042 onCheckedChanged: cfg_pickOnActivate = checked
0043 }
0044
0045 QQC2.RadioButton {
0046 text: i18nc("@option:radio", "Show history")
0047 checked: !cfg_pickOnActivate
0048 }
0049
0050 Item {
0051 Kirigami.FormData.isSection: true
0052 }
0053
0054 QQC2.SpinBox {
0055 id: compactPreviewCountSpinBox
0056 Kirigami.FormData.label: i18nc("@label", "Preview count:")
0057 from: 0
0058 to: 9 /* root.maxColorCount */
0059 }
0060 }
0061 }