Commit 0fe4faf9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Start to implement save message display format

It will save if we force to see in html or remote image

CCBUG: 316519
parent b6d14471
......@@ -98,6 +98,7 @@ set(libmessageviewer_SRCS
webkitparthtmlwriter.cpp
customheadersettingwidget.cpp
headerstyle/grantleeheaderformatter.cpp
messagedisplayformatattribute.cpp
${_mailwebview_cpp}
)
......
/*
Copyright (c) 2013 Montel Laurent <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#include "messagedisplayformatattribute.h"
#include <QByteArray>
#include <QDataStream>
using namespace MessageViewer;
class MessageViewer::MessageDisplayFormatAttributePrivate
{
public:
MessageDisplayFormatAttributePrivate()
{
}
};
MessageDisplayFormatAttribute::MessageDisplayFormatAttribute()
: d(new MessageDisplayFormatAttributePrivate)
{
}
MessageDisplayFormatAttribute::~MessageDisplayFormatAttribute()
{
delete d;
}
MessageDisplayFormatAttribute *MessageDisplayFormatAttribute::clone() const
{
MessageDisplayFormatAttribute *messageDisplayFormatAttr = new MessageDisplayFormatAttribute();
//TODO
return messageDisplayFormatAttr;
}
QByteArray MessageDisplayFormatAttribute::type() const
{
static const QByteArray sType( "MessageDisplayFormatAttribute" );
return sType;
}
QByteArray MessageDisplayFormatAttribute::serialized() const
{
QByteArray result;
QDataStream s( &result, QIODevice::WriteOnly );
//TODO
return result;
}
void MessageDisplayFormatAttribute::deserialize( const QByteArray &data )
{
QDataStream s( data );
//TODO
}
/*
Copyright (c) 2013 Montel Laurent <montel@kde.org>
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
#ifndef MESSAGEDISPLAYFORMATATTRIBUTE_H
#define MESSAGEDISPLAYFORMATATTRIBUTE_H
#include <akonadi/attribute.h>
namespace MessageViewer {
class MessageDisplayFormatAttributePrivate;
class MessageDisplayFormatAttribute : public Akonadi::Attribute
{
public:
explicit MessageDisplayFormatAttribute();
~MessageDisplayFormatAttribute();
/* reimpl */
MessageDisplayFormatAttribute *clone() const;
QByteArray type() const;
QByteArray serialized() const;
void deserialize( const QByteArray &data );
private:
friend class MessageDisplayFormatAttributePrivate;
MessageDisplayFormatAttributePrivate * const d;
};
}
#endif // MESSAGEDISPLAYFORMATATTRIBUTE_H
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