kmail

kmreaderwin.h
1 // Header for kmreaderwin the kmail reader
2 // written by Markus Wuebben <markus.wuebben@kde.org>
3 
4 #ifndef KMREADERWIN_H
5 #define KMREADERWIN_H
6 
7 #include <tqwidget.h>
8 #include <tqtimer.h>
9 #include <tqstringlist.h>
10 #include <kurl.h>
11 #include <kservice.h>
12 #include "kmmsgbase.h"
13 #include "kmmimeparttree.h" // Needed for friend declaration.
14 #include "interfaces/observer.h"
15 
16 #include <map>
17 
18 class TQFrame;
19 class TQSplitter;
20 class TQHBox;
21 class TQListViewItem;
22 class TQScrollBar;
23 class TQString;
24 class TQTabDialog;
25 class TQTextCodec;
26 
27 class DwHeaders;
28 class DwMediaType;
29 
30 class TDEActionCollection;
31 class TDEAction;
32 class TDEActionMenu;
33 class TDESelectAction;
34 class TDERadioAction;
35 class TDEToggleAction;
36 class TDEConfigBase;
37 class TDEHTMLPart;
38 class KURL;
39 
40 class KMFolder;
41 class KMMessage;
42 class KMMessagePart;
43 namespace KMail {
44  namespace Interface {
45  class Observable;
46  class BodyPartMemento;
47  }
48  class PartMetaData;
49  class ObjectTreeParser;
50  class AttachmentStrategy;
51  class HeaderStrategy;
52  class HeaderStyle;
53  class HtmlWriter;
54  class KHtmlPartHtmlWriter;
55  class ISubject;
56  class HtmlStatusBar;
57  class FolderJob;
58  class CSSHelper;
59 }
60 
61 class partNode; // might be removed when KMime is used instead of mimelib
62  // (khz, 29.11.2001)
63 
64 class NewByteArray; // providing operator+ on a TQByteArray (khz, 21.06.2002)
65 
66 namespace KParts {
67  struct URLArgs;
68 }
69 
75 class KMReaderWin: public TQWidget, public KMail::Interface::Observer {
76  Q_OBJECT
77 
78 
79  friend void KMMimePartTree::itemClicked( TQListViewItem* item );
80  friend void KMMimePartTree::itemRightClicked( TQListViewItem* item, const TQPoint & );
81  friend void KMMimePartTree::slotSaveAs();
82  friend void KMMimePartTree::startDrag();
83 
84  friend class KMail::ObjectTreeParser;
85  friend class KMail::KHtmlPartHtmlWriter;
86 
87 public:
88  KMReaderWin( TQWidget *parent,
89  TQWidget *mainWindow,
90  TDEActionCollection *actionCollection,
91  const char *name=0,
92  int f=0 );
93  virtual ~KMReaderWin();
94 
100 
102  void readConfig();
103 
105  void writeConfig( bool withSync=true ) const;
106 
107  const KMail::HeaderStyle * headerStyle() const {
108  return mHeaderStyle;
109  }
112  void setHeaderStyleAndStrategy( const KMail::HeaderStyle * style,
113  const KMail::HeaderStrategy * strategy );
114 
116  const KMail::HeaderStrategy * headerStrategy() const {
117  return mHeaderStrategy;
118  }
119 
121  const KMail::AttachmentStrategy * attachmentStrategy() const {
122  return mAttachmentStrategy;
123  }
124  void setAttachmentStrategy( const KMail::AttachmentStrategy * strategy );
125 
129  TQString overrideEncoding() const { return mOverrideEncoding; }
130 
132  void setOverrideEncoding( const TQString & encoding );
133 
134  void setPrintFont( const TQFont& font );
135 
138  const TQTextCodec * overrideCodec() const;
139 
141  virtual void setPrinting(bool enable) { mPrinting = enable; }
142 
145  virtual void setMsg( KMMessage* msg, bool force = false, bool updateOnly = false );
146 
158  void setOriginalMsg( unsigned long serNumOfOriginalMessage, int nodeIdOffset );
159 
162  void setMsgPart( KMMessagePart* aMsgPart, bool aHTML,
163  const TQString& aFileName, const TQString& pname );
164 
165  void setMsgPart( partNode * node );
166 
169  void showHideMimeTree( bool isPlainTextTopLevel );
170 
175  void setIdOfLastViewedMessage( const TQString & msgId )
176  { mIdOfLastViewedMessage = msgId; }
177 
179  void clear(bool force = false) { setMsg(0, force); }
180 
183  void saveRelativePosition();
184 
186  void update(bool force = false);
187 
189  virtual void printMsg(void);
190 
192  TQString copyText();
193 
195  bool autoDelete(void) const { return mAutoDelete; }
196  void setAutoDelete(bool f) { mAutoDelete=f; }
197 
199  bool htmlOverride() const { return mHtmlOverride; }
200  void setHtmlOverride( bool override );
201 
203  bool htmlLoadExtOverride() const { return mHtmlLoadExtOverride; }
204  void setHtmlLoadExtOverride( bool override );
205 
207  bool htmlMail();
208 
210  bool htmlLoadExternal();
211 
213  static TQString newFeaturesMD5();
214 
216  void displaySplashPage( const TQString &info );
217 
219  void displayAboutPage();
220 
222  void displayBusyPage();
224  void displayOfflinePage();
225 
227  void enableMsgDisplay();
228 
234  void atmViewMsg( KMMessagePart* msgPart, int nodeId );
235 
236  bool atBottom() const;
237 
238  bool isFixedFont() { return mUseFixedFont; }
239  void setUseFixedFont( bool useFixedFont ) { mUseFixedFont = useFixedFont; }
240 
242  KMail::HtmlWriter * htmlWriter() { return mHtmlWriter; }
243 
244  // Action to reply to a message
245  // but action( "some_name" ) some name could be used instead.
246  TDEToggleAction *toggleFixFontAction() { return mToggleFixFontAction; }
247  TDEAction *mailToComposeAction() { return mMailToComposeAction; }
248  TDEAction *mailToReplyAction() { return mMailToReplyAction; }
249  TDEAction *mailToForwardAction() { return mMailToForwardAction; }
250  TDEAction *addAddrBookAction() { return mAddAddrBookAction; }
251  TDEAction *openAddrBookAction() { return mOpenAddrBookAction; }
252  TDEAction *copyAction() { return mCopyAction; }
253  TDEAction *selectAllAction() { return mSelectAllAction; }
254  TDEAction *copyURLAction() { return mCopyURLAction; }
255  TDEAction *urlOpenAction() { return mUrlOpenAction; }
256  TDEAction *urlSaveAsAction() { return mUrlSaveAsAction; }
257  TDEAction *addBookmarksAction() { return mAddBookmarksAction;}
258  TDEAction *startImChatAction() { return mStartIMChatAction; }
259  // This function returns the complete data that were in this
260  // message parts - *after* all encryption has been removed that
261  // could be removed.
262  // - This is used to store the message in decrypted form.
263  void objectTreeToDecryptedMsg( partNode* node,
264  NewByteArray& resultingData,
265  KMMessage& theMessage,
266  bool weAreReplacingTheRootNode = false,
267  int recCount = 0 );
268 
270  partNode* partNodeFromUrl(const KURL &url);
271 
272  partNode * partNodeForId( int id );
273 
274  KURL tempFileUrlFromPartNode( const partNode * node );
275 
277  static int msgPartFromUrl(const KURL &url);
278 
279  void setUpdateAttachment( bool update = true ) { mAtmUpdate = update; }
280 
283  TDEHTMLPart * htmlPart() const { return mViewer; }
284 
286  KMMessage* message(KMFolder** folder=0) const;
287 
288  void openAttachment( int id, const TQString & name );
289  void saveAttachment( const KURL &tempFileName );
290 
291  void emitUrlClicked( const KURL & url, int button ) {
292  emit urlClicked( url, button );
293  }
294 
295  void emitPopupMenu( const KURL & url, const TQPoint & p ) {
296  if ( message() )
297  emit popupMenu( *message(), url, p );
298  }
299 
300  void showAttachmentPopup( int id, const TQString & name, const TQPoint & p );
301 
304  void setWaitingForSerNum( unsigned long serNum ) { mWaitingForSerNum = serNum; }
305 
306  TQWidget* mainWindow() { return mMainWindow; }
307 
309  bool decryptMessage() const;
310 
312  void setDecryptMessageOverwrite( bool overwrite = true ) { mDecrytMessageOverwrite = overwrite; }
313 
315  bool showSignatureDetails() const { return mShowSignatureDetails; }
316 
318  void setShowSignatureDetails( bool showDetails = true ) { mShowSignatureDetails = showDetails; }
319 
320  /* show or hide the list that points to the attachments */
321  bool showAttachmentQuicklist() const { return mShowAttachmentQuicklist; }
322 
323  /* show or hide the list that points to the attachments */
324  void setShowAttachmentQuicklist( bool showAttachmentQuicklist = true ) { mShowAttachmentQuicklist = showAttachmentQuicklist; }
325 
326  // This controls whether a Toltec invitation is shown in its raw form or as a replacement text.
327  // This can be toggled with the "kmail:showRawToltecMail" link.
328  bool showRawToltecMail() const { return mShowRawToltecMail; }
329  void setShowRawToltecMail( bool showRawToltecMail ) { mShowRawToltecMail = showRawToltecMail; }
330 
331  /* retrieve BodyPartMemento of id \a which for partNode \a node */
332  KMail::Interface::BodyPartMemento * bodyPartMemento( const partNode * node, const TQCString & which ) const;
333 
334  /* set/replace BodyPartMemento \a memento of id \a which for
335  partNode \a node. If there was a BodyPartMemento registered
336  already, replaces (deletes) that one. */
337  void setBodyPartMemento( const partNode * node, const TQCString & which, KMail::Interface::BodyPartMemento * memento );
338 
340  void scrollToAttachment( const partNode *node );
341 
342 private:
343  /* deletes all BodyPartMementos. Use this when skipping to another
344  message (as opposed to re-loading the same one again). */
345  void clearBodyPartMementos();
346 
347 signals:
351 
353  void popupMenu(KMMessage &msg, const KURL &url, const TQPoint& mousePos);
354 
356  void urlClicked(const KURL &url, int button);
357 
359  void noDrag(void);
360 
361 public slots:
362 
364  void selectAll();
365 
367  void clearCache();
368 
370  void updateReaderWin();
371 
373  void slotScrollUp();
374  void slotScrollDown();
375  void slotScrollPrior();
376  void slotScrollNext();
377  void slotJumpDown();
378  void slotDocumentChanged();
379  void slotDocumentDone();
380  void slotTextSelected(bool);
381  void updateHeader();
382 
384  void slotUrlOpen(const KURL &url, const KParts::URLArgs &args);
385 
387  void slotUrlOn(const TQString &url);
388 
390  void slotUrlPopup(const TQString &, const TQPoint& mousePos);
391 
393  void slotFind();
395  void slotFindNext();
396 
398  void slotToggleFixedFont();
399 
401  void slotCopySelectedText();
402 
403  void slotUrlClicked();
404 
406  void slotMailtoReply();
407  void slotMailtoCompose();
408  void slotMailtoForward();
409  void slotMailtoAddAddrBook();
410  void slotMailtoOpenAddrBook();
413  void slotUrlCopy();
414  void slotUrlOpen( const KURL &url = KURL() );
416  void slotUrlSave();
417  void slotAddBookmarks();
418  void slotSaveMsg();
419  void slotSaveAttachments();
420 
421  void slotMessageArrived( KMMessage *msg );
423  void slotIMChat();
424  void contactStatusChanged( const TQString &uid);
425 
426  void slotLevelQuote( int l );
427  void slotTouchMessage();
428 
436  void fillCommandInfo( partNode *node, KMMessage **msg, int *nodeId );
437 
438  void slotDeleteAttachment( partNode* node );
439  void slotEditAttachment( partNode* node );
440 
441  KMail::CSSHelper* cssHelper();
442 
443 protected slots:
444  void slotCycleHeaderStyles();
445  void slotBriefHeaders();
446  void slotFancyHeaders();
447  void slotEnterpriseHeaders();
448  void slotStandardHeaders();
449  void slotLongHeaders();
450  void slotAllHeaders();
451 
452  void slotCycleAttachmentStrategy();
453  void slotIconicAttachments();
454  void slotSmartAttachments();
455  void slotInlineAttachments();
456  void slotHideAttachments();
457  void slotHeaderOnlyAttachments();
458 
460  void slotAtmView( int id, const TQString& name );
461  void slotDelayedResize();
462  void slotHandleAttachment( int );
463 
467  void disconnectMsgAdded();
468  void msgAdded( TQListViewItem *item );
469 
470 protected:
473  void styleChange( TQStyle& oldStyle );
474 
478 
480  virtual bool event(TQEvent *e);
481 
483  int pointsToPixel(int pointSize) const;
484 
487  void displayMessage();
488 
490  virtual void parseMsg( KMMessage* msg );
491 
494  TQString writeMsgHeader(KMMessage* aMsg, partNode *vCardNode = 0, bool topLevel=false );
495 
499  TQString writeMessagePartToTempFile( KMMessagePart* msgPart, int partNumber );
500 
506  TQString createTempDir( const TQString &param = TQString() );
507 
509  void showVCard(KMMessagePart *msgPart);
510 
512  virtual void initHtmlWidget(void);
513 
515  virtual void closeEvent(TQCloseEvent *);
516  virtual void resizeEvent(TQResizeEvent *);
517 
519  virtual void removeTempFiles();
520 
522  bool eventFilter( TQObject *obj, TQEvent *ev );
523 
524 private slots:
525  void slotSetEncoding();
526  void injectAttachments();
527 
528 private:
529  void adjustLayout();
530  void createWidgets();
531  void createActions( TDEActionCollection * ac );
532  void saveSplitterSizes( TDEConfigBase & c ) const;
533 
534  TDERadioAction * actionForHeaderStyle( const KMail::HeaderStyle *,
535  const KMail::HeaderStrategy * );
536  TDERadioAction * actionForAttachmentStrategy( const KMail::AttachmentStrategy * );
538  void readGlobalOverrideCodec();
539 
540  TQString renderAttachments( partNode *node, const TQColor &bgColor );
541 
542 private:
543  bool mHtmlMail, mHtmlLoadExternal, mHtmlOverride, mHtmlLoadExtOverride;
544  int mAtmCurrent;
545  TQString mAtmCurrentName;
546  KMMessage *mMessage;
547 
548  // See setOriginalMsg() for an explaination for those two.
549  unsigned long mSerNumOfOriginalMessage;
550  int mNodeIdOffset;
551 
552  // widgets:
553  TQSplitter * mSplitter;
554  TQHBox *mBox;
555  KMail::HtmlStatusBar *mColorBar;
556  KMMimePartTree* mMimePartTree;
557  TDEHTMLPart *mViewer;
558 
559  const KMail::AttachmentStrategy * mAttachmentStrategy;
560  const KMail::HeaderStrategy * mHeaderStrategy;
561  const KMail::HeaderStyle * mHeaderStyle;
562  bool mAutoDelete;
564  TQString mSaveAttachDir;
565  static const int delay;
566  TQTimer mUpdateReaderWinTimer;
567  TQTimer mResizeTimer;
568  TQTimer mDelayedMarkTimer;
569  TQTimer mHeaderRefreshTimer;
570  TQString mOverrideEncoding;
571  TQString mOldGlobalOverrideEncoding; // used to detect changes of the global override character encoding
572  bool mMsgDisplay;
573  bool mNoMDNsWhenEncrypted;
574  unsigned long mLastSerNum;
575 
576  KMail::CSSHelper * mCSSHelper;
577  bool mUseFixedFont;
578  bool mPrinting;
579  bool mShowColorbar;
580  //bool mShowCompleteMessage;
581  TQStringList mTempFiles;
582  TQStringList mTempDirs;
583  int mMimeTreeMode;
584  bool mMimeTreeAtBottom;
585  TQValueList<int> mSplitterSizes;
586  partNode* mRootNode;
587  TQString mIdOfLastViewedMessage;
588  TQWidget *mMainWindow;
589  TDEActionCollection *mActionCollection;
590  TDEAction *mMailToComposeAction, *mMailToReplyAction, *mMailToForwardAction,
591  *mAddAddrBookAction, *mOpenAddrBookAction, *mCopyAction, *mCopyURLAction,
592  *mUrlOpenAction, *mUrlSaveAsAction, *mAddBookmarksAction, *mStartIMChatAction, *mSelectAllAction;
593  TDEToggleAction *mHeaderOnlyAttachmentsAction;
594  TDESelectAction *mSelectEncodingAction;
595  TDEToggleAction *mToggleFixFontAction;
596 
597  KURL mHoveredUrl;
598  KURL mClickedUrl;
599  TQPoint mLastClickPosition;
600  TQString mLastClickImagePath;
601  bool mCanStartDrag;
602 
603  KMail::HtmlWriter * mHtmlWriter;
604  std::map<TQCString,KMail::Interface::BodyPartMemento*> mBodyPartMementoMap;
605  // an attachment should be updated
606  bool mAtmUpdate;
607  int mChoice;
608  unsigned long mWaitingForSerNum;
609  float mSavedRelativePosition;
610  int mLevelQuote;
611  bool mDecrytMessageOverwrite;
612  bool mShowSignatureDetails;
613  bool mShowAttachmentQuicklist;
614  bool mShowRawToltecMail;
615  bool mExternalWindow;
616 };
617 
618 
619 #endif
620 
void setOriginalMsg(unsigned long serNumOfOriginalMessage, int nodeIdOffset)
This should be called when setting a message that was constructed from another message,...
void setShowSignatureDetails(bool showDetails=true)
Show signature details.
Definition: kmreaderwin.h:318
static int msgPartFromUrl(const KURL &url)
Returns id of message part from given URL or -1 if invalid.
virtual void setPrinting(bool enable)
Set printing mode.
Definition: kmreaderwin.h:141
virtual void parseMsg(KMMessage *msg)
Parse given message and add it's contents to the reader window.
void styleChange(TQStyle &oldStyle)
reimplemented in order to update the frame width in case of a changed GUI style
bool autoDelete(void) const
Get/set auto-delete msg flag.
Definition: kmreaderwin.h:195
void slotScrollUp()
HTML Widget scrollbar and layout handling.
void setWaitingForSerNum(unsigned long serNum)
Set the serial number of the message this reader window is currently waiting for.
Definition: kmreaderwin.h:304
observable interface
Definition: observable.h:44
TDEHTMLPart * htmlPart() const
Access to the TDEHTMLPart used for the viewer.
Definition: kmreaderwin.h:283
void slotFind()
The user selected "Find" from the menu.
void slotFindNext()
The user selected "Find Next" from the menu.
void slotUrlOpen(const KURL &url, const KParts::URLArgs &args)
An URL has been activate with a click.
void popupMenu(KMMessage &msg, const KURL &url, const TQPoint &mousePos)
The user presses the right mouse button.
const KMail::HeaderStrategy * headerStrategy() const
Getthe message header strategy.
Definition: kmreaderwin.h:116
void selectAll()
Select message body.
partNode * partNodeFromUrl(const KURL &url)
Returns message part from given URL or null if invalid.
void slotIMChat()
start IM Chat with addressee
virtual void closeEvent(TQCloseEvent *)
Some necessary event handling.
void setOverrideEncoding(const TQString &encoding)
Set the override character encoding.
TQString createTempDir(const TQString &param=TQString())
Creates a temporary dir for saving attachments, etc.
void setDecryptMessageOverwrite(bool overwrite=true)
Enforce message decryption.
Definition: kmreaderwin.h:312
void setStyleDependantFrameWidth()
Set the width of the frame to a reasonable value for the current GUI style.
void displayBusyPage()
Display the 'please wait' page instead of a message.
void showHideMimeTree(bool isPlainTextTopLevel)
Show or hide the Mime Tree Viewer if configuration is set to smart mode.
bool decryptMessage() const
Returns wether the message should be decryted.
bool htmlMail()
Is html mail to be supported? Takes into account override.
bool showSignatureDetails() const
Show signature details.
Definition: kmreaderwin.h:315
void slotUrlSave()
Save the page to a file.
void setHeaderStyleAndStrategy(const KMail::HeaderStyle *style, const KMail::HeaderStrategy *strategy)
Set the header style and strategy.
void replaceMsgByUnencryptedVersion()
Emitted after parsing of a message to have it stored in unencrypted state in it's folder.
void displayMessage()
Feeds the HTML viewer with the contents of the given message.
void showVCard(KMMessagePart *msgPart)
show window containing infos about a vCard.
bool htmlLoadExtOverride() const
Override default load external references setting.
Definition: kmreaderwin.h:203
An interface to HTML sinks.
Definition: htmlwriter.h:99
virtual void setMsg(KMMessage *msg, bool force=false, bool updateOnly=false)
Set the message that shall be shown.
void slotUrlCopy()
Copy URL in mUrlCurrent to clipboard.
void noDrag(void)
Pgp displays a password dialog.
int pointsToPixel(int pointSize) const
Calculate the pixel size.
static TQString newFeaturesMD5()
Returns the MD5 hash for the list of new features.
void slotUrlPopup(const TQString &, const TQPoint &mousePos)
The user presses the right mouse button on an URL.
virtual void removeTempFiles()
Cleanup the attachment temp files.
void clear(bool force=false)
Clear the reader and discard the current message.
Definition: kmreaderwin.h:179
void fillCommandInfo(partNode *node, KMMessage **msg, int *nodeId)
Find the node ID and the message of the attachment that should be edited or deleted.
void displayOfflinePage()
Display the 'we are currently in offline mode' page instead of a message.
void updateReaderWin()
Refresh the reader window.
void saveRelativePosition()
Saves the relative position of the scroll view.
bool eventFilter(TQObject *obj, TQEvent *ev)
Event filter.
TQString copyText()
Return selected text.
const KMail::AttachmentStrategy * attachmentStrategy() const
Get/set the message attachment strategy.
Definition: kmreaderwin.h:121
void slotMailtoReply()
Operations on mailto: URLs.
virtual bool event(TQEvent *e)
Watch for palette changes.
KMMessage * message(KMFolder **folder=0) const
Returns the current message or 0 if none.
void slotAtmView(int id, const TQString &name)
Some attachment operations.
void slotToggleFixedFont()
The user toggled the "Fixed Font" flag from the view menu.
void displaySplashPage(const TQString &info)
Display a generic HTML splash page instead of a message.
KMail::HtmlWriter * htmlWriter()
Return the HtmlWriter connected to the TDEHTMLPart we use.
Definition: kmreaderwin.h:242
virtual void printMsg(void)
Print current message.
void disconnectMsgAdded()
Helper functions used to change message selection in the message list after deleting an attachment,...
This is a Mime Message.
Definition: kmmessage.h:68
void slotUrlOn(const TQString &url)
The mouse has moved on or off an URL.
void setMsgPart(KMMessagePart *aMsgPart, bool aHTML, const TQString &aFileName, const TQString &pname)
Instead of settings a message to be shown sets a message part to be shown.
interface of classes that implement status for BodyPartFormatters.
Definition: bodypart.h:51
bool htmlOverride() const
Override default html mail setting.
Definition: kmreaderwin.h:199
void slotCopySelectedText()
Copy the selected text to the clipboard.
void writeConfig(bool withSync=true) const
Write settings to app's config file.
TQString writeMsgHeader(KMMessage *aMsg, partNode *vCardNode=0, bool topLevel=false)
Creates a nice mail header depending on the current selected header style.
folderdiaquotatab.h
Definition: aboutdata.cpp:40
void clearCache()
Force update even if message is the same.
This class implements a "reader window", that is a window used for reading or viewing messages.
Definition: kmreaderwin.h:75
void urlClicked(const KURL &url, int button)
The user has clicked onto an URL that is no attachment.
void readConfig()
Read settings from app's config file.
observer interface
Definition: observer.h:44
const TQTextCodec * overrideCodec() const
Get codec corresponding to the currently selected override character encoding.
TQString overrideEncoding() const
Get selected override character encoding.
Definition: kmreaderwin.h:129
This class encapsulates the visual appearance of message headers.
Definition: headerstyle.h:51
void atmViewMsg(KMMessagePart *msgPart, int nodeId)
View message part of type message/RFC822 in extra viewer window.
void enableMsgDisplay()
Enable the displaying of messages again after an URL was displayed.
bool htmlLoadExternal()
Is loading ext.
void displayAboutPage()
Display the about page instead of a message.
Mail folder.
Definition: kmfolder.h:69
void update(KMail::Interface::Observable *)
void setIdOfLastViewedMessage(const TQString &msgId)
Store message id of last viewed message, normally no need to call this function directly,...
Definition: kmreaderwin.h:175
void scrollToAttachment(const partNode *node)
Scrolls to the given attachment and marks it with a yellow border.
The HTML statusbar widget for use with the reader.
Definition: htmlstatusbar.h:61
virtual void initHtmlWidget(void)
HTML initialization.
TQString writeMessagePartToTempFile(KMMessagePart *msgPart, int partNumber)
Writes the given message part to a temporary file and returns the name of this file or TQString() if ...