Warning, /frameworks/knewstuff/src/qtquick/qml/DialogContent.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2019 Dan Leinir Turthra Jensen <admin@leinir.dk>
0003 SPDX-FileCopyrightText: 2023 ivan tkachenko <me@ratijas.tk>
0004
0005 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0006 */
0007
0008 /**
0009 * @brief The contents of the NewStuff.Dialog component
0010 *
0011 * This component is equivalent to the old DownloadWidget, but you should consider
0012 * using NewStuff.Page instead for a more modern style of integration into your
0013 * application's flow.
0014 * @see KNewStuff::DownloadWidget
0015 * @since 5.63
0016 */
0017
0018 import QtQuick
0019 import QtQuick.Layouts
0020 import org.kde.kirigami 2 as Kirigami
0021 import org.kde.newstuff as NewStuff
0022
0023 Kirigami.ApplicationItem {
0024 id: component
0025
0026 property alias downloadNewWhat: newStuffPage.title
0027 /**
0028 * The configuration file to use for this button
0029 */
0030 property alias configFile: newStuffPage.configFile
0031
0032 /**
0033 * The engine which handles the content in this dialog
0034 */
0035 property alias engine: newStuffPage.engine
0036
0037 /**
0038 * The default view mode of the dialog spawned by this button. This should be
0039 * set using the NewStuff.Page.ViewMode enum
0040 * @see NewStuff.Page.ViewMode
0041 */
0042 property alias viewMode: newStuffPage.viewMode
0043
0044 function __showEntryDetails(providerId, entryId) {
0045 newStuffPage.showEntryDetails(providerId, entryId);
0046 }
0047
0048 Layout.preferredWidth: Kirigami.Units.gridUnit * 50
0049 Layout.preferredHeight: Kirigami.Units.gridUnit * 40
0050
0051 pageStack.defaultColumnWidth: pageStack.width
0052 pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Auto
0053 pageStack.globalToolBar.canContainHandles: true
0054 pageStack.initialPage: NewStuff.Page {
0055 id: newStuffPage
0056
0057 showUploadAction: false
0058 }
0059
0060 contextDrawer: Kirigami.ContextDrawer {
0061 id: contextDrawer
0062 }
0063 }