Merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/devicespage2 into lp:qtcreator-plugin-ubuntu

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 281
Merged at revision: 279
Proposed branch: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/devicespage2
Merge into: lp:qtcreator-plugin-ubuntu
Prerequisite: lp:~zeller-benjamin/qtcreator-plugin-ubuntu/deployandrunbug
Diff against target: 888 lines (+431/-377)
9 files modified
share/qtcreator/ubuntu/devicespage/DeviceAdvancedTab.qml (+0/-92)
share/qtcreator/ubuntu/devicespage/DeviceBuilderTab.qml (+0/-42)
share/qtcreator/ubuntu/devicespage/DeviceEmulatorTab.qml (+0/-71)
share/qtcreator/ubuntu/devicespage/DeviceKitManager.qml (+0/-62)
share/qtcreator/ubuntu/devicespage/DeviceLogTab.qml (+0/-12)
share/qtcreator/ubuntu/devicespage/DevicePage.qml (+315/-92)
share/qtcreator/ubuntu/devicespage/ScrollableView.qml (+55/-0)
share/qtcreator/ubuntu/devicespage/SectionItem.qml (+58/-0)
src/ubuntu/ubuntu.pro (+3/-6)
To merge this branch: bzr merge lp:~zeller-benjamin/qtcreator-plugin-ubuntu/devicespage2
Reviewer Review Type Date Requested Status
Zoltan Balogh Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+237568@code.launchpad.net

This proposal supersedes a proposal from 2014-10-08.

Commit message

- Refactor UI of devicespage
- Fix Bug #1372633 "Device tab content page needs to allow vertical
scrolling"

Description of the change

- Refactor UI of devicespage
- Fix Bug #1372633 "Device tab content page needs to allow vertical
scrolling"

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zoltan Balogh (bzoltan) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceAdvancedTab.qml'
--- share/qtcreator/ubuntu/devicespage/DeviceAdvancedTab.qml 2014-04-25 10:03:59 +0000
+++ share/qtcreator/ubuntu/devicespage/DeviceAdvancedTab.qml 1970-01-01 00:00:00 +0000
@@ -1,92 +0,0 @@
1import QtQuick 2.0
2import QtQuick.Controls 1.0 as Controls
3import QtQuick.Layouts 1.0
4import Ubuntu.Components 0.1
5import Ubuntu.Components.ListItems 0.1 as ListItem
6
7
8RowLayout {
9 Controls.ScrollView {
10 Layout.fillHeight: true
11 Layout.minimumWidth: units.gu(78)
12 UbuntuListView {
13 model: VisualItemModel{
14 Label {
15 text: "Device Control"
16 fontSize: "large"
17 anchors.left: parent.left
18 }
19 ListItem.Standard {
20 text:"Clone time config from Host to Device"
21 control: Button{
22 text: "Execute"
23 enabled: !deviceItemView.deviceBusy
24 onClicked: devicesModel.triggerCloneTimeConfig(deviceId)
25 }
26 }
27 ListItem.Standard {
28 text:"Enable port forwarding"
29 control: Button{
30 text: "Execute"
31 enabled: !deviceItemView.deviceBusy
32 onClicked: devicesModel.triggerPortForwarding(deviceId)
33 }
34 }
35 ListItem.Standard {
36 text:"Setup public key authentication"
37 control: Button{
38 text: "Execute"
39 enabled: !deviceItemView.deviceBusy
40 onClicked: devicesModel.triggerSSHSetup(deviceId)
41 }
42 }
43 ListItem.Standard {
44 text:"Open SSH connection to the device"
45 control: Button{
46 text: "Execute"
47 enabled: !deviceItemView.deviceBusy
48 onClicked: devicesModel.triggerSSHConnection(deviceId)
49 }
50 }
51 ListItem.Divider{}
52 Label {
53 text: "Device Mode"
54 fontSize: "large"
55 }
56 ListItem.Standard {
57 text:"Reboot"
58 control: Button{
59 text: "Execute"
60 enabled: !deviceItemView.deviceBusy
61 onClicked: devicesModel.triggerReboot(deviceId)
62 }
63 }
64 ListItem.Standard {
65 text:"Reboot to bootloader"
66 control: Button{
67 text: "Execute"
68 enabled: !deviceItemView.deviceBusy
69 onClicked: devicesModel.triggerRebootBootloader(deviceId)
70 }
71 }
72 ListItem.Standard {
73 text:"Reboot to recovery"
74 control: Button{
75 text: "Execute"
76 enabled: !deviceItemView.deviceBusy
77 onClicked: devicesModel.triggerRebootRecovery(deviceId)
78 }
79 }
80 ListItem.Standard {
81 text:"Shutdown"
82 control: Button{
83 text: "Execute"
84 enabled: !deviceItemView.deviceBusy
85 onClicked: devicesModel.triggerShutdown(deviceId)
86 }
87 }
88 }
89 }
90 }
91}
92
930
=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceBuilderTab.qml'
--- share/qtcreator/ubuntu/devicespage/DeviceBuilderTab.qml 2014-04-25 10:03:59 +0000
+++ share/qtcreator/ubuntu/devicespage/DeviceBuilderTab.qml 1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
1import QtQuick 2.0
2import QtQuick.Controls 1.0 as Controls
3import QtQuick.Layouts 1.0
4import Ubuntu.Components 0.1
5import Ubuntu.Components.ListItems 0.1 as ListItem
6
7RowLayout {
8 spacing: units.gu(1)
9 Controls.ScrollView {
10 Layout.fillHeight: true
11 Layout.minimumWidth: units.gu(78)
12
13 ColumnLayout {
14 Layout.fillWidth: true
15 Label {
16 text: "Platform development"
17 fontSize: "large"
18 anchors.left: parent.left
19 Layout.fillWidth: true
20 }
21 Label {
22 text: "The connected device can be turned to be a native development environment.\n Use this feature with care and only if you know what are you doing."
23 }
24 FeatureStateItem {
25 text: "Has writeable image"
26 input: hasWriteableImage
27 inputRole: "hasWriteableImage"
28 height: 24
29 width: 300
30 checkable: !deviceItemView.deviceBusy
31 }
32 FeatureStateItem {
33 text: "Has device developer tools"
34 input: hasDeveloperTools
35 inputRole: "hasDeveloperTools"
36 height: 24
37 width: 300
38 checkable: !deviceItemView.deviceBusy
39 }
40 }
41 }
42}
430
=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceEmulatorTab.qml'
--- share/qtcreator/ubuntu/devicespage/DeviceEmulatorTab.qml 2014-08-11 10:46:51 +0000
+++ share/qtcreator/ubuntu/devicespage/DeviceEmulatorTab.qml 1970-01-01 00:00:00 +0000
@@ -1,71 +0,0 @@
1import QtQuick 2.0
2import QtQuick.Layouts 1.0
3import QtQuick.Controls 1.0 as Controls
4
5import Ubuntu.Components 0.1
6import Ubuntu.Components.ListItems 0.1 as ListItem
7import Ubuntu.Components.Popups 0.1
8
9import Ubuntu.DevicesModel 0.1
10
11ColumnLayout {
12 UbuntuListView {
13 Layout.alignment: Qt.AlignLeft | Qt.AlignTop
14 width: units.gu(50)
15 height: childrenRect.height
16 model: VisualItemModel {
17 ListItem.SingleValue {
18 text: i18n.tr("Ubuntu version")
19 value: emuUbuntuVersion
20 }
21 ListItem.SingleValue {
22 text: i18n.tr("Device version")
23 value: emuDeviceVersion
24 }
25 ListItem.SingleValue {
26 text: i18n.tr("Image version")
27 value: emuImageVersion
28 }
29 ListItem.Standard {
30 //show this listitem only when device is not connected
31 visible: connectionState !== DeviceConnectionState.ReadyToUse && connectionState !== DeviceConnectionState.Connected
32 text: "Scale"
33 control: Controls.ComboBox {
34 id: emulatorScaleComboBox
35 model: ["1.0", "0.9", "0.8", "0.7", "0.6","0.5", "0.4", "0.3", "0.2","0.1"]
36 currentIndex: {
37 var idx = find(emulatorScaleFactor);
38 return idx >= 0 ? idx : 0;
39 }
40 onActivated: {
41 emulatorScaleFactor = textAt(index);
42 }
43 }
44 }
45
46 ListItem.Standard {
47 //show this listitem only when device is not connected
48 visible: connectionState !== DeviceConnectionState.ReadyToUse && connectionState !== DeviceConnectionState.Connected
49 text: "Memory"
50 control: Controls.ComboBox {
51 id: emulatorMemoryComboBox
52 model: ["512", "768", "1024"]
53
54 currentIndex: {
55 var idx = find(emulatorMemorySetting);
56 return idx >= 0 ? idx : 0;
57 }
58 onActivated: {
59 emulatorMemorySetting = textAt(index);
60 }
61 }
62 }
63 }
64 }
65 ListItem.Divider{}
66 DeviceKitManager{
67 Layout.alignment: Qt.AlignLeft | Qt.AlignTop
68 Layout.fillHeight: true
69 width: units.gu(50)
70 }
71}
720
=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceKitManager.qml'
--- share/qtcreator/ubuntu/devicespage/DeviceKitManager.qml 2014-08-11 10:46:51 +0000
+++ share/qtcreator/ubuntu/devicespage/DeviceKitManager.qml 1970-01-01 00:00:00 +0000
@@ -1,62 +0,0 @@
1import QtQuick 2.0
2import QtQuick.Controls 1.0 as Controls
3import QtQuick.Layouts 1.0
4import Ubuntu.Components 0.1
5import Ubuntu.Components.ListItems 0.1 as ListItem
6import Ubuntu.DevicesModel 0.1
7
8Item {
9 ColumnLayout {
10 anchors.fill: parent
11 Label {
12 text: "Device Kits"
13 fontSize: "large"
14 }
15
16 Column {
17 Layout.fillWidth: true
18 Repeater {
19 model: kits
20 delegate: ListItem.Standard {
21 text: modelData.displayName
22 Layout.fillWidth: true
23 control: Button{
24 text: "Remove"
25 enabled: !deviceItemView.deviceBusy
26 onClicked: devicesModel.triggerKitRemove(deviceId,modelData.id)
27 }
28 }
29 }
30 }
31
32 Item {
33 clip: true
34 visible: kits.length === 0
35 Layout.minimumHeight: units.gu(25)
36 Layout.fillWidth: true
37 Label {
38 id:label
39 anchors.centerIn: parent
40 anchors.bottom: button.top
41 fontSize: "large"
42 text: "There is currently no Kit defined for your device.\n In order to use the device in your Projects,\n you can either add a existing Kit "
43 +"\nor let Qt Creator autocreate one for you."
44 }
45 Button {
46 id: button
47 anchors.left: label.left
48 anchors.right: label.right
49 anchors.top: label.bottom
50 anchors.topMargin: units.gu(2)
51 text: "Autocreate"
52 enabled: !deviceItemView.deviceBusy
53 onClicked: devicesModel.triggerKitAutocreate(deviceId)
54 }
55 }
56
57 //Spacer Item
58 Item {
59 Layout.fillHeight: true
60 }
61 }
62}
630
=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceLogTab.qml'
--- share/qtcreator/ubuntu/devicespage/DeviceLogTab.qml 2014-04-22 14:10:22 +0000
+++ share/qtcreator/ubuntu/devicespage/DeviceLogTab.qml 1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
1import QtQuick 2.0
2import QtQuick.Controls 1.0 as Controls
3import QtQuick.Layouts 1.0
4import Ubuntu.Components 0.1
5import Ubuntu.Components.ListItems 0.1 as ListItem
6
7
8Controls.TextArea {
9 readOnly: true
10 text: deviceLog
11 textFormat: TextEdit.AutoText
12}
130
=== modified file 'share/qtcreator/ubuntu/devicespage/DevicePage.qml'
--- share/qtcreator/ubuntu/devicespage/DevicePage.qml 2014-08-11 11:58:08 +0000
+++ share/qtcreator/ubuntu/devicespage/DevicePage.qml 2014-10-08 10:38:58 +0000
@@ -153,15 +153,17 @@
153 }153 }
154 }154 }
155 }155 }
156
156 Item {157 Item {
157 id: centerItem158 id: centerItem
158 Layout.minimumWidth: 400159 Layout.minimumWidth: 400
159 Layout.fillWidth: true160 Layout.fillWidth: true
160 property int currentIndex: devicesList.currentIndex161
161 Repeater {162 Repeater {
163 property int currentIndex: devicesList.currentIndex
162 model: devicesModel164 model: devicesModel
163 anchors.fill: parent165
164 Rectangle{166 Rectangle {
165 id: deviceItemView167 id: deviceItemView
166 property bool deviceConnected: connectionState === DeviceConnectionState.ReadyToUse || connectionState === DeviceConnectionState.Connected168 property bool deviceConnected: connectionState === DeviceConnectionState.ReadyToUse || connectionState === DeviceConnectionState.Connected
167 property bool deviceBusy: (detectionState != DeviceDetectionState.Done && detectionState != DeviceDetectionState.NotStarted)169 property bool deviceBusy: (detectionState != DeviceDetectionState.Done && detectionState != DeviceDetectionState.NotStarted)
@@ -172,6 +174,7 @@
172 color: Qt.rgba(0.0, 0.0, 0.0, 0.01)174 color: Qt.rgba(0.0, 0.0, 0.0, 0.01)
173 visible: index == devicesList.currentIndex175 visible: index == devicesList.currentIndex
174176
177
175 Controls.ToolBar {178 Controls.ToolBar {
176 id: emulatorToolBar179 id: emulatorToolBar
177 height: visible ? units.gu(5) : 0180 height: visible ? units.gu(5) : 0
@@ -205,95 +208,315 @@
205 }208 }
206 }209 }
207210
208 Controls.TabView {211 ScrollableView {
209 id: pagesTabView212 id: deviceView
210 anchors.left: parent.left213 anchors.left: parent.left
211 anchors.right: parent.right214 anchors.right: parent.right
212 anchors.top: emulatorToolBar.bottom215 anchors.top: emulatorToolBar.bottom
213 anchors.bottom: parent.bottom216 anchors.bottom: parent.bottom
214 anchors.margins: 12217 clip: true
215 visible: deviceConnected && !deviceBooting && !detectionError218
216219 ListItem.Empty {
217 Component.onCompleted: {220 divider.visible: false
218 addTab("Device", Qt.createComponent("DeviceStatusTab.qml"))221 visible: detectionError
219 if(machineType === DeviceMachineType.Emulator)222 RowLayout {
220 addTab("Emulator", Qt.createComponent("DeviceEmulatorTab.qml"))223 anchors.fill: parent
221 addTab("Advanced", Qt.createComponent("DeviceAdvancedTab.qml"))224 anchors.leftMargin: units.gu(2)
222 addTab("Builder", Qt.createComponent("DeviceBuilderTab.qml"))225 anchors.rightMargin: units.gu(4)
223 addTab("Log", Qt.createComponent("DeviceLogTab.qml"))226 Icon {
224 }227 id: errorIcon
225 }228 anchors.left: parent.left
226229 name: "security-alert"
227 ColumnLayout {230 height:parent.height - units.gu(2)
228 visible: !deviceConnected && !deviceBooting && !detectionError && (machineType !== DeviceMachineType.Emulator)231 width: height
229 anchors.left: parent.left232 }
230 anchors.top: emulatorToolBar.bottom233 Label {
231 anchors.bottom: parent.bottom234 id: errorText
232 anchors.margins: 10235 text: i18n.tr("There was a error in the device detection, check the log for details.")
233 width: units.gu(75)236 fontSize: "large"
234 spacing: units.gu(1)237 wrapMode: Text.Wrap
235238 Layout.fillWidth: true
236 Label {239 }
237 text:"Device Status: Disconnected"240 Button {
238 fontSize: "large"241 id: deviceRedetectButton
239 Layout.alignment: Qt.AlignLeft | Qt.AlignTop242 text: "Redetect"
240 Layout.fillWidth: true243 onClicked: devicesModel.triggerRedetect(deviceId)
241 }244 }
242 ListItem.SingleValue {245 }
243 Layout.alignment: Qt.AlignLeft | Qt.AlignTop246 }
244 text:i18n.tr("Serial ID")247
245 Layout.fillWidth: true248 ListItem.Empty {
246 value: serial249 divider.visible: false
247 }250 visible: deviceItemView.deviceBooting
248 ListItem.Divider{}251 RowLayout {
249 DeviceKitManager {252 anchors.fill: parent
250 Layout.alignment: Qt.AlignLeft | Qt.AlignTop253 anchors.leftMargin: units.gu(2)
251 Layout.fillHeight: true254 anchors.rightMargin: units.gu(4)
252 Layout.fillWidth: true255 ActivityIndicator {
253 }256 running: deviceItemView.deviceBooting
254 }257 height:parent.height - units.gu(2)
255258 width: height
256 DeviceEmulatorTab {259 }
257 id: emuSettings260 Label {
258 visible: !deviceConnected && !deviceBooting && !detectionError && (machineType === DeviceMachineType.Emulator)261 text: i18n.tr("The device is currently booting, if this text is still shown after the device has booted, press the refresh button.")
259 anchors.left: parent.left262 fontSize: "large"
260 anchors.right: parent.right263 wrapMode: Text.Wrap
261 anchors.top: emulatorToolBar.bottom264 Layout.fillWidth: true
262 anchors.bottom: parent.bottom265 }
263 anchors.margins: 10266 Button {
264 }267 text: "Redetect"
265268 onClicked: devicesModel.triggerRedetect(deviceId)
266 Column {269 }
267 visible: deviceBooting && !detectionError270 }
268 anchors.centerIn: parent271 }
269 spacing: units.gu(1)272
270 Label {273 SectionItem {
271 text: i18n.tr("The device is currently booting.")274 title: deviceItemView.deviceConnected ? "Device Status: "+detectionStateString : "Device Status: Disconnected"
272 fontSize: "large"275 expanded: true
273 anchors.horizontalCenter: parent.horizontalCenter276
274 }277 Column {
275 Label {278 anchors.left: parent.left
276 text: i18n.tr("If this text is still shown after the device has booted, press the refresh button.")279 anchors.right: parent.right
277 anchors.horizontalCenter: parent.horizontalCenter280
278 }281 ListItem.SingleValue {
279 ActivityIndicator {282 visible: deviceItemView.deviceConnected || machineType !== DeviceMachineType.Emulator
280 running: deviceBooting283 text:i18n.tr("Serial ID")
281 anchors.horizontalCenter: parent.horizontalCenter284 value: serial
282 }285 }
283 }286 ListItem.SingleValue {
284 Column {287 text: i18n.tr("Ubuntu version")
285 visible: detectionError288 value: emuUbuntuVersion
286 anchors.centerIn: parent289 visible: machineType === DeviceMachineType.Emulator
287 spacing: units.gu(1)290 }
288 Label {291 ListItem.SingleValue {
289 text: i18n.tr("There was a error in the device detection, please press the redetect button to try again.")292 text: i18n.tr("Device version")
290 fontSize: "large"293 value: emuDeviceVersion
291 anchors.horizontalCenter: parent.horizontalCenter294 visible: machineType === DeviceMachineType.Emulator
292 }295 }
293 Button {296 ListItem.SingleValue {
294 text: "Redetect"297 text: i18n.tr("Image version")
295 onClicked: devicesModel.triggerRedetect(deviceId)298 value: emuImageVersion
296 anchors.horizontalCenter: parent.horizontalCenter299 visible: machineType === DeviceMachineType.Emulator
300 }
301 ListItem.Standard {
302 //show this listitem only when device is not connected
303 visible: machineType === DeviceMachineType.Emulator && !deviceItemView.deviceConnected
304 text: "Scale"
305 control: Controls.ComboBox {
306 id: emulatorScaleComboBox
307 model: ["1.0", "0.9", "0.8", "0.7", "0.6","0.5", "0.4", "0.3", "0.2","0.1"]
308 currentIndex: {
309 var idx = find(emulatorScaleFactor);
310 return idx >= 0 ? idx : 0;
311 }
312 onActivated: {
313 emulatorScaleFactor = textAt(index);
314 }
315 }
316 }
317
318 ListItem.Standard {
319 //show this listitem only when device is not connected
320 visible: machineType === DeviceMachineType.Emulator && !deviceItemView.deviceConnected
321 text: "Memory"
322 control: Controls.ComboBox {
323 id: emulatorMemoryComboBox
324 model: ["512", "768", "1024"]
325
326 currentIndex: {
327 var idx = find(emulatorMemorySetting);
328 return idx >= 0 ? idx : 0;
329 }
330 onActivated: {
331 emulatorMemorySetting = textAt(index);
332 }
333 }
334 }
335 ListItem.SingleValue {
336 text:i18n.tr("Device")
337 value: deviceInfo
338 visible: deviceItemView.deviceConnected
339 }
340 ListItem.SingleValue {
341 text:i18n.tr("Model")
342 value: modelInfo
343 visible: deviceItemView.deviceConnected
344 }
345 ListItem.SingleValue {
346 text:i18n.tr("Product")
347 value: productInfo
348 visible: deviceItemView.deviceConnected
349 }
350
351 FeatureStateItem {
352 text: "Has network connection"
353 input: hasNetworkConnection
354 inputRole: "hasNetworkConnection"
355 checkable: hasNetworkConnection == FeatureState.NotAvailable && !deviceItemView.deviceBusy && !deviceItemView.detectionError
356 visible: deviceItemView.deviceConnected
357 }
358 FeatureStateItem {
359 text: "Has devloper mode enabled"
360 input: developerModeEnabled
361 inputRole: "developerModeEnabled"
362 checkable: !deviceItemView.deviceBusy && !deviceItemView.detectionError
363 visible: deviceItemView.deviceConnected
364 }
365 /*
366 FeatureStateItem {
367 text: "Has writeable image"
368 input: hasWriteableImage
369 inputRole: "hasWriteableImage"
370 checkable: false
371 visible: deviceItemView.deviceConnected
372 }
373 */
374 }
375 }
376
377 SectionItem {
378 title: "Kits"
379 expanded: true
380
381 Column {
382 anchors.left: parent.left
383 anchors.right: parent.right
384
385 Repeater {
386 model: kits
387 delegate: ListItem.Standard {
388 text: modelData.displayName
389 Layout.fillWidth: true
390 control: Button{
391 text: "Remove"
392 enabled: !deviceItemView.deviceBusy
393 onClicked: devicesModel.triggerKitRemove(deviceId,modelData.id)
394 }
395 }
396 }
397
398 Item {
399 clip: true
400 visible: kits.length === 0
401 height: label.contentHeight + units.gu(15)
402 width: parent.width
403 Label {
404 id:label
405 anchors.centerIn: parent
406 anchors.bottom: button.top
407 fontSize: "large"
408 text: "There is currently no Kit defined for your device.\n In order to use the device in your Projects,\n you can either add a existing Kit "
409 +"\nor let Qt Creator autocreate one for you."
410 }
411 Button {
412 id: button
413 anchors.left: label.left
414 anchors.right: label.right
415 anchors.top: label.bottom
416 anchors.bottom: parent.bottom
417 anchors.topMargin: units.gu(2)
418 text: "Autocreate"
419 enabled: !deviceItemView.deviceBusy
420 onClicked: devicesModel.triggerKitAutocreate(deviceId)
421 }
422 }
423
424
425 }
426 }
427
428 SectionItem {
429 title: "Control"
430 visible: deviceItemView.deviceConnected
431
432 Column {
433 anchors.left: parent.left
434 anchors.right: parent.right
435
436 ListItem.Standard {
437 text:"Clone time config from Host to Device"
438 control: Button{
439 text: "Execute"
440 enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
441 onClicked: devicesModel.triggerCloneTimeConfig(deviceId)
442 }
443 }
444 ListItem.Standard {
445 text:"Enable port forwarding"
446 control: Button{
447 text: "Execute"
448 enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
449 onClicked: devicesModel.triggerPortForwarding(deviceId)
450 }
451 }
452 ListItem.Standard {
453 text:"Setup public key authentication"
454 control: Button{
455 text: "Execute"
456 enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
457 onClicked: devicesModel.triggerSSHSetup(deviceId)
458 }
459 }
460 ListItem.Standard {
461 text:"Open SSH connection to the device"
462 control: Button{
463 text: "Execute"
464 enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
465 onClicked: devicesModel.triggerSSHConnection(deviceId)
466 }
467 }
468 ListItem.Standard {
469 text:"Reboot"
470 control: Button{
471 text: "Execute"
472 enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
473 onClicked: devicesModel.triggerReboot(deviceId)
474 }
475 }
476 ListItem.Standard {
477 text:"Reboot to bootloader"
478 control: Button{
479 text: "Execute"
480 enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
481 onClicked: devicesModel.triggerRebootBootloader(deviceId)
482 }
483 }
484 ListItem.Standard {
485 text:"Reboot to recovery"
486 control: Button{
487 text: "Execute"
488 enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
489 onClicked: devicesModel.triggerRebootRecovery(deviceId)
490 }
491 }
492 ListItem.Standard {
493 text:"Shutdown"
494 control: Button{
495 text: "Execute"
496 enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
497 onClicked: devicesModel.triggerShutdown(deviceId)
498 }
499 }
500 }
501
502 }
503
504 SectionItem {
505 title: "Log"
506 Column {
507 anchors.left: parent.left
508 anchors.right: parent.right
509 TextArea {
510 anchors.left: parent.left
511 anchors.right: parent.right
512 height: units.gu(60)
513 highlighted: true
514
515 readOnly: true
516 text: deviceLog
517 textFormat: TextEdit.AutoText
518 }
519 }
297 }520 }
298 }521 }
299 }522 }
300523
=== added file 'share/qtcreator/ubuntu/devicespage/ScrollableView.qml'
--- share/qtcreator/ubuntu/devicespage/ScrollableView.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/devicespage/ScrollableView.qml 2014-10-08 10:38:58 +0000
@@ -0,0 +1,55 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components 0.1
19
20Item {
21 id: template
22
23 width: units.gu(40)
24 height: units.gu(75)
25
26 default property alias content: layout.children
27 property alias spacing: layout.spacing
28 property Item tools: null
29 property Flickable flickable: flickable
30
31 Flickable {
32 id: flickable
33 objectName: "TemplateFlickable"
34 anchors.fill: parent
35 anchors.topMargin: units.gu(2)
36 anchors.bottomMargin: units.gu(2)
37 contentHeight: layout.height
38 interactive: contentHeight > height
39
40 Column {
41 id: layout
42 spacing: units.gu(6)
43 anchors.left: parent.left
44 anchors.right: parent.right
45 anchors.margins: units.gu(2)
46 }
47 }
48
49 Scrollbar {
50 id: sb
51 objectName: "TemplateScrollbar"
52 flickableItem: flickable
53 property alias interactive: sb.__interactive
54 }
55}
056
=== added file 'share/qtcreator/ubuntu/devicespage/SectionItem.qml'
--- share/qtcreator/ubuntu/devicespage/SectionItem.qml 1970-01-01 00:00:00 +0000
+++ share/qtcreator/ubuntu/devicespage/SectionItem.qml 2014-10-08 10:38:58 +0000
@@ -0,0 +1,58 @@
1/*
2 * Copyright 2013 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components 0.1
19import Ubuntu.Components.ListItems 0.1 as ListItem
20
21ListItem.Expandable {
22 id: expandingColumnItem
23 expandedHeight: contentColumn.height + units.gu(1)
24 collapsedHeight: headerRow.childrenRect.height
25 divider.visible: false
26
27 property string title
28 default property alias data: contentColumn.data
29
30 onClicked: {
31 expanded = !expanded;
32 }
33
34 Column {
35 id: contentColumn
36 anchors { left: parent.left; right: parent.right }
37 Row{
38 id: headerRow
39 anchors { left: parent.left; right: parent.right}
40 height: childrenRect.height
41 Icon {
42 name: expandingColumnItem.expanded ? "view-collapse" : "view-expand"
43 color: UbuntuColors.orange
44 width: 24
45 height: 24
46 }
47 Item{
48 width: units.gu(1)
49 height: parent.height
50 }
51 Label {
52 id: label
53 text: expandingColumnItem.title
54 fontSize: "large"
55 }
56 }
57 }
58}
059
=== modified file 'src/ubuntu/ubuntu.pro'
--- src/ubuntu/ubuntu.pro 2014-09-30 15:44:15 +0000
+++ src/ubuntu/ubuntu.pro 2014-10-08 10:38:58 +0000
@@ -38,16 +38,13 @@
38 $$QML_ROOT/welcome/Link.qml \38 $$QML_ROOT/welcome/Link.qml \
39 $$QML_ROOT/welcome/NewsBox.qml\39 $$QML_ROOT/welcome/NewsBox.qml\
40 $$QML_ROOT/devicespage/main.qml \40 $$QML_ROOT/devicespage/main.qml \
41 $$QML_ROOT/devicespage/DeviceAdvancedTab.qml \
42 $$QML_ROOT/devicespage/DeviceBuilderTab.qml \
43 $$QML_ROOT/devicespage/DeviceLogTab.qml \
44 $$QML_ROOT/devicespage/DevicePage.qml \41 $$QML_ROOT/devicespage/DevicePage.qml \
45 $$QML_ROOT/devicespage/DeviceStatusTab.qml \42 $$QML_ROOT/devicespage/DeviceStatusTab.qml \
46 $$QML_ROOT/devicespage/FeatureStateItem.qml \43 $$QML_ROOT/devicespage/FeatureStateItem.qml \
47 $$QML_ROOT/devicespage/NewEmulatorDialog.qml \44 $$QML_ROOT/devicespage/NewEmulatorDialog.qml \
48 $$QML_ROOT/devicespage/LogPage.qml \45 $$QML_ROOT/devicespage/DeleteEmulatorDialog.qml \
49 $$QML_ROOT/devicespage/DeviceEmulatorTab.qml \46 $$QML_ROOT/devicespage/ScrollableView.qml \
50 $$QML_ROOT/devicespage/DeleteEmulatorDialog.qml47 $$QML_ROOT/devicespage/SectionItem.qml
5148
52OTHER_FILES += \49OTHER_FILES += \
53 UbuntuProject.mimetypes.xml \50 UbuntuProject.mimetypes.xml \

Subscribers

People subscribed via source and target branches