Messagelib

jobbase.h
1 /*
2  SPDX-FileCopyrightText: 2009 Constantin Berzan <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messagecomposer_export.h"
10 
11 #include <QList>
12 
13 #include <KCompositeJob>
14 
15 namespace MessageComposer
16 {
17 class GlobalPart;
18 class JobBasePrivate;
19 
20 /**
21  A dummy abstract class defining some errors pertaining to the Composer.
22  It is meant to be subclassed.
23 */
24 class MESSAGECOMPOSER_EXPORT JobBase : public KCompositeJob
25 {
26  Q_OBJECT
27 
28 public:
29  using List = QList<JobBase *>;
30 
31  enum Error {
32  BugError = UserDefinedError + 1,
33  IncompleteError,
34  UserCancelledError,
35  UserError = UserDefinedError + 42,
36  };
37 
38  explicit JobBase(QObject *parent = nullptr);
39  ~JobBase() override;
40 
41  // asserts if no Composer parent
42  GlobalPart *globalPart();
43 
44 protected:
45  JobBasePrivate *const d_ptr;
46  JobBase(JobBasePrivate &dd, QObject *parent);
47 
48 private:
49  Q_DECLARE_PRIVATE(JobBase)
50 };
51 } // namespace MessageComposer
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
A dummy abstract class defining some errors pertaining to the Composer.
Definition: jobbase.h:24
The GlobalPart class.
Definition: globalpart.h:19
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Sep 26 2023 04:00:44 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.