Better wording
[kdepim.git] / messageviewer / objecttreesourceif.h
blob1c9f740d3af970e2a40572bca8bc247c33fa3f98
1 /* -*- mode: C++; c-file-style: "gnu" -*-
2 Copyright (C) 2009 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
3 Copyright (c) 2009 Andras Mantia <andras@kdab.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef MAILVIEWER_OBJECTTREESOURCE_IF_H
21 #define MAILVIEWER_OBJECTTREESOURCE_IF_H
23 #include "messageviewer_export.h"
24 #include "util.h"
26 #include <KMime/Message>
28 class QObject;
29 class QTextCodec;
31 namespace MessageViewer {
32 class HtmlWriter;
33 class CSSHelper;
34 class AttachmentStrategy;
37 namespace MessageViewer {
39 /**
40 * Interface for object tree sources.
41 * @author Andras Mantia <amantia@kdab.net>
43 class MESSAGEVIEWER_EXPORT ObjectTreeSourceIf {
45 public:
47 ObjectTreeSourceIf() {};
48 virtual ~ObjectTreeSourceIf() {};
50 /**
51 * Sets the type of mail that is currently displayed. Applications can display this
52 * information to the user, for example KMail displays a HTML status bar.
53 * Note: This is not called when the mode is "Normal".
55 virtual void setHtmlMode( Util::HtmlMode mode ) = 0;
57 /** Return true if the mail should be parsed as a html mail */
58 virtual bool htmlMail() = 0;
60 /** Return true if an encrypted mail should be decrypted */
62 virtual bool decryptMessage() = 0;
64 /** Return true if external sources should be loaded in a html mail */
65 virtual bool htmlLoadExternal() = 0;
67 /** Return true to include the signature details in the generated html */
68 virtual bool showSignatureDetails() = 0;
70 virtual int levelQuote() = 0;
72 /** The override codec that should be used for the mail */
73 virtual const QTextCodec * overrideCodec() = 0;
75 virtual QString createMessageHeader( KMime::Message *message ) = 0;
77 /** Return the wanted attachment startegy */
78 virtual const AttachmentStrategy * attachmentStrategy() = 0;
80 /** Return the html write object */
81 virtual HtmlWriter * htmlWriter() = 0;
83 /** Return the css helper object */
84 virtual CSSHelper* cssHelper() = 0;
86 /** The source object behind the interface. */
87 virtual QObject *sourceObject() = 0;
91 #endif