Kstars

TutorialPane.qml
1 // SPDX-FileCopyrightText: 2016 Artem Fedoskin <[email protected]>
2 // SPDX-License-Identifier: GPL-2.0-or-later
3 
4 import QtQuick 2.7
5 
6 import QtQuick.Controls 2.0
7 import QtQuick.Controls.Material 2.0
8 import QtQuick.Controls.Universal 2.0
9 
10 import QtQuick.Window 2.2 as Window
11 import QtQuick.Layouts 1.1
12 import "../../modules"
13 
14 Pane {
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-2022 The KDE developers.
Generated on Fri Aug 12 2022 04:00:58 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.