-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.qml
64 lines (50 loc) · 2.01 KB
/
main.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import QtQuick 2.12
import QtQuick.Window 2.12
Item {
// width: 1023
// height: 1023
visible: true
property int dimensionsWidth: 0
property int dimensionsHeight: 0
property int tileWidthHeightInPixel: 0
property string lineColor: "black"
property string background: "white"
property string nonCollapsedBorderColor: "lightgrey"
Component.onCompleted: {
tileWidthHeightInPixel = handler.calculateTilePixelWidthHeight()
console.log(tileWidthHeightInPixel)
dimensionsWidth = handler.getDimensionsWidth()
dimensionsHeight = handler.getDimensionsHeight()
this.width = tileWidthHeightInPixel * dimensionsWidth
this.height = tileWidthHeightInPixel * dimensionsHeight
// let widthHeight = 1920
// if (widthHeight % dimensionsWidth !== 0) {
// let factor = Math.floor(widthHeight / dimensionsWidth) + 1
// widthHeight = (factor) * dimensionsWidth
// while (factor % 5 !== 0) {
// factor++
// }
// console.log("Factor: " + factor)
// }
// this.width = widthHeight
// this.height = widthHeight * (dimensionsHeight / dimensionsWidth)
// let factor = 0
// dimensionsWidth = handler.getDimensionsWidth()
// dimensionsHeight = handler.getDimensionsHeight()
// if (1000 % dimensionsWidth !== 0) {
// let factor = Math.floor(1000 / dimensionsWidth) + 1
// //widthHeight = (factor) * dimensionsWidth
// while (factor % 5 !== 0) {
// factor++
// }
// console.log("Factor: " + factor)
// }
// // this.width = handler.getDimensionsWidth() * factor
// // this.height = handler.getDimensionsHeight() * factor
pageLoader.source = "Canvas.qml"
}
Loader {
id: pageLoader
anchors.fill: parent
}
}