Changeset View
Changeset View
Standalone View
Standalone View
src/plugins/bluetooth/bluetoothplugin_config.qml
Show All 12 Lines | |||||
13 | 13 | | |||
14 | You should have received a copy of the GNU Lesser General Public | 14 | You should have received a copy of the GNU Lesser General Public | ||
15 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | 15 | License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | import QtQuick 2.1 | 18 | import QtQuick 2.1 | ||
19 | import QtQuick.Layouts 1.1 | 19 | import QtQuick.Layouts 1.1 | ||
20 | import QtQuick.Controls 2.1 | 20 | import QtQuick.Controls 2.1 | ||
21 | import org.kde.kirigami 2.5 as Kirigami | ||||
21 | 22 | | |||
22 | import org.kde.bluezqt 1.0 as BluezQt | 23 | import org.kde.bluezqt 1.0 as BluezQt | ||
23 | 24 | | |||
24 | ListView { | 25 | ListView { | ||
25 | id: root | 26 | id: root | ||
26 | property string device: "" | 27 | property string device: "" | ||
27 | Layout.fillWidth: true | 28 | Layout.fillWidth: true | ||
28 | Layout.fillHeight: true | 29 | Layout.fillHeight: true | ||
29 | 30 | | |||
30 | header: Label { | 31 | header: Kirigami.Heading { | ||
31 | text: i18n("Choose a device to send to:") | 32 | text: i18n("Choose a device to send to:") | ||
32 | visible: root.count !== 0 | 33 | visible: root.count !== 0 | ||
34 | level: 1 | ||||
33 | } | 35 | } | ||
34 | model: BluezQt.DevicesModel { } | 36 | model: BluezQt.DevicesModel { } | ||
35 | 37 | | |||
36 | delegate: ItemDelegate { | 38 | delegate: Kirigami.BasicListItem { | ||
37 | width: parent.width | 39 | width: parent.width | ||
38 | text: Name | 40 | text: Name | ||
41 | icon: Icon | ||||
39 | onClicked: root.device = Ubi | 42 | onClicked: root.device = Ubi | ||
40 | checked: root.device === Ubi | 43 | checked: root.device === Ubi | ||
41 | highlighted: root.device === Ubi | 44 | highlighted: root.device === Ubi | ||
42 | } | 45 | } | ||
43 | 46 | | |||
44 | Label { | 47 | Label { | ||
45 | anchors.fill: parent | 48 | anchors.fill: parent | ||
46 | verticalAlignment: Qt.AlignVCenter | 49 | verticalAlignment: Qt.AlignVCenter | ||
47 | horizontalAlignment: Qt.AlignHCenter | 50 | horizontalAlignment: Qt.AlignHCenter | ||
48 | visible: root.count === 0 | 51 | visible: root.count === 0 | ||
49 | text: i18n("No devices found") | 52 | text: i18n("No devices found") | ||
50 | } | 53 | } | ||
51 | } | 54 | } |