• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • MessageViewer
  • Util
Enumerations | Functions
MessageViewer::Util Namespace Reference

Enumerations

enum  HtmlMode { Normal, Html, MultipartPlain, MultipartHtml }
 

Functions

QList< KMime::Content * >
MESSAGEVIEWER_EXPORT 
allContents (const KMime::Content *message)
 
bool MESSAGEVIEWER_EXPORT checkOverwrite (const KUrl &url, QWidget *w)
 
MESSAGEVIEWER_EXPORT KAction * createAppAction (const KService::Ptr &service, bool singleOffer, QActionGroup *actionGroup, QObject *parent)
 
QList< KMime::Content * >
MESSAGEVIEWER_EXPORT 
extractAttachments (const KMime::Message *message)
 
QString MESSAGEVIEWER_EXPORT fileNameForMimetype (const QString &mimeType, int iconSize, const QString &fallbackFileName1=QString(), const QString &fallbackFileName2=QString())
 
int MESSAGEVIEWER_EXPORT getWritePermissions ()
 
bool MESSAGEVIEWER_EXPORT handleUrlWithQDesktopServices (const KUrl &url)
 
MESSAGEVIEWER_EXPORT KMimeType::Ptr mimetype (const QString &name)
 
bool MESSAGEVIEWER_EXPORT saveAttachments (const KMime::Content::List &contents, QWidget *parent)
 
bool MESSAGEVIEWER_EXPORT saveContent (QWidget *parent, KMime::Content *content, const KUrl &url)
 
bool MESSAGEVIEWER_EXPORT saveContents (QWidget *parent, const QList< KMime::Content * > &contents)
 
bool MESSAGEVIEWER_EXPORT saveMessageInMbox (const QList< Akonadi::Item > &retrievedMsgs, QWidget *parent, bool appendMessages=false)
 
bool MESSAGEVIEWER_EXPORT speakSelectedText (const QString &text, QWidget *parent)
 

Detailed Description

The Util namespace contains a collection of helper functions use in various places.

Enumeration Type Documentation

enum MessageViewer::Util::HtmlMode

Describes the type of the displayed message.

This depends on the MIME structure of the mail and on whether HTML mode is enabled (which is decided by htmlMail())

Enumerator
Normal 

A normal plaintext message, non-multipart.

Html 

A HTML message, non-multipart.

MultipartPlain 

A multipart/alternative message, the plain text part is currently displayed.

MultipartHtml 

A multipart/altervative message, the HTML part is currently displayed.

Definition at line 73 of file util.h.

Function Documentation

QList< KMime::Content * > MessageViewer::Util::allContents ( const KMime::Content *  message)

Definition at line 153 of file util.cpp.

bool MessageViewer::Util::checkOverwrite ( const KUrl &  url,
QWidget *  w 
)

Definition at line 79 of file util.cpp.

KAction * MessageViewer::Util::createAppAction ( const KService::Ptr &  service,
bool  singleOffer,
QActionGroup *  actionGroup,
QObject *  parent 
)

Definition at line 550 of file util.cpp.

QList< KMime::Content * > MessageViewer::Util::extractAttachments ( const KMime::Message *  message)

Definition at line 170 of file util.cpp.

QString MessageViewer::Util::fileNameForMimetype ( const QString &  mimeType,
int  iconSize,
const QString &  fallbackFileName1 = QString(),
const QString &  fallbackFileName2 = QString() 
)

Finds the filename of an icon based on the given mimetype or filenames.

Always use this functions when looking up icon names for mime types, don't use KMimeType directly.

Uses the IconNameCache internally to speed things up.

Parameters
mimeTypeThe primary mime type used to find the icon, e.g. "application/zip". Alias mimetypes are resolved.
sizeSize of the requested icon, e.g. KIconLoader::Desktop
fallbackFileName(1|2)When the icon is not found by the given mime type, use the file name extensions of these file names to look the icon up. Example: "test.zip"
Returns
the full file name of the icon file

Definition at line 93 of file util.cpp.

int MessageViewer::Util::getWritePermissions ( )

evaluates GlobalSettings->disregardUmask() and returns resulting permissions for storing files

Returns
specific file permissions or -1 for default permissions

Definition at line 443 of file util.cpp.

bool MessageViewer::Util::handleUrlWithQDesktopServices ( const KUrl &  url)

Delegates opening a URL to the QDesktopServices mechanisms for that on Windows and MacOSX.

Returns false if it did nothing (such as on other platforms).

Definition at line 142 of file util.cpp.

KMimeType::Ptr MessageViewer::Util::mimetype ( const QString &  name)

Search mimetype from filename when mimetype is empty or application/octet-stream.

Definition at line 568 of file util.cpp.

bool MessageViewer::Util::saveAttachments ( const KMime::Content::List &  contents,
QWidget *  parent 
)

Definition at line 453 of file util.cpp.

bool MessageViewer::Util::saveContent ( QWidget *  parent,
KMime::Content *  content,
const KUrl &  url 
)

Definition at line 306 of file util.cpp.

bool MessageViewer::Util::saveContents ( QWidget *  parent,
const QList< KMime::Content * > &  contents 
)

Definition at line 190 of file util.cpp.

bool MessageViewer::Util::saveMessageInMbox ( const QList< Akonadi::Item > &  retrievedMsgs,
QWidget *  parent,
bool  appendMessages = false 
)

Definition at line 463 of file util.cpp.

bool MessageViewer::Util::speakSelectedText ( const QString &  text,
QWidget *  parent 
)

Definition at line 530 of file util.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal