Warning, /plasma/bluedevil/src/applet/package/contents/ui/Toolbar.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2013-2014 Jan Grulich <jgrulich@redhat.com>
0003     SPDX-FileCopyrightText: 2014-2015 David Rosca <nowrep@gmail.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007 
0008 import QtQuick 2.15
0009 import QtQuick.Layouts 1.15
0010 
0011 import org.kde.plasma.components 3.0 as PlasmaComponents3
0012 import org.kde.plasma.core as PlasmaCore
0013 import org.kde.kirigami 2.20 as Kirigami
0014 import org.kde.plasma.extras 2.0 as PlasmaExtras
0015 import org.kde.plasma.plasmoid 2.0
0016 
0017 import org.kde.kquickcontrolsaddons 2.0
0018 
0019 PlasmaExtras.PlasmoidHeading {
0020     id: toolbar
0021 
0022     property alias onSwitch: onSwitch
0023 
0024     leftPadding: mirrored ? 0 : Kirigami.Units.smallSpacing
0025     rightPadding: mirrored ? Kirigami.Units.smallSpacing : 0
0026 
0027     contentItem: RowLayout {
0028         spacing: Kirigami.Units.smallSpacing
0029 
0030         PlasmaComponents3.Switch {
0031             id: onSwitch
0032             text: i18n("Enable Bluetooth")
0033             icon.name: "preferences-system-bluetooth-symbolic"
0034             checked: btManager.bluetoothOperational
0035             enabled: btManager.bluetoothBlocked || btManager.adapters.length > 0
0036             focus: bluetoothApplet.expanded
0037             onToggled: toggleBluetooth()
0038         }
0039 
0040         Item {
0041             Layout.fillWidth: true
0042         }
0043 
0044         PlasmaComponents3.ToolButton {
0045             id: addDeviceButton
0046 
0047             property QtObject /*QAction*/ qAction: bluetoothApplet.addDeviceAction
0048 
0049             visible: !(Plasmoid.containmentDisplayHints & PlasmaCore.Types.ContainmentDrawsPlasmoidHeading)
0050             enabled: qAction.visible
0051 
0052             icon.name: "list-add-symbolic"
0053 
0054             onClicked: qAction.trigger()
0055 
0056             PlasmaComponents3.ToolTip {
0057                 text: addDeviceButton.qAction.text
0058             }
0059             Accessible.name: qAction.text
0060         }
0061 
0062         PlasmaComponents3.ToolButton {
0063             id: openSettingsButton
0064 
0065             property QtObject /*QAction*/ qAction: Plasmoid.internalAction("configure")
0066 
0067             visible: !(Plasmoid.containmentDisplayHints & PlasmaCore.Types.ContainmentDrawsPlasmoidHeading)
0068             icon.name: "configure-symbolic"
0069             onClicked: qAction.trigger()
0070 
0071             PlasmaComponents3.ToolTip {
0072                 text: openSettingsButton.qAction.text
0073             }
0074             Accessible.name: qAction.text
0075         }
0076     }
0077 }