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
1=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceAdvancedTab.qml'
2--- share/qtcreator/ubuntu/devicespage/DeviceAdvancedTab.qml 2014-04-25 10:03:59 +0000
3+++ share/qtcreator/ubuntu/devicespage/DeviceAdvancedTab.qml 1970-01-01 00:00:00 +0000
4@@ -1,92 +0,0 @@
5-import QtQuick 2.0
6-import QtQuick.Controls 1.0 as Controls
7-import QtQuick.Layouts 1.0
8-import Ubuntu.Components 0.1
9-import Ubuntu.Components.ListItems 0.1 as ListItem
10-
11-
12-RowLayout {
13- Controls.ScrollView {
14- Layout.fillHeight: true
15- Layout.minimumWidth: units.gu(78)
16- UbuntuListView {
17- model: VisualItemModel{
18- Label {
19- text: "Device Control"
20- fontSize: "large"
21- anchors.left: parent.left
22- }
23- ListItem.Standard {
24- text:"Clone time config from Host to Device"
25- control: Button{
26- text: "Execute"
27- enabled: !deviceItemView.deviceBusy
28- onClicked: devicesModel.triggerCloneTimeConfig(deviceId)
29- }
30- }
31- ListItem.Standard {
32- text:"Enable port forwarding"
33- control: Button{
34- text: "Execute"
35- enabled: !deviceItemView.deviceBusy
36- onClicked: devicesModel.triggerPortForwarding(deviceId)
37- }
38- }
39- ListItem.Standard {
40- text:"Setup public key authentication"
41- control: Button{
42- text: "Execute"
43- enabled: !deviceItemView.deviceBusy
44- onClicked: devicesModel.triggerSSHSetup(deviceId)
45- }
46- }
47- ListItem.Standard {
48- text:"Open SSH connection to the device"
49- control: Button{
50- text: "Execute"
51- enabled: !deviceItemView.deviceBusy
52- onClicked: devicesModel.triggerSSHConnection(deviceId)
53- }
54- }
55- ListItem.Divider{}
56- Label {
57- text: "Device Mode"
58- fontSize: "large"
59- }
60- ListItem.Standard {
61- text:"Reboot"
62- control: Button{
63- text: "Execute"
64- enabled: !deviceItemView.deviceBusy
65- onClicked: devicesModel.triggerReboot(deviceId)
66- }
67- }
68- ListItem.Standard {
69- text:"Reboot to bootloader"
70- control: Button{
71- text: "Execute"
72- enabled: !deviceItemView.deviceBusy
73- onClicked: devicesModel.triggerRebootBootloader(deviceId)
74- }
75- }
76- ListItem.Standard {
77- text:"Reboot to recovery"
78- control: Button{
79- text: "Execute"
80- enabled: !deviceItemView.deviceBusy
81- onClicked: devicesModel.triggerRebootRecovery(deviceId)
82- }
83- }
84- ListItem.Standard {
85- text:"Shutdown"
86- control: Button{
87- text: "Execute"
88- enabled: !deviceItemView.deviceBusy
89- onClicked: devicesModel.triggerShutdown(deviceId)
90- }
91- }
92- }
93- }
94- }
95-}
96-
97
98=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceBuilderTab.qml'
99--- share/qtcreator/ubuntu/devicespage/DeviceBuilderTab.qml 2014-04-25 10:03:59 +0000
100+++ share/qtcreator/ubuntu/devicespage/DeviceBuilderTab.qml 1970-01-01 00:00:00 +0000
101@@ -1,42 +0,0 @@
102-import QtQuick 2.0
103-import QtQuick.Controls 1.0 as Controls
104-import QtQuick.Layouts 1.0
105-import Ubuntu.Components 0.1
106-import Ubuntu.Components.ListItems 0.1 as ListItem
107-
108-RowLayout {
109- spacing: units.gu(1)
110- Controls.ScrollView {
111- Layout.fillHeight: true
112- Layout.minimumWidth: units.gu(78)
113-
114- ColumnLayout {
115- Layout.fillWidth: true
116- Label {
117- text: "Platform development"
118- fontSize: "large"
119- anchors.left: parent.left
120- Layout.fillWidth: true
121- }
122- Label {
123- 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."
124- }
125- FeatureStateItem {
126- text: "Has writeable image"
127- input: hasWriteableImage
128- inputRole: "hasWriteableImage"
129- height: 24
130- width: 300
131- checkable: !deviceItemView.deviceBusy
132- }
133- FeatureStateItem {
134- text: "Has device developer tools"
135- input: hasDeveloperTools
136- inputRole: "hasDeveloperTools"
137- height: 24
138- width: 300
139- checkable: !deviceItemView.deviceBusy
140- }
141- }
142- }
143-}
144
145=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceEmulatorTab.qml'
146--- share/qtcreator/ubuntu/devicespage/DeviceEmulatorTab.qml 2014-08-11 10:46:51 +0000
147+++ share/qtcreator/ubuntu/devicespage/DeviceEmulatorTab.qml 1970-01-01 00:00:00 +0000
148@@ -1,71 +0,0 @@
149-import QtQuick 2.0
150-import QtQuick.Layouts 1.0
151-import QtQuick.Controls 1.0 as Controls
152-
153-import Ubuntu.Components 0.1
154-import Ubuntu.Components.ListItems 0.1 as ListItem
155-import Ubuntu.Components.Popups 0.1
156-
157-import Ubuntu.DevicesModel 0.1
158-
159-ColumnLayout {
160- UbuntuListView {
161- Layout.alignment: Qt.AlignLeft | Qt.AlignTop
162- width: units.gu(50)
163- height: childrenRect.height
164- model: VisualItemModel {
165- ListItem.SingleValue {
166- text: i18n.tr("Ubuntu version")
167- value: emuUbuntuVersion
168- }
169- ListItem.SingleValue {
170- text: i18n.tr("Device version")
171- value: emuDeviceVersion
172- }
173- ListItem.SingleValue {
174- text: i18n.tr("Image version")
175- value: emuImageVersion
176- }
177- ListItem.Standard {
178- //show this listitem only when device is not connected
179- visible: connectionState !== DeviceConnectionState.ReadyToUse && connectionState !== DeviceConnectionState.Connected
180- text: "Scale"
181- control: Controls.ComboBox {
182- id: emulatorScaleComboBox
183- model: ["1.0", "0.9", "0.8", "0.7", "0.6","0.5", "0.4", "0.3", "0.2","0.1"]
184- currentIndex: {
185- var idx = find(emulatorScaleFactor);
186- return idx >= 0 ? idx : 0;
187- }
188- onActivated: {
189- emulatorScaleFactor = textAt(index);
190- }
191- }
192- }
193-
194- ListItem.Standard {
195- //show this listitem only when device is not connected
196- visible: connectionState !== DeviceConnectionState.ReadyToUse && connectionState !== DeviceConnectionState.Connected
197- text: "Memory"
198- control: Controls.ComboBox {
199- id: emulatorMemoryComboBox
200- model: ["512", "768", "1024"]
201-
202- currentIndex: {
203- var idx = find(emulatorMemorySetting);
204- return idx >= 0 ? idx : 0;
205- }
206- onActivated: {
207- emulatorMemorySetting = textAt(index);
208- }
209- }
210- }
211- }
212- }
213- ListItem.Divider{}
214- DeviceKitManager{
215- Layout.alignment: Qt.AlignLeft | Qt.AlignTop
216- Layout.fillHeight: true
217- width: units.gu(50)
218- }
219-}
220
221=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceKitManager.qml'
222--- share/qtcreator/ubuntu/devicespage/DeviceKitManager.qml 2014-08-11 10:46:51 +0000
223+++ share/qtcreator/ubuntu/devicespage/DeviceKitManager.qml 1970-01-01 00:00:00 +0000
224@@ -1,62 +0,0 @@
225-import QtQuick 2.0
226-import QtQuick.Controls 1.0 as Controls
227-import QtQuick.Layouts 1.0
228-import Ubuntu.Components 0.1
229-import Ubuntu.Components.ListItems 0.1 as ListItem
230-import Ubuntu.DevicesModel 0.1
231-
232-Item {
233- ColumnLayout {
234- anchors.fill: parent
235- Label {
236- text: "Device Kits"
237- fontSize: "large"
238- }
239-
240- Column {
241- Layout.fillWidth: true
242- Repeater {
243- model: kits
244- delegate: ListItem.Standard {
245- text: modelData.displayName
246- Layout.fillWidth: true
247- control: Button{
248- text: "Remove"
249- enabled: !deviceItemView.deviceBusy
250- onClicked: devicesModel.triggerKitRemove(deviceId,modelData.id)
251- }
252- }
253- }
254- }
255-
256- Item {
257- clip: true
258- visible: kits.length === 0
259- Layout.minimumHeight: units.gu(25)
260- Layout.fillWidth: true
261- Label {
262- id:label
263- anchors.centerIn: parent
264- anchors.bottom: button.top
265- fontSize: "large"
266- 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 "
267- +"\nor let Qt Creator autocreate one for you."
268- }
269- Button {
270- id: button
271- anchors.left: label.left
272- anchors.right: label.right
273- anchors.top: label.bottom
274- anchors.topMargin: units.gu(2)
275- text: "Autocreate"
276- enabled: !deviceItemView.deviceBusy
277- onClicked: devicesModel.triggerKitAutocreate(deviceId)
278- }
279- }
280-
281- //Spacer Item
282- Item {
283- Layout.fillHeight: true
284- }
285- }
286-}
287
288=== removed file 'share/qtcreator/ubuntu/devicespage/DeviceLogTab.qml'
289--- share/qtcreator/ubuntu/devicespage/DeviceLogTab.qml 2014-04-22 14:10:22 +0000
290+++ share/qtcreator/ubuntu/devicespage/DeviceLogTab.qml 1970-01-01 00:00:00 +0000
291@@ -1,12 +0,0 @@
292-import QtQuick 2.0
293-import QtQuick.Controls 1.0 as Controls
294-import QtQuick.Layouts 1.0
295-import Ubuntu.Components 0.1
296-import Ubuntu.Components.ListItems 0.1 as ListItem
297-
298-
299-Controls.TextArea {
300- readOnly: true
301- text: deviceLog
302- textFormat: TextEdit.AutoText
303-}
304
305=== modified file 'share/qtcreator/ubuntu/devicespage/DevicePage.qml'
306--- share/qtcreator/ubuntu/devicespage/DevicePage.qml 2014-08-11 11:58:08 +0000
307+++ share/qtcreator/ubuntu/devicespage/DevicePage.qml 2014-10-08 10:38:58 +0000
308@@ -153,15 +153,17 @@
309 }
310 }
311 }
312+
313 Item {
314 id: centerItem
315 Layout.minimumWidth: 400
316 Layout.fillWidth: true
317- property int currentIndex: devicesList.currentIndex
318+
319 Repeater {
320+ property int currentIndex: devicesList.currentIndex
321 model: devicesModel
322- anchors.fill: parent
323- Rectangle{
324+
325+ Rectangle {
326 id: deviceItemView
327 property bool deviceConnected: connectionState === DeviceConnectionState.ReadyToUse || connectionState === DeviceConnectionState.Connected
328 property bool deviceBusy: (detectionState != DeviceDetectionState.Done && detectionState != DeviceDetectionState.NotStarted)
329@@ -172,6 +174,7 @@
330 color: Qt.rgba(0.0, 0.0, 0.0, 0.01)
331 visible: index == devicesList.currentIndex
332
333+
334 Controls.ToolBar {
335 id: emulatorToolBar
336 height: visible ? units.gu(5) : 0
337@@ -205,95 +208,315 @@
338 }
339 }
340
341- Controls.TabView {
342- id: pagesTabView
343- anchors.left: parent.left
344- anchors.right: parent.right
345- anchors.top: emulatorToolBar.bottom
346- anchors.bottom: parent.bottom
347- anchors.margins: 12
348- visible: deviceConnected && !deviceBooting && !detectionError
349-
350- Component.onCompleted: {
351- addTab("Device", Qt.createComponent("DeviceStatusTab.qml"))
352- if(machineType === DeviceMachineType.Emulator)
353- addTab("Emulator", Qt.createComponent("DeviceEmulatorTab.qml"))
354- addTab("Advanced", Qt.createComponent("DeviceAdvancedTab.qml"))
355- addTab("Builder", Qt.createComponent("DeviceBuilderTab.qml"))
356- addTab("Log", Qt.createComponent("DeviceLogTab.qml"))
357- }
358- }
359-
360- ColumnLayout {
361- visible: !deviceConnected && !deviceBooting && !detectionError && (machineType !== DeviceMachineType.Emulator)
362- anchors.left: parent.left
363- anchors.top: emulatorToolBar.bottom
364- anchors.bottom: parent.bottom
365- anchors.margins: 10
366- width: units.gu(75)
367- spacing: units.gu(1)
368-
369- Label {
370- text:"Device Status: Disconnected"
371- fontSize: "large"
372- Layout.alignment: Qt.AlignLeft | Qt.AlignTop
373- Layout.fillWidth: true
374- }
375- ListItem.SingleValue {
376- Layout.alignment: Qt.AlignLeft | Qt.AlignTop
377- text:i18n.tr("Serial ID")
378- Layout.fillWidth: true
379- value: serial
380- }
381- ListItem.Divider{}
382- DeviceKitManager {
383- Layout.alignment: Qt.AlignLeft | Qt.AlignTop
384- Layout.fillHeight: true
385- Layout.fillWidth: true
386- }
387- }
388-
389- DeviceEmulatorTab {
390- id: emuSettings
391- visible: !deviceConnected && !deviceBooting && !detectionError && (machineType === DeviceMachineType.Emulator)
392- anchors.left: parent.left
393- anchors.right: parent.right
394- anchors.top: emulatorToolBar.bottom
395- anchors.bottom: parent.bottom
396- anchors.margins: 10
397- }
398-
399- Column {
400- visible: deviceBooting && !detectionError
401- anchors.centerIn: parent
402- spacing: units.gu(1)
403- Label {
404- text: i18n.tr("The device is currently booting.")
405- fontSize: "large"
406- anchors.horizontalCenter: parent.horizontalCenter
407- }
408- Label {
409- text: i18n.tr("If this text is still shown after the device has booted, press the refresh button.")
410- anchors.horizontalCenter: parent.horizontalCenter
411- }
412- ActivityIndicator {
413- running: deviceBooting
414- anchors.horizontalCenter: parent.horizontalCenter
415- }
416- }
417- Column {
418- visible: detectionError
419- anchors.centerIn: parent
420- spacing: units.gu(1)
421- Label {
422- text: i18n.tr("There was a error in the device detection, please press the redetect button to try again.")
423- fontSize: "large"
424- anchors.horizontalCenter: parent.horizontalCenter
425- }
426- Button {
427- text: "Redetect"
428- onClicked: devicesModel.triggerRedetect(deviceId)
429- anchors.horizontalCenter: parent.horizontalCenter
430+ ScrollableView {
431+ id: deviceView
432+ anchors.left: parent.left
433+ anchors.right: parent.right
434+ anchors.top: emulatorToolBar.bottom
435+ anchors.bottom: parent.bottom
436+ clip: true
437+
438+ ListItem.Empty {
439+ divider.visible: false
440+ visible: detectionError
441+ RowLayout {
442+ anchors.fill: parent
443+ anchors.leftMargin: units.gu(2)
444+ anchors.rightMargin: units.gu(4)
445+ Icon {
446+ id: errorIcon
447+ anchors.left: parent.left
448+ name: "security-alert"
449+ height:parent.height - units.gu(2)
450+ width: height
451+ }
452+ Label {
453+ id: errorText
454+ text: i18n.tr("There was a error in the device detection, check the log for details.")
455+ fontSize: "large"
456+ wrapMode: Text.Wrap
457+ Layout.fillWidth: true
458+ }
459+ Button {
460+ id: deviceRedetectButton
461+ text: "Redetect"
462+ onClicked: devicesModel.triggerRedetect(deviceId)
463+ }
464+ }
465+ }
466+
467+ ListItem.Empty {
468+ divider.visible: false
469+ visible: deviceItemView.deviceBooting
470+ RowLayout {
471+ anchors.fill: parent
472+ anchors.leftMargin: units.gu(2)
473+ anchors.rightMargin: units.gu(4)
474+ ActivityIndicator {
475+ running: deviceItemView.deviceBooting
476+ height:parent.height - units.gu(2)
477+ width: height
478+ }
479+ Label {
480+ text: i18n.tr("The device is currently booting, if this text is still shown after the device has booted, press the refresh button.")
481+ fontSize: "large"
482+ wrapMode: Text.Wrap
483+ Layout.fillWidth: true
484+ }
485+ Button {
486+ text: "Redetect"
487+ onClicked: devicesModel.triggerRedetect(deviceId)
488+ }
489+ }
490+ }
491+
492+ SectionItem {
493+ title: deviceItemView.deviceConnected ? "Device Status: "+detectionStateString : "Device Status: Disconnected"
494+ expanded: true
495+
496+ Column {
497+ anchors.left: parent.left
498+ anchors.right: parent.right
499+
500+ ListItem.SingleValue {
501+ visible: deviceItemView.deviceConnected || machineType !== DeviceMachineType.Emulator
502+ text:i18n.tr("Serial ID")
503+ value: serial
504+ }
505+ ListItem.SingleValue {
506+ text: i18n.tr("Ubuntu version")
507+ value: emuUbuntuVersion
508+ visible: machineType === DeviceMachineType.Emulator
509+ }
510+ ListItem.SingleValue {
511+ text: i18n.tr("Device version")
512+ value: emuDeviceVersion
513+ visible: machineType === DeviceMachineType.Emulator
514+ }
515+ ListItem.SingleValue {
516+ text: i18n.tr("Image version")
517+ value: emuImageVersion
518+ visible: machineType === DeviceMachineType.Emulator
519+ }
520+ ListItem.Standard {
521+ //show this listitem only when device is not connected
522+ visible: machineType === DeviceMachineType.Emulator && !deviceItemView.deviceConnected
523+ text: "Scale"
524+ control: Controls.ComboBox {
525+ id: emulatorScaleComboBox
526+ model: ["1.0", "0.9", "0.8", "0.7", "0.6","0.5", "0.4", "0.3", "0.2","0.1"]
527+ currentIndex: {
528+ var idx = find(emulatorScaleFactor);
529+ return idx >= 0 ? idx : 0;
530+ }
531+ onActivated: {
532+ emulatorScaleFactor = textAt(index);
533+ }
534+ }
535+ }
536+
537+ ListItem.Standard {
538+ //show this listitem only when device is not connected
539+ visible: machineType === DeviceMachineType.Emulator && !deviceItemView.deviceConnected
540+ text: "Memory"
541+ control: Controls.ComboBox {
542+ id: emulatorMemoryComboBox
543+ model: ["512", "768", "1024"]
544+
545+ currentIndex: {
546+ var idx = find(emulatorMemorySetting);
547+ return idx >= 0 ? idx : 0;
548+ }
549+ onActivated: {
550+ emulatorMemorySetting = textAt(index);
551+ }
552+ }
553+ }
554+ ListItem.SingleValue {
555+ text:i18n.tr("Device")
556+ value: deviceInfo
557+ visible: deviceItemView.deviceConnected
558+ }
559+ ListItem.SingleValue {
560+ text:i18n.tr("Model")
561+ value: modelInfo
562+ visible: deviceItemView.deviceConnected
563+ }
564+ ListItem.SingleValue {
565+ text:i18n.tr("Product")
566+ value: productInfo
567+ visible: deviceItemView.deviceConnected
568+ }
569+
570+ FeatureStateItem {
571+ text: "Has network connection"
572+ input: hasNetworkConnection
573+ inputRole: "hasNetworkConnection"
574+ checkable: hasNetworkConnection == FeatureState.NotAvailable && !deviceItemView.deviceBusy && !deviceItemView.detectionError
575+ visible: deviceItemView.deviceConnected
576+ }
577+ FeatureStateItem {
578+ text: "Has devloper mode enabled"
579+ input: developerModeEnabled
580+ inputRole: "developerModeEnabled"
581+ checkable: !deviceItemView.deviceBusy && !deviceItemView.detectionError
582+ visible: deviceItemView.deviceConnected
583+ }
584+ /*
585+ FeatureStateItem {
586+ text: "Has writeable image"
587+ input: hasWriteableImage
588+ inputRole: "hasWriteableImage"
589+ checkable: false
590+ visible: deviceItemView.deviceConnected
591+ }
592+ */
593+ }
594+ }
595+
596+ SectionItem {
597+ title: "Kits"
598+ expanded: true
599+
600+ Column {
601+ anchors.left: parent.left
602+ anchors.right: parent.right
603+
604+ Repeater {
605+ model: kits
606+ delegate: ListItem.Standard {
607+ text: modelData.displayName
608+ Layout.fillWidth: true
609+ control: Button{
610+ text: "Remove"
611+ enabled: !deviceItemView.deviceBusy
612+ onClicked: devicesModel.triggerKitRemove(deviceId,modelData.id)
613+ }
614+ }
615+ }
616+
617+ Item {
618+ clip: true
619+ visible: kits.length === 0
620+ height: label.contentHeight + units.gu(15)
621+ width: parent.width
622+ Label {
623+ id:label
624+ anchors.centerIn: parent
625+ anchors.bottom: button.top
626+ fontSize: "large"
627+ 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 "
628+ +"\nor let Qt Creator autocreate one for you."
629+ }
630+ Button {
631+ id: button
632+ anchors.left: label.left
633+ anchors.right: label.right
634+ anchors.top: label.bottom
635+ anchors.bottom: parent.bottom
636+ anchors.topMargin: units.gu(2)
637+ text: "Autocreate"
638+ enabled: !deviceItemView.deviceBusy
639+ onClicked: devicesModel.triggerKitAutocreate(deviceId)
640+ }
641+ }
642+
643+
644+ }
645+ }
646+
647+ SectionItem {
648+ title: "Control"
649+ visible: deviceItemView.deviceConnected
650+
651+ Column {
652+ anchors.left: parent.left
653+ anchors.right: parent.right
654+
655+ ListItem.Standard {
656+ text:"Clone time config from Host to Device"
657+ control: Button{
658+ text: "Execute"
659+ enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
660+ onClicked: devicesModel.triggerCloneTimeConfig(deviceId)
661+ }
662+ }
663+ ListItem.Standard {
664+ text:"Enable port forwarding"
665+ control: Button{
666+ text: "Execute"
667+ enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
668+ onClicked: devicesModel.triggerPortForwarding(deviceId)
669+ }
670+ }
671+ ListItem.Standard {
672+ text:"Setup public key authentication"
673+ control: Button{
674+ text: "Execute"
675+ enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
676+ onClicked: devicesModel.triggerSSHSetup(deviceId)
677+ }
678+ }
679+ ListItem.Standard {
680+ text:"Open SSH connection to the device"
681+ control: Button{
682+ text: "Execute"
683+ enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
684+ onClicked: devicesModel.triggerSSHConnection(deviceId)
685+ }
686+ }
687+ ListItem.Standard {
688+ text:"Reboot"
689+ control: Button{
690+ text: "Execute"
691+ enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
692+ onClicked: devicesModel.triggerReboot(deviceId)
693+ }
694+ }
695+ ListItem.Standard {
696+ text:"Reboot to bootloader"
697+ control: Button{
698+ text: "Execute"
699+ enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
700+ onClicked: devicesModel.triggerRebootBootloader(deviceId)
701+ }
702+ }
703+ ListItem.Standard {
704+ text:"Reboot to recovery"
705+ control: Button{
706+ text: "Execute"
707+ enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
708+ onClicked: devicesModel.triggerRebootRecovery(deviceId)
709+ }
710+ }
711+ ListItem.Standard {
712+ text:"Shutdown"
713+ control: Button{
714+ text: "Execute"
715+ enabled: !deviceItemView.deviceBusy && !deviceItemView.detectionError
716+ onClicked: devicesModel.triggerShutdown(deviceId)
717+ }
718+ }
719+ }
720+
721+ }
722+
723+ SectionItem {
724+ title: "Log"
725+ Column {
726+ anchors.left: parent.left
727+ anchors.right: parent.right
728+ TextArea {
729+ anchors.left: parent.left
730+ anchors.right: parent.right
731+ height: units.gu(60)
732+ highlighted: true
733+
734+ readOnly: true
735+ text: deviceLog
736+ textFormat: TextEdit.AutoText
737+ }
738+ }
739 }
740 }
741 }
742
743=== added file 'share/qtcreator/ubuntu/devicespage/ScrollableView.qml'
744--- share/qtcreator/ubuntu/devicespage/ScrollableView.qml 1970-01-01 00:00:00 +0000
745+++ share/qtcreator/ubuntu/devicespage/ScrollableView.qml 2014-10-08 10:38:58 +0000
746@@ -0,0 +1,55 @@
747+/*
748+ * Copyright 2013 Canonical Ltd.
749+ *
750+ * This program is free software; you can redistribute it and/or modify
751+ * it under the terms of the GNU Lesser General Public License as published by
752+ * the Free Software Foundation; version 3.
753+ *
754+ * This program is distributed in the hope that it will be useful,
755+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
756+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
757+ * GNU Lesser General Public License for more details.
758+ *
759+ * You should have received a copy of the GNU Lesser General Public License
760+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
761+ */
762+
763+import QtQuick 2.0
764+import Ubuntu.Components 0.1
765+
766+Item {
767+ id: template
768+
769+ width: units.gu(40)
770+ height: units.gu(75)
771+
772+ default property alias content: layout.children
773+ property alias spacing: layout.spacing
774+ property Item tools: null
775+ property Flickable flickable: flickable
776+
777+ Flickable {
778+ id: flickable
779+ objectName: "TemplateFlickable"
780+ anchors.fill: parent
781+ anchors.topMargin: units.gu(2)
782+ anchors.bottomMargin: units.gu(2)
783+ contentHeight: layout.height
784+ interactive: contentHeight > height
785+
786+ Column {
787+ id: layout
788+ spacing: units.gu(6)
789+ anchors.left: parent.left
790+ anchors.right: parent.right
791+ anchors.margins: units.gu(2)
792+ }
793+ }
794+
795+ Scrollbar {
796+ id: sb
797+ objectName: "TemplateScrollbar"
798+ flickableItem: flickable
799+ property alias interactive: sb.__interactive
800+ }
801+}
802
803=== added file 'share/qtcreator/ubuntu/devicespage/SectionItem.qml'
804--- share/qtcreator/ubuntu/devicespage/SectionItem.qml 1970-01-01 00:00:00 +0000
805+++ share/qtcreator/ubuntu/devicespage/SectionItem.qml 2014-10-08 10:38:58 +0000
806@@ -0,0 +1,58 @@
807+/*
808+ * Copyright 2013 Canonical Ltd.
809+ *
810+ * This program is free software; you can redistribute it and/or modify
811+ * it under the terms of the GNU Lesser General Public License as published by
812+ * the Free Software Foundation; version 3.
813+ *
814+ * This program is distributed in the hope that it will be useful,
815+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
816+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
817+ * GNU Lesser General Public License for more details.
818+ *
819+ * You should have received a copy of the GNU Lesser General Public License
820+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
821+ */
822+
823+import QtQuick 2.0
824+import Ubuntu.Components 0.1
825+import Ubuntu.Components.ListItems 0.1 as ListItem
826+
827+ListItem.Expandable {
828+ id: expandingColumnItem
829+ expandedHeight: contentColumn.height + units.gu(1)
830+ collapsedHeight: headerRow.childrenRect.height
831+ divider.visible: false
832+
833+ property string title
834+ default property alias data: contentColumn.data
835+
836+ onClicked: {
837+ expanded = !expanded;
838+ }
839+
840+ Column {
841+ id: contentColumn
842+ anchors { left: parent.left; right: parent.right }
843+ Row{
844+ id: headerRow
845+ anchors { left: parent.left; right: parent.right}
846+ height: childrenRect.height
847+ Icon {
848+ name: expandingColumnItem.expanded ? "view-collapse" : "view-expand"
849+ color: UbuntuColors.orange
850+ width: 24
851+ height: 24
852+ }
853+ Item{
854+ width: units.gu(1)
855+ height: parent.height
856+ }
857+ Label {
858+ id: label
859+ text: expandingColumnItem.title
860+ fontSize: "large"
861+ }
862+ }
863+ }
864+}
865
866=== modified file 'src/ubuntu/ubuntu.pro'
867--- src/ubuntu/ubuntu.pro 2014-09-30 15:44:15 +0000
868+++ src/ubuntu/ubuntu.pro 2014-10-08 10:38:58 +0000
869@@ -38,16 +38,13 @@
870 $$QML_ROOT/welcome/Link.qml \
871 $$QML_ROOT/welcome/NewsBox.qml\
872 $$QML_ROOT/devicespage/main.qml \
873- $$QML_ROOT/devicespage/DeviceAdvancedTab.qml \
874- $$QML_ROOT/devicespage/DeviceBuilderTab.qml \
875- $$QML_ROOT/devicespage/DeviceLogTab.qml \
876 $$QML_ROOT/devicespage/DevicePage.qml \
877 $$QML_ROOT/devicespage/DeviceStatusTab.qml \
878 $$QML_ROOT/devicespage/FeatureStateItem.qml \
879 $$QML_ROOT/devicespage/NewEmulatorDialog.qml \
880- $$QML_ROOT/devicespage/LogPage.qml \
881- $$QML_ROOT/devicespage/DeviceEmulatorTab.qml \
882- $$QML_ROOT/devicespage/DeleteEmulatorDialog.qml
883+ $$QML_ROOT/devicespage/DeleteEmulatorDialog.qml \
884+ $$QML_ROOT/devicespage/ScrollableView.qml \
885+ $$QML_ROOT/devicespage/SectionItem.qml
886
887 OTHER_FILES += \
888 UbuntuProject.mimetypes.xml \

Subscribers

People subscribed via source and target branches