aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/neptune3ui-system-ui.qdoc
blob: 4f26f188cd998c3db4bea8d77db546e5622e92b3 (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
/****************************************************************************
**
** Copyright (C) 2018 Pelagicore AG
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Neptune 3 IVI UI.
**
** $QT_BEGIN_LICENSE:FDL-QTAS$
** Commercial License Usage
** Licensees holding valid commercial Qt Automotive Suite licenses may use
** this file in accordance with the commercial license agreement provided
** with the Software or, alternatively, in accordance with the terms
** contained in a written agreement between you and The Qt Company.  For
** licensing terms and conditions see https://www.qt.io/terms-conditions.
** For further information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
   \page neptune3ui-system-ui.html
   \title Neptune 3 UI - System UI

   Neptune 3's System UI is a Qt QML application comprised of one or more top-level
   QWindows: a \l{center console display}{Center Console} window, an optional
   \l{Instrument Cluster} window and an optional HUD window. It is a special Qt
   QML application as it uses a Wayland server Qt platform backend, which turns
   it into a fully fledged compositing window manager.

   Regular applications (which are called as Neptune 3 applications or simply
   applications) then show up on System UI as plain QML Items that it positions
   on its QML scene as it sees fit. Applications use a \l{Qt Wayland}{Wayland client Qt
   platform backend} instead.

   On target hardware, each of the System UI windows will drive an entire display
   or screen (ie, be fullscreen, controlling all that is rendered on them). But on a
   development environment, each System UI window will be seen as a plain desktop
   window.

   System UI is able to tell them apart by checking their "windowType" window
   property. Application code doesn't have to worry about this implementation
   detail though, this is taken care of by the specialized QML components
   \l{ApplicationCCWindow}, \l{ApplicationICWindow} and \l{PopupWindow}.

   System UI also provides a way to take a screenshot of the current state of
   Neptune 3 UI and export it. At the same time, it also exports the output of
   Qt diagnostic tool. The exported files will be stored under \e {/tmp} folder.
   In order to do this, the user can press and hold the clock at the top right
   corner of the \l{center console display}{Center Console} or press CTRL + p.

   \section1 Wayland Compositor

   \image wayland-compositor.jpg

   The above diagram shows the flow on how applications are composited by a system
   UI that uses Qt Wayland.

   \section1 Neptune 3 Wireframe

   \image wireframe.jpg

   Neptune 3 defines five types of application windows, each of them being handled
   differently by System UI. Namely application center console windows, application
   instrument cluster windows, hud windows, bottom bar windows and application pop-up
   windows.

   \section1 Neptune 3 System UI Window Item vs Neptune 3 Application Window

   \image applicationwindows.jpg

   \section2 Neptune 3 System UI Window Item

   The System UI contains several window items, such as application center console
   window item, application instrument cluster window item, popup window item, bottom
   bar window item and top bar window item. They inherit NeptuneWindowItem that carries
   basic properties to be used by the applications, such as scale factor, accent color
   and current theme. Each window item component has its own specific window
   properties for different purposes

   \section3 Application Center Console Window Item

   ApplicationCCWindowItem component is used by System UI to display application
   windows of type ApplicationCCWindow, where "CC" stands for "Center Console".
   The ApplicationCCWindowItem carries some properties needed by the application,
   such as the states of application widget (widget 1 row, widget 2 rows and widget 3 rows)
   and one state for the maximized view. The application needs to receive the current
   state of the application widget being used by this application to apply some animations
   as each state has its own view / look. Hence, the System UI need to set the window
   property of the widget state to the application. There is also an exposed rectangle
   property that provides some properties, such as x, y, width and height of the visible
   rectangular window area of the application widget that can be used by the application
   to adapt correctly with the window that is clipped by the System UI when the widget
   area is composited.

   \section3 Application Instrument Cluster Window Item

   The ApplicationICWindowItem component is used by System UI to display application windows
   of type ApplicationICWindow, where "IC" stands for "Instrument Cluster".
   The system UI will orchestrate and assign the window to the responsible window item
   and in this case, it will be shown behind the two gauges of the Instrument Cluster.

   \image windowitem.jpg

   \section2 Neptune 3 Application Window

   Neptune 3 provides two main types of application window can be used by
   the Neptune 3 application, \l{ApplicationCCWindow} and \l{ApplicationICWindow}.

   \section3 Application Center Console Window

   The ApplicationCCWindow is the one to be used by the application that has to
   be shown in the center console. It inherits the NeptuneWindow and some additional
   properties that receives the "on window properties changes" that is sent by the System UI
   (see the component documentation for further details). Additionally, for debugging purpose,
   the ApplicationCCWindow provides the Monitor Overlay to show the consumption of particular
   application. This can be enabled through the System UI performance monitor tool.

   \section3 Application Instrument Cluster Window

   Similar to the ApplicationCCWindow, the ApplicationICWindow also inherits the NeptuneWindow
   with some additional window sizes properties. The ApplicationICWindow is an optional feature
   to be used by the Neptune 3 application that want to show its content behind two gauges of
   the instrument cluster.

   \image applicationwindow.jpg

   \section2 Additional Windows

   There are several additional windows for some specific use-cases, such as Popup Window,
   Bottom Bar Window and Top Bar Window. These windows will be taken care by the system UI
   to be shown on their dedicated window item.

   \section3 Popup Window

   The Popup Window can be imported and used by the application that need to show a popup in
   Neptune 3. The system UI will compose the popup window of applications and show it on request.

   \section3 Bottom Bar Window

   The Bottom Bar Window is the window for special application/s to be shown at the bottom side
   of the Center Console. Neptune 3 currently has the climate application to be shown there.
*/