KNewStuff

DialogContent.qml
1/*
2 SPDX-FileCopyrightText: 2019 Dan Leinir Turthra Jensen <admin@leinir.dk>
3 SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk>
4
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6*/
7
8/**
9 * @brief The contents of the NewStuff.Dialog component
10 *
11 * This component is equivalent to the old DownloadWidget, but you should consider
12 * using NewStuff.Page instead for a more modern style of integration into your
13 * application's flow.
14 * @see KNewStuff::DownloadWidget
15 * @since 5.63
16 */
17
18import QtQuick
19import QtQuick.Layouts
20import org.kde.kirigami as Kirigami
21import org.kde.newstuff as NewStuff
22
23Kirigami.ApplicationItem {
24 id: component
25
26 property alias downloadNewWhat: newStuffPage.title
27 /**
28 * The configuration file to use for this button
29 */
30 property alias configFile: newStuffPage.configFile
32 /**
33 * The engine which handles the content in this dialog
34 */
35 property alias engine: newStuffPage.engine
36
37 /**
38 * The default view mode of the dialog spawned by this button. This should be
39 * set using the NewStuff.Page.ViewMode enum
40 * @see NewStuff.Page.ViewMode
41 */
42 property alias viewMode: newStuffPage.viewMode
43
44 function __showEntryDetails(providerId, entryId) {
45 newStuffPage.showEntryDetails(providerId, entryId);
46 }
47
48 // Keep in sync with the default sizes in Dialog.qml and dialog.cpp
49 implicitWidth: Kirigami.Units.gridUnit * 44
50 implicitHeight: Kirigami.Units.gridUnit * 30
51
52 pageStack.defaultColumnWidth: pageStack.width
53 pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Auto
54 pageStack.globalToolBar.canContainHandles: true
55 pageStack.initialPage: NewStuff.Page {
56 id: newStuffPage
57
58 showUploadAction: false
59 }
60
61 contextDrawer: Kirigami.ContextDrawer {
62 id: contextDrawer
63 }
64}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:54:38 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.