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 { BugError = UserDefinedError + 1, IncompleteError, UserCancelledError, UserError = UserDefinedError + 42 };
32 
33  explicit JobBase(QObject *parent = nullptr);
34  ~JobBase() override;
35 
36  // asserts if no Composer parent
37  GlobalPart *globalPart();
38 
39 protected:
40  JobBasePrivate *const d_ptr;
41  JobBase(JobBasePrivate &dd, QObject *parent);
42 
43 private:
44  Q_DECLARE_PRIVATE(JobBase)
45 };
46 } // namespace MessageComposer
47 
The GlobalPart class.
Definition: globalpart.h:19
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
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Fri Nov 26 2021 23:16:42 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.