Messagelib
viewer.h
109 explicit Viewer(QWidget *parent, QWidget *widget = nullptr, KActionCollection *actionCollection = nullptr);
153 void setMessage(const KMime::Message::Ptr &message, MimeTreeParser::UpdateMode updateMode = MimeTreeParser::Delayed);
157 * @param item - the Akonadi item to be displayed. If it doesn't hold a mail (KMime::Message::Ptr as payload data),
161 void setMessageItem(const Akonadi::Item &item, MimeTreeParser::UpdateMode updateMode = MimeTreeParser::Delayed);
180 * Convenience method to clear the reader and discard the current message. Sets the internal message pointer
235 void displaySplashPage(const QString &templateName, const QVariantHash &data, const QByteArray &domain = QByteArray());
331 [[nodiscard]] QList<QAction *> viewerPluginActionList(MessageViewer::ViewerPluginInterface::SpecificFeatureTypes features);
332 [[nodiscard]] QList<QAction *> interceptorUrlActions(const WebEngineViewer::WebHitTestResult &result) const;
371 void popupMenu(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &mousePos);
372 void displayPopupMenu(const Akonadi::Item &msg, const WebEngineViewer::WebHitTestResult &result, const QPoint &mousePos);
QSharedPointer< Message > Ptr
An interface to plug in a handler that is called when an message item has been loaded into the view.
Definition viewer.h:67
virtual void setItem(const Akonadi::Item &item)=0
This method is called whenever a message item has been loaded into the view.
QAbstractItemModel * messageTreeModel() const
A QAIM tree model of the message structure.
Definition viewer.cpp:529
void deleteMessage()
Initiates a delete, by sending a signal to delete the message item.
Definition viewer.cpp:565
void showReader(KMime::Content *aMsgPart, bool aHTML, const QString &encoding)
Emitted when the content should be shown in a separate window.
void itemRemoved()
Emitted when the item, previously set with setMessageItem, has been removed.
QString messagePath() const
The path to the message in terms of Akonadi collection hierarchy.
Definition viewer.cpp:150
void showMessage(const KMime::Message::Ptr &message, const QString &encoding)
Emitted when the message should be shown in a separate window.
Viewer::DisplayFormatMessage displayFormatMessageOverwrite() const
Get the html override setting.
Definition viewer.cpp:277
void setHtmlLoadExtDefault(bool loadExtDefault)
Default behavior for loading external references.
Definition viewer.cpp:289
void setMessageItem(const Akonadi::Item &item, MimeTreeParser::UpdateMode updateMode=MimeTreeParser::Delayed)
Set the Akonadi item that will be displayed.
Definition viewer.cpp:133
void showStatusBarMessage(const QString &message)
Emitted when a status bar message is shown.
void printMessage(const Akonadi::Item &msg)
Sets a message as the current one and print it immediately.
Definition viewer.cpp:174
Akonadi::ItemFetchJob * createFetchJob(const Akonadi::Item &item)
Create an item fetch job that is suitable for using to fetch the message item that will be displayed ...
Definition viewer.cpp:534
void setMessagePart(KMime::Content *aMsgPart)
Instead of settings a message to be shown sets a message part to be shown.
Definition viewer.cpp:506
bool htmlLoadExtOverride() const
Get the load external references override setting.
Definition viewer.cpp:301
void setMessage(const KMime::Message::Ptr &message, MimeTreeParser::UpdateMode updateMode=MimeTreeParser::Delayed)
Set the message that shall be shown.
Definition viewer.cpp:124
void popupMenu(const Akonadi::Item &msg, const QUrl &url, const QUrl &imageUrl, const QPoint &mousePos)
The user presses the right mouse button.
void displaySplashPage(const QString &templateName, const QVariantHash &data, const QByteArray &domain=QByteArray())
Display a generic HTML splash page instead of a message.
Definition viewer.cpp:162
void setHtmlLoadExtOverride(bool loadExtOverride)
Override default load external references setting.
Definition viewer.cpp:295
void setDisplayFormatMessageOverwrite(Viewer::DisplayFormatMessage format)
Override default html mail setting.
Definition viewer.cpp:283
void addMessageLoadedHandler(AbstractMessageLoadedHandler *handler)
Adds a handler for actions that will be executed when the message has been loaded into the view.
Definition viewer.cpp:546
void enableMessageDisplay()
Enable the displaying of messages again after an splash (or other) page was displayed.
Definition viewer.cpp:168
void removeMessageLoadedHandler(AbstractMessageLoadedHandler *handler)
Removes the handler for actions that will be executed when the message has been loaded into the view.
Definition viewer.cpp:558
Viewer(QWidget *parent, QWidget *widget=nullptr, KActionCollection *actionCollection=nullptr)
Create a mail viewer widget.
Definition viewer.cpp:63
void setMessagePath(const QString &path)
Set the path to the message in terms of Akonadi collection hierarchy.
Definition viewer.cpp:156
void clear(MimeTreeParser::UpdateMode updateMode=MimeTreeParser::Delayed)
Convenience method to clear the reader and discard the current message.
Definition viewer.cpp:512
KMime::Message::Ptr message() const
Returns the current message displayed in the viewer.
Definition viewer.cpp:343
void urlClicked(const Akonadi::Item &, const QUrl &)
The message viewer handles some types of urls itself, most notably http(s) and ftp(s).
Akonadi::Item messageItem() const
Returns the current message item displayed in the viewer.
Definition viewer.cpp:349
void setDecryptMessageOverwrite(bool overwrite=true)
Enforce message decryption.
Definition viewer.cpp:337
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:40 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:47:40 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.