1 /*
2     This file is part of KNewStuff2.
3     SPDX-FileCopyrightText: 2002 Cornelius Schumacher <schumacher@kde.org>
4 
5     SPDX-License-Identifier: LGPL-2.1-or-later
6 */
7 #ifndef KNEWSTUFF3_KNEWSTUFFACTION_H
8 #define KNEWSTUFF3_KNEWSTUFFACTION_H
9 
10 #include "knewstuff_export.h"
11 #include <QString>
12 
13 class QObject;
14 class QAction;
15 class KActionCollection;
16 
17 /**
18  * The namespace for the KNewStuff classes
19  */
20 namespace KNS3
21 {
22 #if KNEWSTUFF_ENABLE_DEPRECATED_SINCE(5, 78)
23 /**
24  * @brief Standard action for the Hot New Stuff Download
25  *
26  * This action can be used to add KNewStuff support to menus and toolbars.
27  *
28  * @param what text describing what is being downloaded. For consistency,
29  *             set it to "Get New Foobar...".
30  *             Examples: "Get New Wallpapers...", "Get New Emoticons..."
31  * @param receiver the QObject to connect the triggered(bool) signal to.
32  * @param slot the slot to connect the triggered(bool) signal to.
33  * @param parent the action's parent collection.
34  * @param name The name by which the action will be retrieved again from the collection.
35  * @since 4.4
36  * @deprecated Since 5.78, create the QAction instance manually.
37  */
38 KNEWSTUFF_EXPORT
39 KNEWSTUFF_DEPRECATED_VERSION(5, 78, "Create the QAction instance manually")
40 QAction *standardAction(const QString &what, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name = nullptr);
41 #endif
42 
43 #if KNEWSTUFF_ENABLE_DEPRECATED_SINCE(5, 78)
44 /**
45  * @brief Standard action for Uploading files with Hot New Stuff
46  *
47  * This action can be used to add KNewStuff support to menus and toolbars.
48  *
49  * @param what text describing what is being downloaded. For consistency,
50  *             set it to "Upload Current Foobar...".
51  *             Examples: "Upload Current Wallpaper...", "Upload Current Document..."
52  * @param receiver the QObject to connect the triggered(bool) signal to.
53  * @param slot the slot to connect the triggered(bool) signal to.
54  * @param parent the action's parent collection.
55  * @param name The name by which the action will be retrieved again from the collection.
56  * @since 4.5
57  * @deprecated Since 5.78, create the QAction instance manually.
58  */
59 KNEWSTUFF_EXPORT
60 KNEWSTUFF_DEPRECATED_VERSION(5, 78, "Create the QAction instance manually")
61 QAction *standardActionUpload(const QString &what, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name = nullptr);
62 #endif
63 }
64 
65 #endif // KNEWSTUFFACTION_H
66