KNewStuff

Dialog.qml
1 /*
2  SPDX-FileCopyrightText: 2019 Dan Leinir Turthra Jensen <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6 
17 import QtQuick 2.11
18 import QtQuick.Controls 2.5 as QtControls
19 import QtQuick.Layouts 1.11 as QtLayouts
20 import QtQuick.Dialogs 1.3 as QtDialogs
21 
22 import org.kde.kirigami 2.7 as Kirigami
23 import org.kde.newstuff 1.62 as NewStuff
24 
25 QtDialogs.Dialog {
26  id: component
27 
31  property alias configFile: newStuffPage.configFile
32 
40  property string downloadNewWhat: engine.name
41  title: component.downloadNewWhat.length > 0 ? i18ndc("knewstuff5", "The dialog title when we know which type of stuff is being requested", "Download New %1", component.downloadNewWhat) : i18ndc("knewstuff5", "A placeholder title used in the dialog when there is no better title available", "Download New Stuff")
42 
46  property alias engine: newStuffPage.engine
47 
53  property alias viewMode: newStuffPage.viewMode
54 
59  signal aboutToShowDialog();
60 
67  property alias changedEntries: component.engine.changedEntries
68 
69  onVisibleChanged: {
70  if (visible === true) {
71  newStuffPage.engine.resetChangedEntries();
72  }
73  }
74 
75  contentItem: Rectangle {
76  color: Kirigami.Theme.backgroundColor
77  implicitWidth: 700
78  implicitHeight: 540
79  Keys.onEscapePressed: component.close()
80  NewStuff.DialogContent {
81  id: newStuffPage
82  anchors {
83  top: parent.top
84  left: parent.left
85  right: parent.right
86  bottom: buttonBox.top
87  }
88  downloadNewWhat: component.downloadNewWhat
89  }
90  QtControls.DialogButtonBox {
91  id: buttonBox
92  anchors {
93  left: parent.left
94  right: parent.right
95  bottom: parent.bottom
96  }
97  standardButtons: QtControls.DialogButtonBox.Close
98  onRejected: component.close()
99  }
100  }
101 }
QString i18ndc(const char *domain, const char *context, const char *text, const TYPE &arg...)
QTextStream & left(QTextStream &s)
QTextStream & right(QTextStream &s)
int length() const const
A dialog which has a NewStuff.Page at the base.
Definition: Dialog.qml:23
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 18 2021 22:43:49 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.