MessageViewer::Util
Functions | |
AttachmentDisplayInfo | attachmentDisplayInfo (KMime::Content *node) |
bool MESSAGEVIEWER_EXPORT | checkOverwrite (const QUrl &url, QWidget *w) |
MESSAGEVIEWER_EXPORT bool | containsExternalReferences (const QString &str, const QString &extraHead) |
MESSAGEVIEWER_EXPORT QAction * | createAppAction (const KService::Ptr &service, bool singleOffer, QActionGroup *actionGroup, QObject *parent) |
MESSAGEVIEWER_EXPORT bool | deleteAttachment (KMime::Content *node) |
MESSAGEVIEWER_EXPORT int | deleteAttachments (const KMime::Content::List &contents) |
MESSAGEVIEWER_EXPORT bool | excludeExtraHeader (const QString &s) |
MESSAGEVIEWER_EXPORT QString | generateFileNameForExtension (const Akonadi::Item &msgBase, const QString &extension) |
MESSAGEVIEWER_EXPORT QString | generateMboxFileName (const Akonadi::Item &msgBase) |
QString MESSAGEVIEWER_EXPORT | iconPathForContent (KMime::Content *node, int iconSize) |
QString MESSAGEVIEWER_EXPORT | iconPathForMimetype (const QString &mimeType, int iconSize, const QString &fallbackFileName1=QString(), const QString &fallbackFileName2=QString()) |
MESSAGEVIEWER_EXPORT QString | parseBodyStyle (const QString &style) |
MESSAGEVIEWER_EXPORT HtmlMessageInfo | processHtml (const QString &htmlSource) |
MESSAGEVIEWER_EXPORT bool | saveAttachments (const KMime::Content::List &contents, QWidget *parent, QList< QUrl > &saveUrl) |
MESSAGEVIEWER_EXPORT bool | saveMessageInMbox (const Akonadi::Item::List &retrievedMsgs, QWidget *parent, bool appendMessages=false) |
MESSAGEVIEWER_EXPORT bool | saveMessageInMboxAndGetUrl (QUrl &url, const Akonadi::Item::List &retrievedMsgs, QWidget *parent, bool appendMessages=false) |
Detailed Description
The Util namespace contains a collection of helper functions use in various places.
Function Documentation
◆ attachmentDisplayInfo()
|
nodiscard |
Definition at line 27 of file mimetype.cpp.
◆ checkOverwrite()
Definition at line 110 of file messageviewerutil.cpp.
◆ containsExternalReferences()
|
nodiscard |
Checks whether str
contains external references.
To be precise, we only check whether str
contains 'xxx="http[s]:' where xxx is not href. Obfuscated external references are ignored on purpose.
Definition at line 44 of file messageviewerutil.cpp.
◆ createAppAction()
|
nodiscard |
Definition at line 619 of file messageviewerutil.cpp.
◆ deleteAttachment()
|
nodiscard |
Replaces the node
message part by an empty attachment with information about deleted attachment.
- Parameters
-
node A message part representing an attachment. The part will be replaced by a new empty party with filename "Deleted: <original attachment name>". Must not be null
.
- Returns
- Returns whether the message was actually modified.
Definition at line 558 of file messageviewerutil.cpp.
◆ deleteAttachments()
|
nodiscard |
Calls deleteAttachment() for each node in the contents
list.
- Parameters
-
contents List of attachments to replace by an empty part (see deleteAttachment())
- Returns
- Returns number of attachments that have actually been replaced.
- See also
- deleteAttachment()
Definition at line 608 of file messageviewerutil.cpp.
◆ excludeExtraHeader()
|
nodiscard |
Definition at line 636 of file messageviewerutil.cpp.
◆ generateFileNameForExtension()
|
nodiscard |
Definition at line 442 of file messageviewerutil.cpp.
◆ generateMboxFileName()
|
nodiscard |
Definition at line 459 of file messageviewerutil.cpp.
◆ iconPathForContent()
|
nodiscard |
Definition at line 22 of file mimetype.cpp.
◆ iconPathForMimetype()
|
nodiscard |
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
-
mimeType The primary mime type used to find the icon, e.g. "application/zip". Alias mimetypes are resolved. iconSize Size of the requested icon, e.g. KIconLoader::Desktop fallbackFileName1 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" fallbackFileName2 Fallback for fallbackFileName1
.
- Returns
- the full file name of the icon file
Definition at line 17 of file mimetype.cpp.
◆ parseBodyStyle()
Definition at line 666 of file messageviewerutil.cpp.
◆ processHtml()
|
nodiscard |
Definition at line 695 of file messageviewerutil.cpp.
◆ saveAttachments()
|
nodiscard |
Definition at line 432 of file messageviewerutil.cpp.
◆ saveMessageInMbox()
|
nodiscard |
Definition at line 552 of file messageviewerutil.cpp.
◆ saveMessageInMboxAndGetUrl()
|
nodiscard |
Definition at line 464 of file messageviewerutil.cpp.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.