Messagelib

jobbase.h
1/*
2 SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com>
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
15namespace MessageComposer
16{
17class GlobalPart;
18class JobBasePrivate;
19
20/**
21 A dummy abstract class defining some errors pertaining to the Composer.
22 It is meant to be subclassed.
23*/
24class MESSAGECOMPOSER_EXPORT JobBase : public KCompositeJob
25{
26 Q_OBJECT
27
28public:
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
44protected:
45 JobBasePrivate *const d_ptr;
46 JobBase(JobBasePrivate &dd, QObject *parent);
47
48private:
49 Q_DECLARE_PRIVATE(JobBase)
50};
51} // namespace MessageComposer
The GlobalPart class.
Definition globalpart.h:20
A dummy abstract class defining some errors pertaining to the Composer.
Definition jobbase.h:25
Simple interface that both EncryptJob and SignEncryptJob implement so the composer can extract some e...
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:25 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.