Lomiri
ErrorApplication.qml
1 /*
2 * Copyright (C) 2017 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16 
17 import QtQuick 2.4
18 import QtQuick.Window 2.2
19 import Lomiri.Components 1.3
20 import WindowManager 1.0
21 
22 Instantiator {
23  id: root
24  model: Screens
25 
26  ScreenWindow {
27  id: window
28  objectName: "screen"+index
29  screen: model.screen
30  visibility: applicationArguments.hasFullscreen ? Window.FullScreen : Window.Windowed
31  flags: applicationArguments.hasFrameless ? Qt.FramelessWindowHint : 0
32 
33  Binding {
34  when: applicationArguments.hasGeometry
35  target: window
36  property: "width"
37  value: applicationArguments.windowGeometry.width
38  }
39  Binding {
40  when: applicationArguments.hasGeometry
41  target: window
42  property: "height"
43  value: applicationArguments.windowGeometry.height
44  }
45 
46  Loader {
47  width: window.width
48  height: window.height
49 
50  Rectangle {
51  color: "white"
52  Column {
53  spacing: units.gu(1)
54 
55  Label {
56  text: "Lomiri encountered an unrecoverable error while loading:"
57  fontSize: "large"
58  }
59 
60  Label {
61  text: errorString
62  }
63  }
64  }
65  }
66  }
67 }