KNewStuff

action.h
1/*
2 SPDX-FileCopyrightText: 2021 Oleg Solovyov <mcpain@altlinux.org>
3 SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.lohnau@gmx.de>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef KNEWSTUFF3ACTION_H
9#define KNEWSTUFF3ACTION_H
10
11#include <KNSCore/Entry>
12#include <QAction>
13
14#include "knewstuffwidgets_export.h"
15
16namespace KNSWidgets
17{
18class ActionPrivate;
19/**
20 * @class Action action.h <KNSWidgets/Action>
21 *
22 * QAction subclass that encapsulates the logic for showing the KNewStuff dialog.
23 * If KNewStuff is disabled using KAuthorized, the action is hidden.
24 * @see KAuthorized::GenericRestriction::GHNS
25 *
26 * @since 5.90
27 */
28class KNEWSTUFFWIDGETS_EXPORT Action : public QAction
29{
30 Q_OBJECT
31
32public:
33 /**
34 * Constrcuts a KNSWidgets::Action instance
35 *
36 * @param text describing what is being downloaded.
37 * It should be a text beginning with "Download New ..." for consistency
38 * @param configFile the name of the .knsrc file
39 * @param parent the parent object
40 */
41 explicit Action(const QString &text, const QString &configFile, QObject *parent);
42
43 ~Action();
44
45Q_SIGNALS:
46 /**
47 * Emitted when the dialog has been closed.
48 */
49 void dialogFinished(const QList<KNSCore::Entry> &changedEntries);
50
51private:
52 std::unique_ptr<ActionPrivate> d;
53};
54
55}
56
57#endif // KNEWSTUFFACTION_H
QAction subclass that encapsulates the logic for showing the KNewStuff dialog.
Definition action.h:29
void dialogFinished(const QList< KNSCore::Entry > &changedEntries)
Emitted when the dialog has been closed.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:02:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.