Changeset View
Changeset View
Standalone View
Standalone View
src/qtquick/qml/NewStuffDialogContent.qml
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2019 Dan Leinir Turthra Jensen <admin@leinir.dk> | ||||
3 | * | ||||
4 | * This library is free software; you can redistribute it and/or | ||||
5 | * modify it under the terms of the GNU Lesser General Public | ||||
6 | * License as published by the Free Software Foundation; either | ||||
7 | * version 2.1 of the License, or (at your option) version 3, or any | ||||
8 | * later version accepted by the membership of KDE e.V. (or its | ||||
9 | * successor approved by the membership of KDE e.V.), which shall | ||||
10 | * act as a proxy defined in Section 6 of version 3 of the license. | ||||
11 | * | ||||
12 | * This library is distributed in the hope that it will be useful, | ||||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
15 | * Lesser General Public License for more details. | ||||
16 | * | ||||
17 | * You should have received a copy of the GNU Lesser General Public | ||||
18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | * | ||||
20 | */ | ||||
21 | | ||||
22 | /** | ||||
23 | * @brief The contents of the NewStuffDialog component | ||||
24 | * | ||||
25 | * This component is equivalent to the old DownloadWidget, but you should consider | ||||
26 | * using NewStuffPage instead for a more modern style of integration into your | ||||
27 | * application's flow. | ||||
28 | * @see KNewStuff::DownloadWidget | ||||
29 | */ | ||||
30 | | ||||
31 | import QtQuick 2.7 | ||||
32 | import QtQuick.Layouts 1.12 as QtLayouts | ||||
33 | import org.kde.kirigami 2.7 as Kirigami | ||||
34 | | ||||
35 | Kirigami.ApplicationItem { | ||||
36 | id: component | ||||
37 | | ||||
38 | property alias downloadNewWhat: newStuffPage.title | ||||
39 | /** | ||||
40 | * The configuration file to use for this button | ||||
41 | */ | ||||
42 | property alias configFile: newStuffPage.configFile | ||||
43 | | ||||
44 | /** | ||||
45 | * The engine which handles the content in this dialog | ||||
46 | */ | ||||
47 | property alias engine: newStuffPage.engine | ||||
48 | | ||||
49 | /** | ||||
50 | * The default view mode of the dialog spawned by this button. This should be | ||||
51 | * set using the NewStuffPage.ViewMode enum | ||||
52 | * @see NewStuffPage.ViewMode | ||||
53 | */ | ||||
54 | property alias viewMode: newStuffPage.viewMode | ||||
55 | | ||||
56 | QtLayouts.Layout.preferredWidth: Kirigami.Units.gridUnit * 50 | ||||
57 | QtLayouts.Layout.preferredHeight: Kirigami.Units.gridUnit * 40 | ||||
58 | pageStack.defaultColumnWidth: pageStack.width | ||||
59 | pageStack.globalToolBar.style: Kirigami.ApplicationHeaderStyle.Auto | ||||
60 | pageStack.initialPage: NewStuffPage { | ||||
61 | id: newStuffPage | ||||
62 | } | ||||
63 | } |