[Kde-pim] Inline images in KMail
Stephen Kelly
steveire at gmail.com
Mon Aug 4 17:12:01 BST 2008
Hi,
I intend to implement this for 4.2. Inline images at least, but inline
attachments might follow quite easily from that.
Kevin Gilbert wrote:
>> > The first thing I looked for was the facility to create messages with
>> > inline images & other attachments. Unfortunately, that facility still
>> > doesn't exist! :(
>>
>> Because it is far from trivial to implement with the currently used
>> editor and because all of our resources were spent on making sure that
>> KMail is available in KDE 4.1 at all.
>
> OK, so this is not going to be easy. But is it impossible? On a scale of 1
> to 10 with 0 being trivial, what is the degree of difficulty?
It shouldn't be too hard. QTextEdit (which the kmail editor is based on)
supports images. I'm not certain if it supports only local images loaded
through QTextDocument::addResource. That's something I'll have to look in
to. http://doc.trolltech.com/4.4/qtextdocument.html#addResource
>> > Is there anything I can do to help? Happy to have a hack if someone
>> > will point me in the right direction.
>>
>> Come over to the kde-pim mailing list. Your help will be appreciated.
>
> I'm here!
Here's some links:
* http://doc.trolltech.com/4.4/qtextedit.html
* http://doc.trolltech.com/4.4/richtext.html
*
http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKRichTextEdit.html
The image functionality will likely go into KRichTextEdit above and
KRichTextWidget, and therefore be shared with kjots also. The kmail
specific stuff is in KMeditor
(http://api.kde.org/4.x-api/kdepim-apidocs/libkdepim/html/classKPIM_1_1KMeditor.html).
That's where any attachment stuff would go.
So, if you want to try hacking on this, you could use either the
qt-copy/demos/textedit application, or kdelibs/kdeui/tests/krichtexteditor
and see what it will take to create an action for adding an image to the
document, for example
http://www.kde.org/stuff/clipart/klogo-official-oxygen.png. I imagine it
will involve using a QImage.
Cheers for looking into this.
Steve.
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list