KXmlGui

kbugreport.h
1 /*
2  This file is part of the KDE project
3  SPDX-FileCopyrightText: 1999 David Faure <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef KBUGREPORT_H
9 #define KBUGREPORT_H
10 
11 #include <QDialog>
12 #include <kxmlgui_export.h>
13 #include <memory>
14 
15 class KAboutData;
16 class KBugReportPrivate;
17 
18 /**
19  * @class KBugReport kbugreport.h KBugReport
20  *
21  * @short A dialog box for sending bug reports.
22  *
23  * All the information needed by the dialog box
24  * (program name, version, bug-report address, etc.)
25  * comes from the KAboutData class.
26  * Make sure you create an instance of KAboutData and call
27  * KAboutData::setApplicationData(<aboutData>).
28  *
29  * \image html kbugreport.png "KBugReport"
30  *
31  * @author David Faure <[email protected]>
32  */
33 class KXMLGUI_EXPORT KBugReport : public QDialog
34 {
35  Q_OBJECT
36 
37 public:
38  /**
39  * Creates a bug-report dialog.
40  * Note that you shouldn't have to do this manually,
41  * since KHelpMenu takes care of the menu item
42  * for "Report Bug..." and of creating a KBugReport dialog.
43  */
44  explicit KBugReport(const KAboutData &aboutData, QWidget *parent = nullptr);
45 
46  /**
47  * Destructor
48  */
49  ~KBugReport() override;
50 
51  /**
52  * The message body of the bug report
53  * @return The message body of the bug report.
54  */
55  QString messageBody() const;
56 
57  /**
58  * Sets the message body of the bug report.
59  */
60  void setMessageBody(const QString &messageBody);
61 
62  /**
63  * OK has been clicked
64  */
65  void accept() override;
66 
67 protected:
68  /**
69  * A complete copy of the bug report
70  * @return QString copy of the bug report.
71  */
72  QString text() const;
73 
74  /**
75  * Attempt to e-mail the bug report.
76  * @return true on success
77  */
78  bool sendBugReport();
79 
80  void closeEvent(QCloseEvent *e) override;
81 
82 private:
83  friend class KBugReportPrivate;
84  std::unique_ptr<KBugReportPrivate> const d;
85 
87 };
88 
89 #endif
virtual void closeEvent(QCloseEvent *e) override
virtual void accept()
A dialog box for sending bug reports.
Definition: kbugreport.h:33
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 04:02:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.