kmail
KMReaderWin Class Reference
#include <kmreaderwin.h>

Detailed Description
This class implements a "reader window", that is a window used for reading or viewing messages.Definition at line 88 of file kmreaderwin.h.
Public Slots | |
void | selectAll () |
void | clearCache () |
void | updateReaderWin () |
void | slotScrollUp () |
void | slotScrollDown () |
void | slotScrollPrior () |
void | slotScrollNext () |
void | slotJumpDown () |
void | slotDocumentChanged () |
void | slotDocumentDone () |
void | slotTextSelected (bool) |
void | slotUrlOpen (const KURL &url, const KParts::URLArgs &args) |
void | slotUrlOn (const QString &url) |
void | slotUrlPopup (const QString &, const QPoint &mousePos) |
void | slotFind () |
void | slotFindNext () |
void | slotToggleFixedFont () |
void | slotCopySelectedText () |
void | slotUrlClicked () |
void | slotMailtoReply () |
void | slotMailtoCompose () |
void | slotMailtoForward () |
void | slotMailtoAddAddrBook () |
void | slotMailtoOpenAddrBook () |
void | slotUrlCopy () |
void | slotUrlOpen (const KURL &url=KURL()) |
void | slotUrlSave () |
void | slotAddBookmarks () |
void | slotSaveMsg () |
void | slotSaveAttachments () |
void | slotMessageArrived (KMMessage *msg) |
void | slotIMChat () |
void | contactStatusChanged (const QString &uid) |
void | slotLevelQuote (int l) |
void | slotTouchMessage () |
void | fillCommandInfo (partNode *node, KMMessage **msg, int *nodeId) |
void | slotDeleteAttachment (partNode *node) |
void | slotEditAttachment (partNode *node) |
KMail::CSSHelper * | cssHelper () |
Signals | |
void | replaceMsgByUnencryptedVersion () |
void | popupMenu (KMMessage &msg, const KURL &url, const QPoint &mousePos) |
void | urlClicked (const KURL &url, int button) |
void | noDrag (void) |
Public Member Functions | |
KMReaderWin (QWidget *parent, QWidget *mainWindow, KActionCollection *actionCollection, const char *name=0, int f=0) | |
void | update (KMail::Interface::Observable *) |
void | readConfig () |
void | writeConfig (bool withSync=true) const |
const KMail::HeaderStyle * | headerStyle () const |
void | setHeaderStyleAndStrategy (const KMail::HeaderStyle *style, const KMail::HeaderStrategy *strategy) |
const KMail::HeaderStrategy * | headerStrategy () const |
const KMail::AttachmentStrategy * | attachmentStrategy () const |
void | setAttachmentStrategy (const KMail::AttachmentStrategy *strategy) |
QString | overrideEncoding () const |
void | setOverrideEncoding (const QString &encoding) |
void | setPrintFont (const QFont &font) |
const QTextCodec * | overrideCodec () const |
virtual void | setPrinting (bool enable) |
virtual void | setMsg (KMMessage *msg, bool force=false, bool updateOnly=false) |
void | setOriginalMsg (unsigned long serNumOfOriginalMessage, int nodeIdOffset) |
void | setMsgPart (KMMessagePart *aMsgPart, bool aHTML, const QString &aFileName, const QString &pname) |
void | setMsgPart (partNode *node) |
void | showHideMimeTree (bool isPlainTextTopLevel) |
void | setIdOfLastViewedMessage (const QString &msgId) |
void | clear (bool force=false) |
void | saveRelativePosition () |
void | update (bool force=false) |
virtual void | printMsg (void) |
QString | copyText () |
bool | autoDelete (void) const |
void | setAutoDelete (bool f) |
bool | htmlOverride () const |
void | setHtmlOverride (bool override) |
bool | htmlLoadExtOverride () const |
void | setHtmlLoadExtOverride (bool override) |
bool | htmlMail () |
bool | htmlLoadExternal () |
void | displaySplashPage (const QString &info) |
void | displayAboutPage () |
void | displayBusyPage () |
void | displayOfflinePage () |
void | enableMsgDisplay () |
void | atmViewMsg (KMMessagePart *msgPart, int nodeId) |
bool | atBottom () const |
bool | isFixedFont () |
void | setUseFixedFont (bool useFixedFont) |
KMail::HtmlWriter * | htmlWriter () |
KToggleAction * | toggleFixFontAction () |
KAction * | mailToComposeAction () |
KAction * | mailToReplyAction () |
KAction * | mailToForwardAction () |
KAction * | addAddrBookAction () |
KAction * | openAddrBookAction () |
KAction * | copyAction () |
KAction * | selectAllAction () |
KAction * | copyURLAction () |
KAction * | urlOpenAction () |
KAction * | urlSaveAsAction () |
KAction * | addBookmarksAction () |
KAction * | startImChatAction () |
partNode * | partNodeFromUrl (const KURL &url) |
partNode * | partNodeForId (int id) |
KURL | tempFileUrlFromPartNode (const partNode *node) |
void | setUpdateAttachment (bool update=true) |
KHTMLPart * | htmlPart () const |
KMMessage * | message (KMFolder **folder=0) const |
void | openAttachment (int id, const QString &name) |
void | saveAttachment (const KURL &tempFileName) |
void | emitUrlClicked (const KURL &url, int button) |
void | emitPopupMenu (const KURL &url, const QPoint &p) |
void | showAttachmentPopup (int id, const QString &name, const QPoint &p) |
void | setWaitingForSerNum (unsigned long serNum) |
QWidget * | mainWindow () |
bool | decryptMessage () const |
void | setDecryptMessageOverwrite (bool overwrite=true) |
bool | showSignatureDetails () const |
void | setShowSignatureDetails (bool showDetails=true) |
bool | showAttachmentQuicklist () const |
void | setShowAttachmentQuicklist (bool showAttachmentQuicklist=true) |
bool | showRawToltecMail () const |
void | setShowRawToltecMail (bool showRawToltecMail) |
KMail::Interface::BodyPartMemento * | bodyPartMemento (const partNode *node, const QCString &which) const |
void | setBodyPartMemento (const partNode *node, const QCString &which, KMail::Interface::BodyPartMemento *memento) |
void | scrollToAttachment (const partNode *node) |
Static Public Member Functions | |
static QString | newFeaturesMD5 () |
static bool | objectTreeToDecryptedMsg (partNode *node, NewByteArray &resultingData, DwMessage *currentDwMessage, bool weAreReplacingTheRootNode=false, int recCount=0, bool stripSignature=false) |
static int | msgPartFromUrl (const KURL &url) |
Protected Slots | |
void | slotCycleHeaderStyles () |
void | slotBriefHeaders () |
void | slotFancyHeaders () |
void | slotEnterpriseHeaders () |
void | slotStandardHeaders () |
void | slotLongHeaders () |
void | slotAllHeaders () |
void | slotCycleAttachmentStrategy () |
void | slotIconicAttachments () |
void | slotSmartAttachments () |
void | slotInlineAttachments () |
void | slotHideAttachments () |
void | slotHeaderOnlyAttachments () |
void | slotAtmView (int id, const QString &name) |
void | slotDelayedResize () |
void | slotHandleAttachment (int) |
void | disconnectMsgAdded () |
void | msgAdded (QListViewItem *item) |
Protected Member Functions | |
void | styleChange (QStyle &oldStyle) |
void | setStyleDependantFrameWidth () |
virtual bool | event (QEvent *e) |
int | pointsToPixel (int pointSize) const |
void | displayMessage () |
virtual void | parseMsg (KMMessage *msg) |
QString | writeMsgHeader (KMMessage *aMsg, partNode *vCardNode=0, bool topLevel=false) |
QString | writeMessagePartToTempFile (KMMessagePart *msgPart, int partNumber) |
QString | createTempDir (const QString ¶m=QString()) |
void | showVCard (KMMessagePart *msgPart) |
virtual void | initHtmlWidget (void) |
virtual void | closeEvent (QCloseEvent *) |
virtual void | resizeEvent (QResizeEvent *) |
virtual void | removeTempFiles () |
bool | eventFilter (QObject *obj, QEvent *ev) |
Friends | |
class | KMail::ObjectTreeParser |
class | KMail::KHtmlPartHtmlWriter |
void | KMMimePartTree::itemClicked (QListViewItem *item) |
void | KMMimePartTree::itemRightClicked (QListViewItem *item, const QPoint &) |
void | KMMimePartTree::slotSaveAs () |
void | KMMimePartTree::startDrag () |
Member Function Documentation
void KMReaderWin::update | ( | KMail::Interface::Observable * | observable | ) | [virtual] |
- Reimplemented from superclass. from Interface::Observer
- Updates the current message
Implements KMail::Interface::Observer.
Definition at line 813 of file kmreaderwin.cpp.
void KMReaderWin::readConfig | ( | void | ) |
void KMReaderWin::writeConfig | ( | bool | withSync = true |
) | const |
Write settings to app's config file.
Calls sync() if withSync is TRUE.
Definition at line 982 of file kmreaderwin.cpp.
void KMReaderWin::setHeaderStyleAndStrategy | ( | const KMail::HeaderStyle * | style, | |
const KMail::HeaderStrategy * | strategy | |||
) |
Set the header style and strategy.
We only want them to be set together.
Definition at line 1060 of file kmreaderwin.cpp.
const KMail::HeaderStrategy* KMReaderWin::headerStrategy | ( | ) | const [inline] |
const KMail::AttachmentStrategy* KMReaderWin::attachmentStrategy | ( | ) | const [inline] |
QString KMReaderWin::overrideEncoding | ( | ) | const [inline] |
Get selected override character encoding.
- Returns:
- The encoding selected by the user or an empty string if auto-detection is selected.
Definition at line 141 of file kmreaderwin.h.
void KMReaderWin::setOverrideEncoding | ( | const QString & | encoding | ) |
const QTextCodec * KMReaderWin::overrideCodec | ( | ) | const |
Get codec corresponding to the currently selected override character encoding.
- Returns:
- The override codec or 0 if auto-detection is selected.
Definition at line 1117 of file kmreaderwin.cpp.
virtual void KMReaderWin::setPrinting | ( | bool | enable | ) | [inline, virtual] |
void KMReaderWin::setMsg | ( | KMMessage * | msg, | |
bool | force = false , |
|||
bool | updateOnly = false | |||
) | [virtual] |
Set the message that shall be shown.
If msg is 0, an empty page is displayed.
Definition at line 1154 of file kmreaderwin.cpp.
void KMReaderWin::setOriginalMsg | ( | unsigned long | serNumOfOriginalMessage, | |
int | nodeIdOffset | |||
) |
This should be called when setting a message that was constructed from another message, which is the case when viewing encapsulated messages in the seperate reader window.
We need to know the serial number of the original message, and at which part index the encapsulated message was at that original message, so that deleting and editing attachments can work on the original message.
This is a HACK. There really shouldn't be a copy of the original mail.
- See also:
- slotDeleteAttachment, slotEditAttachment, fillCommandInfo
Definition at line 1147 of file kmreaderwin.cpp.
void KMReaderWin::setMsgPart | ( | KMMessagePart * | aMsgPart, | |
bool | aHTML, | |||
const QString & | aFileName, | |||
const QString & | pname | |||
) |
Instead of settings a message to be shown sets a message part to be shown.
Definition at line 2141 of file kmreaderwin.cpp.
void KMReaderWin::showHideMimeTree | ( | bool | isPlainTextTopLevel | ) |
Show or hide the Mime Tree Viewer if configuration is set to smart mode.
Definition at line 1460 of file kmreaderwin.cpp.
void KMReaderWin::setIdOfLastViewedMessage | ( | const QString & | msgId | ) | [inline] |
Store message id of last viewed message, normally no need to call this function directly, since correct value is set automatically in parseMsg(KMMessage* aMsg, bool onlyProcessHeaders).
Definition at line 187 of file kmreaderwin.h.
void KMReaderWin::clear | ( | bool | force = false |
) | [inline] |
void KMReaderWin::saveRelativePosition | ( | ) |
Saves the relative position of the scroll view.
Call this before calling update() if you want to preserve the current view.
Definition at line 2463 of file kmreaderwin.cpp.
void KMReaderWin::update | ( | bool | force = false |
) |
void KMReaderWin::printMsg | ( | void | ) | [virtual] |
QString KMReaderWin::copyText | ( | ) |
bool KMReaderWin::autoDelete | ( | void | ) | const [inline] |
bool KMReaderWin::htmlOverride | ( | ) | const [inline] |
bool KMReaderWin::htmlLoadExtOverride | ( | ) | const [inline] |
bool KMReaderWin::htmlMail | ( | ) |
Is html mail to be supported? Takes into account override.
Definition at line 2448 of file kmreaderwin.cpp.
bool KMReaderWin::htmlLoadExternal | ( | ) |
Is loading ext.
references to be supported? Takes into account override
Definition at line 2455 of file kmreaderwin.cpp.
QString KMReaderWin::newFeaturesMD5 | ( | ) | [static] |
void KMReaderWin::displaySplashPage | ( | const QString & | info | ) |
Display a generic HTML splash page instead of a message.
Definition at line 1301 of file kmreaderwin.cpp.
void KMReaderWin::displayAboutPage | ( | ) |
void KMReaderWin::displayBusyPage | ( | ) |
Display the 'please wait' page instead of a message.
Definition at line 1324 of file kmreaderwin.cpp.
void KMReaderWin::displayOfflinePage | ( | ) |
Display the 'we are currently in offline mode' page instead of a message.
Definition at line 1332 of file kmreaderwin.cpp.
void KMReaderWin::enableMsgDisplay | ( | ) |
Enable the displaying of messages again after an URL was displayed.
Definition at line 1407 of file kmreaderwin.cpp.
void KMReaderWin::atmViewMsg | ( | KMMessagePart * | msgPart, | |
int | nodeId | |||
) |
View message part of type message/RFC822 in extra viewer window.
- Parameters:
-
msgPart the part to display nodeId the part index of the message part that is displayed
Definition at line 2108 of file kmreaderwin.cpp.
KMail::HtmlWriter* KMReaderWin::htmlWriter | ( | ) | [inline] |
Return the HtmlWriter connected to the KHTMLPart we use.
Definition at line 254 of file kmreaderwin.h.
bool KMReaderWin::objectTreeToDecryptedMsg | ( | partNode * | node, | |
NewByteArray & | resultingData, | |||
DwMessage * | currentDwMessage, | |||
bool | weAreReplacingTheRootNode = false , |
|||
int | recCount = 0 , |
|||
bool | stripSignature = false | |||
) | [static] |
This function returns the complete data that were in this message parts - *after* all encryption has been removed that could be removed.
If stripSignature is set outer signatures are stripped.
- This is used to store the message in decrypted form.
- Returns:
- true if something was actually changed
Definition at line 193 of file kmreaderwin.cpp.
partNode * KMReaderWin::partNodeFromUrl | ( | const KURL & | url | ) |
Returns message part from given URL or null if invalid.
Definition at line 2591 of file kmreaderwin.cpp.
int KMReaderWin::msgPartFromUrl | ( | const KURL & | url | ) | [static] |
Returns id of message part from given URL or -1 if invalid.
Definition at line 1790 of file kmreaderwin.cpp.
KHTMLPart* KMReaderWin::htmlPart | ( | ) | const [inline] |
Access to the KHTMLPart used for the viewer.
Use with care!
Definition at line 301 of file kmreaderwin.h.
void KMReaderWin::setWaitingForSerNum | ( | unsigned long | serNum | ) | [inline] |
Set the serial number of the message this reader window is currently waiting for.
Used to discard updates for already deselected messages.
Definition at line 322 of file kmreaderwin.h.
bool KMReaderWin::decryptMessage | ( | ) | const |
void KMReaderWin::setDecryptMessageOverwrite | ( | bool | overwrite = true |
) | [inline] |
bool KMReaderWin::showSignatureDetails | ( | ) | const [inline] |
void KMReaderWin::setShowSignatureDetails | ( | bool | showDetails = true |
) | [inline] |
void KMReaderWin::scrollToAttachment | ( | const partNode * | node | ) |
Scrolls to the given attachment and marks it with a yellow border.
Definition at line 2855 of file kmreaderwin.cpp.
void KMReaderWin::replaceMsgByUnencryptedVersion | ( | ) | [signal] |
Emitted after parsing of a message to have it stored in unencrypted state in it's folder.
void KMReaderWin::popupMenu | ( | KMMessage & | msg, | |
const KURL & | url, | |||
const QPoint & | mousePos | |||
) | [signal] |
The user presses the right mouse button.
'url' may be 0.
void KMReaderWin::urlClicked | ( | const KURL & | url, | |
int | button | |||
) | [signal] |
The user has clicked onto an URL that is no attachment.
void KMReaderWin::noDrag | ( | void | ) | [signal] |
Pgp displays a password dialog.
void KMReaderWin::selectAll | ( | ) | [slot] |
void KMReaderWin::clearCache | ( | ) | [slot] |
void KMReaderWin::updateReaderWin | ( | ) | [slot] |
void KMReaderWin::slotScrollUp | ( | ) | [slot] |
void KMReaderWin::slotUrlOpen | ( | const KURL & | url, | |
const KParts::URLArgs & | args | |||
) | [slot] |
void KMReaderWin::slotUrlOn | ( | const QString & | url | ) | [slot] |
void KMReaderWin::slotUrlPopup | ( | const QString & | aUrl, | |
const QPoint & | mousePos | |||
) | [slot] |
void KMReaderWin::slotFind | ( | ) | [slot] |
void KMReaderWin::slotFindNext | ( | ) | [slot] |
void KMReaderWin::slotToggleFixedFont | ( | ) | [slot] |
The user toggled the "Fixed Font" flag from the view menu.
Definition at line 2092 of file kmreaderwin.cpp.
void KMReaderWin::slotCopySelectedText | ( | ) | [slot] |
void KMReaderWin::slotMailtoReply | ( | ) | [slot] |
void KMReaderWin::slotUrlCopy | ( | ) | [slot] |
Copy URL in mUrlCurrent to clipboard.
Removes "mailto:" at beginning of URL before copying.
Definition at line 2549 of file kmreaderwin.cpp.
void KMReaderWin::slotUrlSave | ( | ) | [slot] |
void KMReaderWin::slotIMChat | ( | ) | [slot] |
void KMReaderWin::fillCommandInfo | ( | partNode * | node, | |
KMMessage ** | msg, | |||
int * | nodeId | |||
) | [slot] |
Find the node ID and the message of the attachment that should be edited or deleted.
This is used when setOriginalMsg() was called before, in that case we want to operate on the original message instead of our copy.
- See also:
- setOriginalMsg
Definition at line 2743 of file kmreaderwin.cpp.
void KMReaderWin::slotAtmView | ( | int | id, | |
const QString & | name | |||
) | [protected, slot] |
void KMReaderWin::disconnectMsgAdded | ( | ) | [protected, slot] |
Helper functions used to change message selection in the message list after deleting an attachment, see slotDeleteAttachment().
Definition at line 2816 of file kmreaderwin.cpp.
void KMReaderWin::styleChange | ( | QStyle & | oldStyle | ) | [protected] |
reimplemented in order to update the frame width in case of a changed GUI style
Definition at line 2042 of file kmreaderwin.cpp.
void KMReaderWin::setStyleDependantFrameWidth | ( | ) | [protected] |
Set the width of the frame to a reasonable value for the current GUI style.
Definition at line 2025 of file kmreaderwin.cpp.
bool KMReaderWin::event | ( | QEvent * | e | ) | [protected, virtual] |
int KMReaderWin::pointsToPixel | ( | int | pointSize | ) | const [protected] |
void KMReaderWin::displayMessage | ( | ) | [protected] |
Feeds the HTML viewer with the contents of the given message.
HTML begin/end parts are written around the message.
Definition at line 1472 of file kmreaderwin.cpp.
void KMReaderWin::parseMsg | ( | KMMessage * | msg | ) | [protected, virtual] |
Parse given message and add it's contents to the reader window.
Definition at line 1592 of file kmreaderwin.cpp.
QString KMReaderWin::writeMsgHeader | ( | KMMessage * | aMsg, | |
partNode * | vCardNode = 0 , |
|||
bool | topLevel = false | |||
) | [protected] |
Creates a nice mail header depending on the current selected header style.
Definition at line 1697 of file kmreaderwin.cpp.
QString KMReaderWin::writeMessagePartToTempFile | ( | KMMessagePart * | msgPart, | |
int | partNumber | |||
) | [protected] |
Writes the given message part to a temporary file and returns the name of this file or QString::null if writing failed.
Definition at line 1713 of file kmreaderwin.cpp.
QString KMReaderWin::createTempDir | ( | const QString & | param = QString() |
) | [protected] |
Creates a temporary dir for saving attachments, etc.
Will be automatically deleted when another message is viewed.
- Parameters:
-
param Optional part of the directory name.
Definition at line 1750 of file kmreaderwin.cpp.
void KMReaderWin::showVCard | ( | KMMessagePart * | msgPart | ) | [protected] |
void KMReaderWin::initHtmlWidget | ( | void | ) | [protected, virtual] |
void KMReaderWin::closeEvent | ( | QCloseEvent * | e | ) | [protected, virtual] |
void KMReaderWin::removeTempFiles | ( | ) | [protected, virtual] |
bool KMReaderWin::eventFilter | ( | QObject * | obj, | |
QEvent * | ev | |||
) | [protected] |
The documentation for this class was generated from the following files: