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 kaboutplugindialog.h KAboutPluginDialog
21 *
22 * @short Standard "About Plugin" dialog box.
23 *
24 * This class provides a standard "About Plugin" dialog box.
25 *
26 * @since 5.65
27 */
28
29class KXMLGUI_EXPORT KAboutPluginDialog : public QDialog
30{
31 Q_OBJECT
32
33public:
34 /**
35 * Defines some options which can be applied to the about dialog
36 * @see Options
37 */
38 enum Option {
39 NoOptions = 0x0, ///< No options, show the standard about dialog
40 HideTranslators = 0x1, ///< Don't show the translators tab
41 };
42 /**
43 * Stores a combination of #Option values.
44 */
45 Q_DECLARE_FLAGS(Options, Option)
46 Q_FLAG(Options)
47
48 /**
49 * Constructor. Creates a fully featured "About Plugin" dialog box.
50 *
51 * @param pluginMetaData the data about the plugin to show in the dialog.
52 * @param options options to apply, such as hiding the translators tab.
53 * @param parent The parent of the dialog box. You should use the
54 * toplevel window so that the dialog becomes centered.
55 */
56 explicit KAboutPluginDialog(const KPluginMetaData &pluginMetaData, Options options, QWidget *parent = nullptr);
57
58 /**
59 * Constructor. Creates a fully featured "About Plugin" dialog box.
60 *
61 * @param pluginMetaData the data about the plugin to show in the dialog.
62 * @param parent The parent of the dialog box. You should use the
63 * toplevel window so that the dialog becomes centered.
64 */
65 explicit KAboutPluginDialog(const KPluginMetaData &pluginMetaData, QWidget *parent = nullptr);
66
67 ~KAboutPluginDialog() override;
68
69private:
70 std::unique_ptr<KAboutPluginDialogPrivate> const d;
71
72 Q_DISABLE_COPY(KAboutPluginDialog)
73};
74
75Q_DECLARE_OPERATORS_FOR_FLAGS(KAboutPluginDialog::Options)
76
77#endif
78

source code of kxmlgui/src/kaboutplugindialog.h