| 1 |
import QtQuick 2.1 |
| 2 |
|
| 3 |
Item { |
| 4 |
|
| 5 |
id: top |
| 6 |
|
| 7 |
width: parent.width |
| 8 |
height: parent.height |
| 9 |
|
| 10 |
signal solveRequested(string polyText); |
| 11 |
|
| 12 |
Column { |
| 13 |
id: pageLayout |
| 14 |
|
| 15 |
spacing: 16 |
| 16 |
|
| 17 |
anchors.fill: parent |
| 18 |
anchors.margins: 16 |
| 19 |
|
| 20 |
Text { |
| 21 |
text: PACKAGE_STRING |
| 22 |
font.pointSize: 16 |
| 23 |
} |
| 24 |
|
| 25 |
PolyInputField { |
| 26 |
onSolveRequested: { |
| 27 |
top.solveRequested(polyText); |
| 28 |
} |
| 29 |
} |
| 30 |
|
| 31 |
onWidthChanged: { |
| 32 |
console.log ("Width changed"); |
| 33 |
top.update(); |
| 34 |
} |
| 35 |
|
| 36 |
// Phone view: activated only if root.width < root.height |
| 37 |
SwitchableApproximationView { |
| 38 |
id: switchableView |
| 39 |
width: parent.width |
| 40 |
height: root.height - 175 |
| 41 |
visible: (root.width < root.height) |
| 42 |
} |
| 43 |
|
| 44 |
// Tablet view: activated only if root.width >= root.height |
| 45 |
CombinedApproximationView { |
| 46 |
width: root.width |
| 47 |
height: root.height - 140 |
| 48 |
visible: (root.width >= root.height) |
| 49 |
} |
| 50 |
} |
| 51 |
} |