Changeset View
Changeset View
Standalone View
Standalone View
source/qml/lib/Demo.qml
Show All 12 Lines | |||||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU Library General Public | 14 | * You should have received a copy of the GNU Library General Public | ||
15 | * License along with this program; if not, write to the | 15 | * License along with this program; if not, write to the | ||
16 | * Free Software Foundation, Inc., | 16 | * Free Software Foundation, Inc., | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | import QtQuick 2.2 | 20 | import QtQuick 2.2 | ||
21 | import QtQuick.Layouts 1.2 | ||||
21 | import QtQuick.Controls 2.2 | 22 | import QtQuick.Controls 2.2 | ||
22 | import org.kde.kirigami 2.4 as Kirigami | 23 | import org.kde.kirigami 2.4 as Kirigami | ||
23 | import "tools.js" as T | 24 | import "tools.js" as T | ||
24 | import "annotate.js" as A | 25 | import "annotate.js" as A | ||
25 | 26 | | |||
26 | Rectangle { | 27 | Rectangle { | ||
27 | width: 320 | 28 | width: 320 | ||
28 | height: 280 | 29 | height: 280 | ||
Show All 17 Lines | 36 | Row { | |||
46 | 47 | | |||
47 | Rectangle { | 48 | Rectangle { | ||
48 | id: right1 | 49 | id: right1 | ||
49 | width: Kirigami.Units.largeSpacing * 8 | 50 | width: Kirigami.Units.largeSpacing * 8 | ||
50 | height: Kirigami.Units.largeSpacing * 8 | 51 | height: Kirigami.Units.largeSpacing * 8 | ||
51 | color: "#27ae60" | 52 | color: "#27ae60" | ||
52 | anchors.top: parent.top; | 53 | anchors.top: parent.top; | ||
53 | } | 54 | } | ||
54 | ComboBox { | | |||
55 | model: [ "Item1", "Item2", "Item3" ] | | |||
56 | } | | |||
57 | } | 55 | } | ||
58 | 56 | | |||
59 | Row { | 57 | Row { | ||
60 | spacing: Kirigami.Units.smallSpacing * 8 | 58 | spacing: Kirigami.Units.smallSpacing * 8 | ||
61 | x: Kirigami.Units.gridUnit * 2 | 59 | x: Kirigami.Units.gridUnit * 2 | ||
62 | y: Kirigami.Units.gridUnit * 8 | 60 | y: Kirigami.Units.gridUnit * 8 | ||
63 | 61 | | |||
64 | Rectangle { | 62 | Rectangle { | ||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 95 | onTriggered: { | |||
106 | a.find("qquickrectangle").eq(2).draw({ | 104 | a.find("qquickrectangle").eq(2).draw({ | ||
107 | outline: {aspectratio: true}, | 105 | outline: {aspectratio: true}, | ||
108 | ruler: {horizontal: true} | 106 | ruler: {horizontal: true} | ||
109 | }); | 107 | }); | ||
110 | 108 | | |||
111 | a.find("qquickrectangle").eq(3).draw({ | 109 | a.find("qquickrectangle").eq(3).draw({ | ||
112 | messure: { to: a.find("qquickrectangle").eq(4)} | 110 | messure: { to: a.find("qquickrectangle").eq(4)} | ||
113 | }); | 111 | }); | ||
114 | | ||||
115 | a.find("qquickcombobox").click(); | | |||
116 | } | 112 | } | ||
117 | } | 113 | } | ||
118 | 114 | | |||
119 | // Draw helpers and anotation | 115 | // Draw helpers and anotation | ||
120 | Raster { | 116 | Raster { | ||
121 | base: Kirigami.Units.gridUnit | 117 | base: Kirigami.Units.gridUnit | ||
122 | mobile: true | 118 | mobile: true | ||
123 | desktop: true | 119 | desktop: true | ||
124 | } | 120 | } | ||
125 | } | 121 | } |