File indexing completed on 2024-03-24 15:36:51

0001 /*
0002     This file is part of KNewStuff2.
0003     SPDX-FileCopyrightText: 2002 Cornelius Schumacher <schumacher@kde.org>
0004 
0005     SPDX-License-Identifier: LGPL-2.1-or-later
0006 */
0007 #ifndef KNEWSTUFF3_KNEWSTUFFACTION_H
0008 #define KNEWSTUFF3_KNEWSTUFFACTION_H
0009 
0010 #include "knewstuff_export.h"
0011 #include <QString>
0012 
0013 class QObject;
0014 class QAction;
0015 class KActionCollection;
0016 
0017 /**
0018  * The namespace for the KNewStuff classes
0019  */
0020 namespace KNS3
0021 {
0022 #if KNEWSTUFF_ENABLE_DEPRECATED_SINCE(5, 78)
0023 /**
0024  * @brief Standard action for the Hot New Stuff Download
0025  *
0026  * This action can be used to add KNewStuff support to menus and toolbars.
0027  *
0028  * @param what text describing what is being downloaded. For consistency,
0029  *             set it to "Get New Foobar...".
0030  *             Examples: "Get New Wallpapers...", "Get New Emoticons..."
0031  * @param receiver the QObject to connect the triggered(bool) signal to.
0032  * @param slot the slot to connect the triggered(bool) signal to.
0033  * @param parent the action's parent collection.
0034  * @param name The name by which the action will be retrieved again from the collection.
0035  * @since 4.4
0036  * @deprecated Since 5.78, create the QAction instance manually.
0037  */
0038 KNEWSTUFF_EXPORT
0039 KNEWSTUFF_DEPRECATED_VERSION(5, 78, "Create the QAction instance manually")
0040 QAction *standardAction(const QString &what, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name = nullptr);
0041 #endif
0042 
0043 #if KNEWSTUFF_ENABLE_DEPRECATED_SINCE(5, 78)
0044 /**
0045  * @brief Standard action for Uploading files with Hot New Stuff
0046  *
0047  * This action can be used to add KNewStuff support to menus and toolbars.
0048  *
0049  * @param what text describing what is being downloaded. For consistency,
0050  *             set it to "Upload Current Foobar...".
0051  *             Examples: "Upload Current Wallpaper...", "Upload Current Document..."
0052  * @param receiver the QObject to connect the triggered(bool) signal to.
0053  * @param slot the slot to connect the triggered(bool) signal to.
0054  * @param parent the action's parent collection.
0055  * @param name The name by which the action will be retrieved again from the collection.
0056  * @since 4.5
0057  * @deprecated Since 5.78, create the QAction instance manually.
0058  */
0059 KNEWSTUFF_EXPORT
0060 KNEWSTUFF_DEPRECATED_VERSION(5, 78, "Create the QAction instance manually")
0061 QAction *standardActionUpload(const QString &what, const QObject *receiver, const char *slot, KActionCollection *parent, const char *name = nullptr);
0062 #endif
0063 }
0064 
0065 #endif // KNEWSTUFFACTION_H