1/*
2 This file is part of the KDE libraries
3 SPDX-FileCopyrightText: 2019 Friedrich W. H. Kossebau <kossebau@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-only
6*/
7
8#ifndef KABOUT_PLUGIN_DIALOG_H
9#define KABOUT_PLUGIN_DIALOG_H
10
11#include <kxmlgui_export.h>
12// Qt
13#include <QDialog>
14#include <memory>
15
16class KPluginMetaData;
17class KAboutPluginDialogPrivate;
18
19/*!
20 * \class KAboutPluginDialog
21 * \inmodule KXMLGui
22 *
23 * \brief This class provides a standard "About Plugin" dialog box.
24 *
25 * \since 5.65
26 */
27class KXMLGUI_EXPORT KAboutPluginDialog : public QDialog
28{
29 Q_OBJECT
30
31public:
32 /*!
33 * \enum KAboutPluginDialog::Option
34 *
35 * Defines some options which can be applied to the about dialog.
36 *
37 * \value NoOptions
38 * Show the standard about dialog.
39 * \value HideTranslators
40 * Don't show the translators tab.
41 */
42 enum Option {
43 NoOptions = 0x0,
44 HideTranslators = 0x1,
45 };
46 Q_DECLARE_FLAGS(Options, Option)
47 Q_FLAG(Options)
48
49 /*!
50 * \brief Constructs a fully featured "About Plugin" dialog box
51 * using the provided \a pluginMetaData and extra \a options.
52 *
53 * \a pluginMetaData The data about the plugin to show in the dialog.
54 *
55 * \a options Options to apply, such as hiding the translators tab.
56 *
57 * \a parent The parent of the dialog box.
58 * Use the toplevel window so that the dialog becomes centered.
59 */
60 explicit KAboutPluginDialog(const KPluginMetaData &pluginMetaData, Options options, QWidget *parent = nullptr);
61
62 /*!
63 * Constructs a default "About Plugin" dialog box
64 * using the provided \a pluginMetaData.
65 *
66 * \a pluginMetaData The data about the plugin to show in the dialog.
67 *
68 * \a parent The parent of the dialog box.
69 * Use the toplevel window so that the dialog becomes centered.
70 */
71 explicit KAboutPluginDialog(const KPluginMetaData &pluginMetaData, QWidget *parent = nullptr);
72
73 ~KAboutPluginDialog() override;
74
75private:
76 std::unique_ptr<KAboutPluginDialogPrivate> const d;
77
78 Q_DISABLE_COPY(KAboutPluginDialog)
79};
80
81Q_DECLARE_OPERATORS_FOR_FLAGS(KAboutPluginDialog::Options)
82
83#endif
84

source code of kxmlgui/src/kaboutplugindialog.h