Marble

PluginAboutDialog.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2009 Bastian Holst <bastianholst@gmx.de>
4//
5
6#ifndef MARBLE_PLUGINABOUTDIALOG_H
7#define MARBLE_PLUGINABOUTDIALOG_H
8
9#include <QDialog>
10#include <QList>
11
12// Marble
13#include "PluginInterface.h"
14#include "marble_export.h"
15
16namespace Marble
17{
18
19class PluginAboutDialogPrivate;
20
21class MARBLE_EXPORT PluginAboutDialog : public QDialog
22{
23 Q_OBJECT
24
25public:
26 enum LicenseKey {
27 // License_Unknown = 0,
28 // License_GPL = 1,
29 // License_GPL_V2 = 1,
30 // License_LGPL = 2,
31 License_LGPL_V2 = 2
32 // License_BSD = 3,
33 // License_Artistic = 4,
34 // License_QPL = 5,
35 // License_QPL_V1_0 = 5,
36 // License_GPL_V3 = 6,
37 // License_LGPL_V3 = 7
38 };
39
40 explicit PluginAboutDialog(QWidget *parent = nullptr);
41 ~PluginAboutDialog() override;
42
43 /**
44 * Sets the name of the plugin.
45 */
46 void setName(const QString &name);
47
48 /**
49 * Sets the version of the plugin;
50 */
51 void setVersion(const QString &version);
52
53 /**
54 * Sets the icon to be displayed at the top of the dialog.
55 */
56 void setIcon(const QIcon &icon);
57
58 /**
59 * Sets the text displayed in the "About" tab of the dialog.
60 */
61 void setAboutText(const QString &about);
62
63 /**
64 * Sets the authors working on this plugin.
65 * @since 0.26.0
66 */
67 void setAuthors(const QList<PluginAuthor> &authors);
68
69 /**
70 * Sets the text displayed in the "Authors" tab of the dialog.
71 * @warning You would want to use setAuthors instead.
72 */
73 void setAuthorsText(const QString &authors);
74
75 /**
76 * Sets the text displayed in the "Data" tab of the dialog.
77 * An null QString will result into no "Data" tab at all.
78 */
79 void setDataText(const QString &data);
80
81 /**
82 * Sets the license for the "License Agreement" tab of the dialog.
83 */
84 void setLicense(PluginAboutDialog::LicenseKey license);
85
86 /**
87 * Sets the text displayed in the "License Agreement" tab of the dialog.
88 * A null QString will result into the default LGPLv2 license agreement.
89 * If your plugin is not part of the official Marble distribution, please set it
90 * manually to the license agreement you prefer (even if it is LGPLv2).
91 * @warning You would want to use setLicense instead.
92 */
93 void setLicenseAgreementText(const QString &license);
94
95private:
96 Q_DISABLE_COPY(PluginAboutDialog)
97
98 PluginAboutDialogPrivate *const d;
99};
100
101} // namespace Marble
102
103#endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.