21
21
import QMenuModel 0.1
23
23
import SystemSettings 1.0
24
import SystemSettings.ListItems 1.0 as SettingsListItems
24
25
import Ubuntu.Components 1.3
25
26
import Ubuntu.Components.Popups 1.3
26
import Ubuntu.Components.ListItems 1.3 as ListItem
27
27
import Ubuntu.SystemSettings.Bluetooth 1.0
97
97
right: parent.right
100
ListItem.SingleValue {
100
SettingsListItems.SingleValue {
101
101
text: i18n.tr("Name")
102
102
value: backend.selectedDevice &&
103
103
backend.selectedDevice.name.length > 0 ?
104
104
backend.selectedDevice.name :
111
anchors.topMargin: units.gu(1)
112
anchors.leftMargin: units.gu(2)
113
anchors.rightMargin: units.gu(2)
119
topMargin: units.gu(1)
122
text: i18n.tr("Type")
126
right: deviceType.left
127
rightMargin: units.gu(1)
131
source: backend.selectedDevice ? backend.selectedDevice.iconName : ""
138
topMargin: units.gu(1)
141
text: getTypeString(backend.selectedDevice ? backend.selectedDevice.type : Device.OTHER)
107
SettingsListItems.SingleValue {
108
text: i18n.tr("Type")
109
value: getTypeString(backend.selectedDevice ? backend.selectedDevice.type : Device.OTHER)
113
source: backend.selectedDevice ? backend.selectedDevice.iconName : ""
115
SlotsLayout.position: SlotsLayout.Trailing-1
145
ListItem.SingleValue {
118
SettingsListItems.SingleValue {
146
119
text: i18n.tr("Status")
147
120
value: getStatusString(backend.selectedDevice ? backend.selectedDevice.connection : Device.Disconnected)
149
ListItem.SingleValue {
122
SettingsListItems.SingleValue {
150
123
text: i18n.tr("Signal Strength")
151
124
value: getSignalString(backend.selectedDevice ? backend.selectedDevice.strength : Device.None)
126
SettingsListItems.Standard {
155
128
text: i18n.tr("Connect automatically when detected:")
156
visible: backend.selectedDevice.paired
158
130
property bool serverChecked: backend.selectedDevice ? backend.selectedDevice.trusted : false
159
131
onServerCheckedChanged: checked = serverChecked
160
132
Component.onCompleted: checked = serverChecked
168
ListItem.SingleControl {
141
SettingsListItems.SingleControl {
143
anchors.centerIn: parent
144
width: parent.width - units.gu(8)
170
145
text: backend.selectedDevice && (backend.selectedDevice.connection == Device.Connected || backend.selectedDevice.connection == Device.Connecting) ? i18n.tr("Disconnect") : i18n.tr("Connect")
171
width: parent.width - units.gu(8)
173
147
if (backend.selectedDevice
174
148
&& (backend.selectedDevice.connection == Device.Connected
185
159
enabled: backend.selectedDevice && backend.powered ? true : false
188
ListItem.SingleControl {
163
SettingsListItems.SingleControl {
165
anchors.centerIn: parent
166
width: parent.width - units.gu(8)
190
167
text: i18n.tr("Forget this device")
191
width: parent.width - units.gu(8)
193
169
backend.removeDevice();
194
170
backend.resetSelectedDevice();