Dekko
Loading...
Searching...
No Matches
Main.qml
1import QtQuick 2.4
2import Lomiri.Components 1.3
3import Plugins 0.1
5MainView {
6 height: units.gu(70)
7 width: height
8
9 ActionRegistry {
10 id: actionRegistry
11 location: "Composer::ToolbarAction"
12 defaultActions: [
13 Action {
14 iconName: "ok"
15 onTriggered: console.log("Default action triggered")
16 },
17 Action {
18 iconName: "back"
19 onTriggered: console.log("Not going back now!")
20 }
21 ]
22 }
23
25 target: col
26 asynchronous: true
27 location: "View::Item"
28 defaultItems: [
29 Label {
30 text: "Default label"
31 width: parent.width
32 },
33 Label {
34 text: "Default label 2"
35 width: parent.width
36 },
37 Label {
38 text: "Default label 3"
39 width: parent.width
40 }
41 ]
42 }
43
45 defaultListeners: [
46 Rectangle {
47 width: units.gu(40)
48 height: width
49 color: LomiriColors.red
50 Timer {
51 interval: 1000
52 triggeredOnStart: true
53 repeat: true
54 onTriggered: console.log("Timer triggered")
55 Component.onCompleted: {
56 start()
57 }
58 }
59 }
60 ]
61 }
62
63 Page {
64 header: PageHeader {
65 title: "Page Header"
66 trailingActionBar.actions: actionRegistry.actions
67 }
68
69 Rectangle {
70 color: LomiriColors.porcelain
71 anchors.centerIn: parent
72 height: units.gu(50)
73 width: height
74 Column {
75 id: col
76 anchors {
77 left: parent.left
78 top: parent.top
79 right: parent.right
80 margins: units.gu(2)
81 }
82 spacing: units.gu(1)
83 }
84 }
85 }
86}
87