summaryrefslogtreecommitdiffstats
path: root/examples/applicationmanager/frame-timer/doc/src/frame-timer-example.qdoc
blob: 2397f50801325950913be339f5b618acbeb78078 (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
/****************************************************************************
**
** Copyright (C) 2019 Luxoft Sweden AB
** Copyright (C) 2018 Pelagicore AG
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Luxoft Application Manager.
**
** $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$
**
****************************************************************************/

/*!

\example applicationmanager/frame-timer
\title Display Frame Rate for the System UI and Applications Example
\image frame-timer-example.png The "FrameTimer" example with two applications running.
\brief How to use the FrameTimer to display information about the frame rate.
\ingroup applicationmanager-examples

\section1 Introduction

This example shows you how to use the \l FrameTimer component to display frame rate information for
both the System UI and the application windows.

The System UI comprises of a column of application icons on the left and a graph on the top
right, displaying the average frame rate for the System UI itself. To be more precise, this is the
System UI's top-level Window. If there are no applications running, the System UI's frame rate
typically stays at 1 Frame per Second (FPS). This is because a Qt QML application window is only
redrawn= when necessary. If nothing has changed in this window, it isn't redrawn. System UI's frame
rate is then 0 FPS. The only reason the System UI stays around 1 FPS when there are no applications
running is because of the FPS graph itself, which is updated once every second and thus causes a
redraw of the System UI. This is commonly referred to as the
\l{https://en.wikipedia.org/wiki/Observer_effect_(information_technology)}{Observer effect}.

The Fish application animates, and therefore redraws, at a rate of 25 FPS. So running it will
instantly raise the frame-rate of System UI to 25 FPS as well.

\quotefromfile applicationmanager/frame-timer/apps/frame-timer.fish/fish.qml
\skipto Timer
\printuntil /^\}/

The Rabbit application animates at native speed, which is as fast as the system can or is
configured to do, which is usually 60 FPS. Consequently, running this application raises the
System UI's FPS further, to 60 FPS.

\quotefromfile applicationmanager/frame-timer/apps/frame-timer.rabbit/rabbit.qml
\skipto RotationAnimation
\printuntil /^\}/

*/