1 import QtQuick 2.7 |
1 import QtQuick 2.7 |
2 import QtQuick.Controls 2.0 |
2 import QtQuick.Controls 2.0 |
3 import QtQuick.Layouts 1.3 |
3 import QtQuick.Layouts 1.3 |
4 |
4 |
|
5 import Hedgewars.Engine 1.0 |
|
6 |
5 Item { |
7 Item { |
6 property alias textField1: textField1 |
8 id: element |
7 property alias button1: button1 |
9 property alias button1: button1 |
|
10 property alias previewImage: previewImage |
|
11 property alias gameButton: gameButton |
|
12 width: 1024 |
|
13 height: 800 |
|
14 property alias netButton: netButton |
|
15 property alias tickButton: tickButton |
|
16 property alias gameView: gameView |
|
17 |
|
18 ColumnLayout { |
|
19 anchors.fill: parent |
8 |
20 |
9 RowLayout { |
21 RowLayout { |
10 anchors.horizontalCenter: parent.horizontalCenter |
22 Layout.alignment: Qt.AlignHCenter |
11 anchors.topMargin: 20 |
|
12 anchors.top: parent.top |
|
13 |
23 |
14 TextField { |
24 Button { |
15 id: textField1 |
25 id: button1 |
16 placeholderText: qsTr("Text Field") |
26 text: qsTr("Preview") |
|
27 } |
|
28 |
|
29 Button { |
|
30 id: gameButton |
|
31 text: qsTr("Game") |
|
32 } |
|
33 |
|
34 Button { |
|
35 id: tickButton |
|
36 text: qsTr("Tick") |
|
37 } |
|
38 } |
|
39 |
|
40 Rectangle { |
|
41 border.color: "orange" |
|
42 border.width: 5 |
|
43 radius: 5 |
|
44 |
|
45 Layout.minimumHeight: 256 |
|
46 Layout.fillWidth: true |
|
47 |
|
48 gradient: Gradient { |
|
49 GradientStop { |
|
50 position: 0 |
|
51 color: "lightblue" |
17 } |
52 } |
|
53 GradientStop { |
|
54 position: 0.9 |
|
55 color: "blue" |
|
56 } |
|
57 GradientStop { |
|
58 position: 0.9 |
|
59 color: "darkblue" |
|
60 } |
|
61 GradientStop { |
|
62 position: 1.0 |
|
63 color: "darkblue" |
|
64 } |
|
65 } |
18 |
66 |
19 Button { |
67 Image { |
20 id: button1 |
68 id: previewImage |
21 text: qsTr("Press Me") |
69 |
22 } |
70 anchors.fill: parent |
|
71 anchors.margins: parent.radius |
|
72 source: "qrc:/res/iconTime.png" |
|
73 fillMode: Image.PreserveAspectFit |
|
74 cache: false |
|
75 } |
23 } |
76 } |
|
77 |
|
78 GameView { |
|
79 id: gameView |
|
80 |
|
81 Layout.fillWidth: true |
|
82 Layout.fillHeight: true |
|
83 } |
|
84 } |
|
85 |
|
86 Button { |
|
87 id: netButton |
|
88 text: qsTr("Net") |
|
89 anchors.bottom: parent.bottom |
|
90 anchors.bottomMargin: 8 |
|
91 anchors.left: parent.left |
|
92 anchors.leftMargin: 8 |
|
93 } |
24 } |
94 } |