Debian Codegraph @

src/modules/notesqml/examples/notesqml.qml.example

raw
1 /* === This file is part of Calamares - <https://calamares.io> ===
2 *
3 * SPDX-FileCopyrightText: 2020 Anke Boersma <[email protected]>
4 * SPDX-FileCopyrightText: 2020 Adriaan de Groot <[email protected]>
5 * SPDX-License-Identifier: GPL-3.0-or-later
6 *
7 */
8
9 /* Some Calamares internals are available to all QML modules.
10 * They live in the calamares.ui namespace (filled programmatically
11 * by Calamares). One of the internals that is exposed is the
12 * Branding object, which can be used to retrieve strings and paths
13 * and colors.
14 */
15 import calamares.ui 1.0
16
17 import QtQuick 2.7 import QtQuick.Controls 2.2 import QtQuick.Window 2.2 import QtQuick.Layouts 1.3 import QtQuick.Controls.Material 2.1
18
19 Item
20 {
21 width:
22 740 height : 420
23
24 Flickable
25 {
26 id:
27 flick anchors
28 .fill : parent contentHeight : 800
29
30 ScrollBar.vertical : ScrollBar { id : fscrollbar width : 10 policy : ScrollBar.AlwaysOn }
31
32 TextArea
33 {
34 id:
35 intro
36 x: 1
37 y: 0
38 width:
39 parent.width - fscrollbar.width
40 font.pointSize: 14
41 textFormat:
42 Text.RichText
43 antialiasing:
44 true
45 activeFocusOnPress:
46 false
47 wrapMode:
48 Text.WordWrap
49
50 text:
51 qsTr( "<h3>%1</h3>
52 <p>This an example QML file, showing options in RichText with Flickable content.</p>
53
54 <p>QML with RichText can use HTML tags, Flickable content is useful for touchscreens.</p>
55
56 <p><b>This is bold text</b></p>
57 <p><i>This is italic text</i></p>
58 <p><u>This is underlined text</u></p>
59 <p><center>This text will be center-aligned.</center></p>
60 <p><s>This is strikethrough</s></p>
61
62 <p>Code example:
63 <code>ls -l /home</code></p>
64
65 <p><b>Lists:</b></p>
66 <ul>
67 <li>Intel CPU systems</li>
68 <li>AMD CPU systems</li>
69 </ul>
70
71 <p>The vertical scrollbar is adjustable, current width set to 10.</p>").arg(Branding.string(Branding.VersionedName))
72 }
73 }
74 }