Home · All Classes · Grouped Classes · Annotated · Functions

QMailViewerInterface Class Reference

The QMailViewerInterface class defines the interface to objects that can display a mail message. More...

    #include <QMailViewerInterface>

Inherits QObject.

Public Functions

Public Slots


Additional Inherited Members

Detailed Description

The QMailViewerInterface class defines the interface to objects that can display a mail message.

Qtopia uses the QMailViewerInterface interface for displaying mail messages. A class may implement the QMailViewerInterface interface to display a mail message format.

The message to be displayed is provided to the viewer class using the setMessage() function. If the message refers to external resources, these should be provided using the setResource() function. The clear() function clears any message or resources previously set.

The viewer object should emit the anchorClicked() signal if the user selects a link in the message. If the message supports a concept of completion, then the finished() signal should be emitted after the display has been completed.

Rather than creating objects that implement the QMailViewerInterface directly, clients should create an object of an appropriate type by using the QMailViewerFactory class:

    QString key = QMailViewerFactory::defaultKey( QMailViewerFactory::SmilContent );
    QMailViewerInterface* smilViewer = QMailViewerFactory::create( key, this, "smilViewer" );

To allow a class to be created through the QMailViewerFactory interface, a plug-in class derived from QMailViewerPlugin should be implemented.

See also QMailViewerFactory and QMailViewerPlugin.

Member Function Documentation

QMailViewerInterface::QMailViewerInterface ( QWidget * parent = 0 )

Constructs the QMailViewerInterface object with the parent widget parent.

QMailViewerInterface::~QMailViewerInterface ()   [virtual]

Destructs the QMailViewerInterface object.

void QMailViewerInterface::addActions ( QMenu * menu ) const   [virtual]

Allows the viewer object to add any relevant actions to the application menu supplied.

void QMailViewerInterface::anchorClicked ( const QUrl & link )   [signal]

This signal is emitted when the user presses the select key while the display has the anchor link selected.

void QMailViewerInterface::clear ()   [pure virtual slot]

Resets the display to have no content, and removes any resource associations.

void QMailViewerInterface::finished ()   [signal]

This signal is emitted when the display of the current mail message is completed. This signal is emitted only for message types that define a concept of completion, such as SMIL slideshows.

void QMailViewerInterface::scrollToAnchor ( const QString & link )   [virtual]

Scrolls the display to position the link within the viewable area.

bool QMailViewerInterface::setMessage ( const QMailMessage & mail )   [pure virtual slot]

Displays the contents of mail. Returns whether the message could be successfully displayed.

void QMailViewerInterface::setResource ( const QUrl & name, QVariant value )   [virtual slot]

Supplies the viewer object with a resource that may be referenced by a mail message. The resource identified as name will be displayed as the object value.

QWidget * QMailViewerInterface::widget () const   [pure virtual]

Returns the widget implementing the display interface.

Copyright © 2008 Nokia Trademarks
Qtopia 4.3.3