Lomiri
Loading...
Searching...
No Matches
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
17import QtQuick 2.15
18import QtQml 2.15
19import QtQuick.Window 2.2
20import Lomiri.Components 1.3
21import WindowManager 1.0
22
23Instantiator {
24 id: root
25 model: Screens
26
27 ScreenWindow {
28 id: window
29 objectName: "screen"+index
30 screen: model.screen
31 visibility: applicationArguments.hasFullscreen ? Window.FullScreen : Window.Windowed
32 flags: applicationArguments.hasFrameless ? Qt.FramelessWindowHint : 0
33
34 Binding {
35 when: applicationArguments.hasGeometry
36 target: window
37 property: "width"
38 value: applicationArguments.windowGeometry.width
39 restoreMode: Binding.RestoreBinding
40 }
41 Binding {
42 when: applicationArguments.hasGeometry
43 target: window
44 property: "height"
45 value: applicationArguments.windowGeometry.height
46 restoreMode: Binding.RestoreBinding
47 }
48
49 Loader {
50 width: window.width
51 height: window.height
52
53 sourceComponent: Rectangle {
54 color: "white"
55 Column {
56 spacing: units.gu(1)
57 anchors {
58 left: parent.left
59 right: parent.right
60 }
61
62 Label {
63 text: "Lomiri encountered an unrecoverable error while loading:"
64 fontSize: "large"
65 color: "black"
66 wrapMode: Text.WordWrap
67 anchors {
68 left: parent.left
69 right: parent.right
70 }
71 }
72
73 Label {
74 text: errorString
75 color: "black"
76 wrapMode: Text.WordWrap
77 anchors {
78 left: parent.left
79 right: parent.right
80 }
81 }
82 }
83 }
84 }
85 }
86}