Kstars

TutorialPane.qml
1// SPDX-FileCopyrightText: 2016 Artem Fedoskin <afedoskin3@gmail.com>
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4import QtQuick 2.7
5
6import QtQuick.Controls 2.0
7import QtQuick.Controls.Material 2.0
8import QtQuick.Controls.Universal 2.0
9
10import QtQuick.Window 2.2 as Window
11import QtQuick.Layouts 1.1
12import "../../modules"
13
14Pane {
15 property string title
16 property string description
17 signal nextClicked()
18 focus: true
19 Column {
20 width: parent.width
21 height: childrenRect.height
22
23 KSLabel {
24 width: parent.width
25 wrapMode: Text.Wrap
26 horizontalAlignment: Text.AlignHCenter
27 text: title
28 font.pointSize: 20
29 }
30
31 KSText {
32 width: parent.width
33 wrapMode: Text.Wrap
34 horizontalAlignment: Text.AlignHCenter
35 text: description
36 }
37
38 Flow {
39 property int buttonWidth: children[0].width + children[1].width + spacing * 2
40 width: parent.width > buttonWidth ? buttonWidth : parent.width
41 spacing: 5
42 anchors.horizontalCenter: parent.horizontalCenter
43
44 Button {
45 text: xi18n("Exit")
46 onClicked: askExitTutorial()
47 }
48
49 Button {
50 text: xi18n("Next")
51 onClicked: {
52 nextClicked()
53 }
54 }
55 }
56 }
57}
58
QString xi18n(const char *text, const TYPE &arg...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:48:26 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.