| 1 |
import QtQuick 2.1 |
| 2 |
import QtQuick.Controls 1.0 |
| 3 |
import QtQuick.Layouts 1.0 |
| 4 |
|
| 5 |
ApplicationWindow { |
| 6 |
id: root |
| 7 |
title: PACKAGE_STRING |
| 8 |
|
| 9 |
width: 480 |
| 10 |
height: 600 |
| 11 |
|
| 12 |
visible: true |
| 13 |
color: "#cacafa" |
| 14 |
|
| 15 |
// Hook up connections to the solver, so we can handle the spinning bar. |
| 16 |
Connections { |
| 17 |
target: solver |
| 18 |
|
| 19 |
onSolved: { |
| 20 |
mainStack.push(mainView); |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
StackView { |
| 25 |
|
| 26 |
id: mainStack |
| 27 |
|
| 28 |
MainView { |
| 29 |
id: mainView |
| 30 |
|
| 31 |
onSolveRequested: { |
| 32 |
mainStack.push(loadingIndicator); |
| 33 |
|
| 34 |
// HACK: Close the keyboard before solving otherwise |
| 35 |
// refresh won't work. |
| 36 |
Qt.inputMethod.hide(); |
| 37 |
|
| 38 |
solver.solvePoly(polyText); |
| 39 |
} |
| 40 |
} |
| 41 |
|
| 42 |
LoadingIndicator { |
| 43 |
id: loadingIndicator |
| 44 |
visible: false |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
|
| 49 |
} |