Warning, /plasma/kdeplasma-addons/applets/comic/package/contents/ui/configAppearance.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *  SPDX-FileCopyrightText: 2015 Marco Martin <mart@kde.org>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 import QtQuick 2.1
0008 import QtQuick.Controls 2.5 as Controls
0009 import QtQuick.Layouts 1.1 as Layouts
0010 
0011 import org.kde.kirigami 2.20 as Kirigami
0012 import org.kde.plasma.plasmoid
0013 import org.kde.kcmutils as KCM
0014 
0015 KCM.SimpleKCM {
0016     id: root
0017 
0018     signal configurationChanged
0019 
0020     function saveConfig() {
0021         Plasmoid.arrowsOnHover = showArrowsOnOver.checked;
0022         Plasmoid.showComicTitle = showComicTitle.checked;
0023         Plasmoid.showComicIdentifier = showIdentifier.checked;
0024         Plasmoid.showComicAuthor = showAuthor.checked;
0025         Plasmoid.showComicUrl = showUrl.checked;
0026 
0027         Plasmoid.saveConfig();
0028         Plasmoid.configChanged();
0029     }
0030 
0031     Kirigami.FormLayout {
0032         Component.onCompleted: {
0033             showArrowsOnOver.checked = Plasmoid.arrowsOnHover;
0034             showComicTitle.checked = Plasmoid.showComicTitle;
0035             showIdentifier.checked = Plasmoid.showComicIdentifier;
0036             showAuthor.checked = Plasmoid.showComicAuthor;
0037             showUrl.checked = Plasmoid.showComicUrl;
0038         }
0039 
0040         Controls.CheckBox {
0041             id: showComicTitle
0042             Kirigami.FormData.label: i18nc ("Heading for showing various elements of a comic", "Show:")
0043             text: i18nc("@option:check", "Comic title")
0044             onCheckedChanged: root.configurationChanged();
0045         }
0046 
0047         Controls.CheckBox {
0048             id: showIdentifier
0049             text: i18nc("@option:check", "Comic identifier")
0050             onCheckedChanged: root.configurationChanged();
0051         }
0052 
0053         Controls.CheckBox {
0054             id: showAuthor
0055             text: i18nc("@option:check", "Comic author")
0056             onCheckedChanged: root.configurationChanged();
0057         }
0058 
0059         Controls.CheckBox {
0060             id: showUrl
0061             text: i18nc("@option:check", "Comic URL")
0062             onCheckedChanged: root.configurationChanged();
0063         }
0064 
0065         Item {
0066             Kirigami.FormData.isSection: true
0067         }
0068 
0069         Controls.RadioButton {
0070             id: alwaysShowArrows
0071             Kirigami.FormData.label: i18n ("Show navigation buttons:")
0072             text: i18nc("@option:check", "Always")
0073             checked: !showArrowsOnOver.checked
0074             onCheckedChanged: root.configurationChanged();
0075         }
0076 
0077         Controls.RadioButton {
0078             id: showArrowsOnOver
0079             text: i18nc("@option:check", "Only on hover")
0080             onCheckedChanged: root.configurationChanged();
0081         }
0082     }
0083 }