Warning, /plasma/plasma-desktop/kcms/access/ui/ScreenReader.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2018 Tomaz Canabrava <tcanabrava@kde.org> 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.6 0008 import QtQuick.Layouts 1.1 0009 import QtQuick.Controls 2.12 as QQC2 0010 import org.kde.kcmutils as KCM 0011 import org.kde.kirigami 2.3 as Kirigami 0012 0013 Kirigami.FormLayout { 0014 property var screenReaderInstalled : null 0015 0016 QQC2.CheckBox { 0017 text: i18n("Enable Screen Reader") 0018 0019 KCM.SettingStateBinding { 0020 configObject: kcm.screenReaderSettings 0021 settingName: "Enabled" 0022 } 0023 0024 checked: kcm.screenReaderSettings.enabled 0025 onToggled: kcm.screenReaderSettings.enabled = checked 0026 } 0027 QQC2.Button { 0028 text: i18n("Launch Orca Screen Reader Configuration…") 0029 0030 enabled: !kcm.screenReaderSettings.isImmutable("Enabled") && screenReaderInstalled 0031 0032 onClicked: kcm.launchOrcaConfiguration() 0033 } 0034 QQC2.Label { 0035 text: kcm.orcaLaunchFeedback 0036 textFormat: Text.PlainText 0037 } 0038 QQC2.Label { 0039 Layout.fillWidth: true 0040 wrapMode: Text.Wrap 0041 text: screenReaderInstalled 0042 ? i18n("Please note that you may have to log out or reboot once to allow the screen reader to work properly.") 0043 : i18n("It appears that the Orca Screen Reader is not installed. Please install it before trying to use this feature, and then log out or reboot") 0044 textFormat: Text.PlainText 0045 } 0046 0047 onVisibleChanged: { 0048 if (visible === true && screenReaderInstalled === null) { 0049 screenReaderInstalled = kcm.orcaInstalled() 0050 } 0051 } 0052 }