Warning, /frameworks/purpose/src/plugins/bluetooth/bluetoothplugin_config.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com> 0003 0004 SPDX-License-Identifier: LGPL-2.1-or-later 0005 */ 0006 0007 import QtQuick 2.7 0008 import QtQuick.Layouts 1.1 0009 import QtQuick.Controls 2.5 0010 import org.kde.kirigami 2.12 as Kirigami 0011 0012 import org.kde.bluezqt 1.0 as BluezQt 0013 0014 ColumnLayout { 0015 0016 id: root 0017 property var device: undefined 0018 0019 anchors.bottomMargin: Kirigami.Units.smallSpacing 0020 0021 Kirigami.Heading { 0022 text: i18nd("purpose6_bluetooth", "Choose a device to send to:") 0023 visible: list.count !== 0 0024 level: 1 0025 } 0026 0027 ScrollView { 0028 id: scroll 0029 0030 Layout.fillWidth: true 0031 Layout.fillHeight: true 0032 0033 // Make sure we have space to show the placeholdermessage when no explicit size is set 0034 contentHeight: list.count !== 0 ? implicitContentHeight : Kirigami.Units.gridUnit * 3 0035 0036 Component.onCompleted: scroll.background.visible = true 0037 0038 ListView { 0039 id: list 0040 0041 // Don't select anything by default; make the user choose explicitly 0042 currentIndex: -1 0043 0044 clip: true 0045 model: BluezQt.DevicesModel { } 0046 0047 delegate: ItemDelegate { 0048 width: ListView.view.width 0049 text: Name 0050 icon.name: Icon 0051 onClicked: root.device = Ubi 0052 checked: root.device === Ubi 0053 highlighted: root.device === Ubi 0054 } 0055 0056 Kirigami.PlaceholderMessage { 0057 anchors.centerIn: parent 0058 width: parent.width - (Kirigami.Units.largeSpacing * 4) 0059 visible: list.count === 0 0060 text: i18nd("purpose6_bluetooth", "No devices found") 0061 } 0062 } 0063 } 0064 }