KNotifications

knotificationjobuidelegate.h
1 /*
2  This file is part of the KDE Frameworks
3  SPDX-FileCopyrightText: 2020 Kai Uwe Broulik <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef KNOTIFICATIONJOBUIDELEGATE_H
9 #define KNOTIFICATIONJOBUIDELEGATE_H
10 
11 #include <KJobUiDelegate>
12 
13 #include <QScopedPointer>
14 
15 #include <knotifications_export.h>
16 
17 class KNotificationJobUiDelegatePrivate;
18 
19 /**
20  * @class KNotificationJobUiDelegate knotificationjobuidelegate.h KNotificationJobUiDelegate
21  *
22  * A UI delegate using KNotification for interaction (showing errors and warnings).
23  *
24  * @since 5.69
25  */
26 class KNOTIFICATIONS_EXPORT KNotificationJobUiDelegate : public KJobUiDelegate
27 {
28  Q_OBJECT
29 
30 public:
31  /**
32  * Constructs a new KNotificationJobUiDelegate.
33  */
35 
36  /**
37  * Constructs a new KNotificationJobUiDelegate.
38  * @param flags allows to enable automatic error/warning handling
39  * @since 5.70
40  */
41  explicit KNotificationJobUiDelegate(KJobUiDelegate::Flags flags); // KF6 TODO merge with default constructor, using AutoHandlingDisabled as default value
42 
43  /**
44  * Destroys the KNotificationJobUiDelegate.
45  */
46  ~KNotificationJobUiDelegate() override;
47 
48 public:
49  /**
50  * Display a notification to inform the user of the error given by
51  * this job.
52  */
53  void showErrorMessage() override;
54 
55 protected Q_SLOTS:
56  bool setJob(KJob *job) override;
57  void slotWarning(KJob *job, const QString &plain, const QString &rich) override;
58 
59 private:
61 };
62 
63 #endif // KNOTIFICATIONJOBUIDELEGATE_H
Q_SLOTSQ_SLOTS
virtual void showErrorMessage()
virtual bool setJob(KJob *job)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:49:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.