Home

QMailViewerInterface Class Reference

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

    #include <QMailViewerInterface>

Inherits QObject.


Public Functions

QMailViewerInterface ( QWidget * parent = 0 )
virtual ~QMailViewerInterface ()
virtual void addActions ( const QList<QAction *> & actions ) = 0
virtual bool handleIncomingMessages ( const QMailMessageIdList & list ) const
virtual bool handleOutgoingMessages ( const QMailMessageIdList & list ) const
bool isSupported ( QMailMessage::ContentType t, QMailViewerFactory::PresentationType pres ) const
virtual QString key () const = 0
virtual QMailViewerFactory::PresentationType presentation () const = 0
virtual void removeAction ( QAction * action ) = 0
virtual void scrollToAnchor ( const QString & link )
virtual QList<QMailMessage::ContentType> types () const = 0
virtual QWidget * widget () const = 0

Public Slots

virtual void clear () = 0
virtual bool setMessage ( const QMailMessage & mail ) = 0
virtual void setResource ( const QUrl & name, QVariant value )

Signals

void anchorClicked ( const QUrl & link )
void contactDetails ( const QContact & contact )
void finished ()
void messageChanged ( const QMailMessageId & id )
void respondToMessage ( QMailMessage::ResponseType type )
void respondToMessagePart ( const QMailMessagePart::Location & partLocation, QMailMessage::ResponseType type )
void retrieveMessage ()
void retrieveMessagePart ( const QMailMessagePart & part )
void retrieveMessagePartPortion ( const QMailMessagePart & part, uint bytes )
void retrieveMessagePortion ( uint bytes )
void sendMessage ( QMailMessage & message )
void viewMessage ( const QMailMessageId & id, QMailViewerFactory::PresentationType type )

Additional Inherited Members


Detailed Description

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

Qt Extended 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" );

See also QMailViewerFactory.


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 ( const QList<QAction *> & actions )   [pure virtual]

Requests that the viewer add the content of actions to the set of available user actions.

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::contactDetails ( const QContact & contact )   [signal]

This signal is emitted by the viewer to request a display of contact's details.

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.

bool QMailViewerInterface::handleIncomingMessages ( const QMailMessageIdList & list ) const   [virtual]

Allows the viewer object to handle the notification of the arrival of new messages, identified by list.

Return true to indicate that the event has been handled, or false to let the caller handle the new message event.

bool QMailViewerInterface::handleOutgoingMessages ( const QMailMessageIdList & list ) const   [virtual]

Allows the viewer object to handle the notification of the transmission of queued messages, identified by list.

Return true to indicate that the event has been handled, or false to let the caller handle the new message event.

bool QMailViewerInterface::isSupported ( QMailMessage::ContentType t, QMailViewerFactory::PresentationType pres ) const

Returns true if the viewer can present a message containing data of content type t, using the presentation type pres.

QString QMailViewerInterface::key () const   [pure virtual]

Returns a value that uniquely identifies the viewer component.

void QMailViewerInterface::messageChanged ( const QMailMessageId & id )   [signal]

This signal is emitted by the viewer to report that it is now viewing a different message, identified by id.

QMailViewerFactory::PresentationType QMailViewerInterface::presentation () const   [pure virtual]

Returns the type of message presentation that this viewer implements.

void QMailViewerInterface::removeAction ( QAction * action )   [pure virtual]

Requests that the viewer remove action from the set of available user actions.

void QMailViewerInterface::respondToMessage ( QMailMessage::ResponseType type )   [signal]

This signal is emitted by the viewer to initiate a response action, of type type.

void QMailViewerInterface::respondToMessagePart ( const QMailMessagePart::Location & partLocation, QMailMessage::ResponseType type )   [signal]

This signal is emitted by the viewer to initiate a response to the message part indicated by partLocation, of type type.

void QMailViewerInterface::retrieveMessage ()   [signal]

This signal is emitted by the viewer to initiate a message completion action. This is only meaningful if the message has not yet been completely retrieved.

See also QMailMessage::status() and QMailRetrievalAction::retrieveMessages().

void QMailViewerInterface::retrieveMessagePart ( const QMailMessagePart & part )   [signal]

This signal is emitted by the viewer to initiate a message part retrieval action for part.

void QMailViewerInterface::retrieveMessagePartPortion ( const QMailMessagePart & part, uint bytes )   [signal]

This signal is emitted by the viewer to initiate a message part retrieval action for an additional bytes of the part.

void QMailViewerInterface::retrieveMessagePortion ( uint bytes )   [signal]

This signal is emitted by the viewer to retrieve an additional bytes from the message. This is only meaningful if the message has not yet been completely retrieved.

See also QMailMessage::status() and QMailRetrievalAction::retrieveMessages().

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

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

void QMailViewerInterface::sendMessage ( QMailMessage & message )   [signal]

This signal is emitted by the viewer to send a new message, whose contents are held by message.

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.

QList<QMailMessage::ContentType> QMailViewerInterface::types () const   [pure virtual]

Returns a list of the content types that can be presented by this viewer component.

void QMailViewerInterface::viewMessage ( const QMailMessageId & id, QMailViewerFactory::PresentationType type )   [signal]

This signal is emitted by the viewer to request a display of the message identified by id, using the presentation style type.

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

Returns the top-level widget that implements the viewer functionality.


Copyright © 2010 QtSoftware
Messaging Framework