Commit c95a02a6 authored by Laurent Montel's avatar Laurent Montel 😁

Add GrantleeHeaderFormatterSettings

parent bdae96f1
......@@ -69,6 +69,11 @@ GrantleeHeaderFormatter::~GrantleeHeaderFormatter()
delete d;
}
QString GrantleeHeaderFormatter::toHtml(const GrantleeHeaderFormatter::GrantleeHeaderFormatterSettings &settings) const
{
return toHtml(settings.theme, settings.isPrinting, settings.style, settings.message);
}
QString GrantleeHeaderFormatter::toHtml(const QStringList &displayExtraHeaders, const QString &absolutPath, const QString &filename, const MessageViewer::HeaderStyle *style, KMime::Message *message, bool isPrinting) const
{
d->templateLoader->setTemplateDirs(QStringList() << absolutPath);
......
......@@ -20,26 +20,39 @@
#include <QString>
#include <grantlee/templateloader.h>
#include <GrantleeTheme/grantleetheme.h>
#include "messageviewer_export.h"
namespace KMime
{
class Message;
}
namespace GrantleeTheme
{
class Theme;
}
namespace MessageViewer
{
class HeaderStyle;
class MESSAGEVIEWER_EXPORT GrantleeHeaderFormatter
{
public:
struct GrantleeHeaderFormatterSettings
{
GrantleeHeaderFormatterSettings()
: isPrinting(false),
style(Q_NULLPTR),
message(Q_NULLPTR)
{
}
GrantleeTheme::Theme theme;
bool isPrinting;
MessageViewer::HeaderStyle *style;
KMime::Message *message;
};
explicit GrantleeHeaderFormatter();
~GrantleeHeaderFormatter();
QString toHtml(const GrantleeHeaderFormatterSettings &settings) const;
QString toHtml(const GrantleeTheme::Theme &theme, bool isPrinting, const MessageViewer::HeaderStyle *style, KMime::Message *message) const;
QString toHtml(const QStringList &displayExtraHeaders, const QString &absolutPath, const QString &filename, const MessageViewer::HeaderStyle *style, KMime::Message *message, bool isPrinting) const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment