Added patch from braindead

Embedded images in private chat and messages (only for QT version 4.7.0 and higher)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5569 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-09-18 22:59:23 +00:00
parent 4d452b4034
commit 02892d4ae5
7 changed files with 3524 additions and 159 deletions

View file

@ -64,6 +64,9 @@ public:
static void optimizeHtml(QString &text, unsigned int flag = 0);
static QString toHtml(QString text, bool realHtml = true);
static bool makeEmbeddedImage(const QString &fileName, QString &embeddedImage, const int maxPixels);
static bool makeEmbeddedImage(const QImage &originalImage, QString &embeddedImage, const int maxPixels);
protected:
void embedHtml(QTextDocument *textDocument, QDomDocument &doc, QDomElement &currentElement, EmbedInHtml& embedInfos, ulong flag);
void replaceAnchorWithImg(QDomDocument& doc, QDomElement &element, QTextDocument *textDocument, const RetroShareLink &link);