Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QMailComposerInterface Class Reference
[QtMessagingModule, QtPimModule]

The QMailComposerInterface class defines the interface to objects that can compose a mail message. More...

    #include <QMailComposerInterface>

Inherits QWidget.

Public Types

Public Functions

  • 206 public functions inherited from QWidget
  • 29 public functions inherited from QObject
  • 14 public functions inherited from QPaintDevice

Public Slots

  • virtual void attach ( const QContent & item, QMailMessage::AttachmentsAction action = QMailMessage::LinkToAttachments )
  • virtual void clear () = 0
  • virtual void reply ( const QMailMessage & source, int type ) = 0
  • virtual void setBody ( const QString & text, const QString & type )
  • virtual void setMessage ( const QMailMessage & mail ) = 0
  • virtual void setSignature ( const QString & signature )
  • 19 public slots inherited from QWidget
  • 1 public slot inherited from QObject

Signals

Additional Inherited Members

  • 57 properties inherited from QWidget
  • 1 property inherited from QObject
  • 1 public type inherited from QObject
  • 4 static public members inherited from QWidget
  • 4 static public members inherited from QObject
  • 38 protected functions inherited from QWidget
  • 7 protected functions inherited from QObject
  • 1 protected function inherited from QPaintDevice
  • 1 protected slot inherited from QWidget
  • 2 protected variables inherited from QObject
  • 1 protected type inherited from QPaintDevice

Detailed Description

The QMailComposerInterface class defines the interface to objects that can compose a mail message.

Qt Extended uses the QMailComposerInterface interface for composing mail messages. A class may implement the QMailComposerInterface interface to compose a mail message format.

The composer class may start composing with no associated message, or it may be provided with an existing message to edit, via the setMessage() function. A client can query whether the composer object is empty with the isEmpty() function, and extract the composed message with the message() function. If the message type supports attachments, these can be attached with the attach() function. The current state of composition can be cleared with the clear() function.

The composer object should emit the changed() signal whenever the composed message changes. If composition is cancelled, the composer should emit the cancel() signal. When the message is ready to send, the composer should emit the sendMessage() signal. For composers which need to inform of state changes during composition, such as multi-page composers, the contextChanged() signal should be emitted to allow container objects to update their view of the contextTitle() string.

Each composer class must export metadata describing itself and the messages it is able to compose. To do this, the composer must implement the key(), messageTypes(), name(), displayName() and displayIcon() functions.

    QString key = QMailComposerFactory::defaultKey( QMailMessage::Email );
    QMailComposerInterface* emailComposer = QMailComposerFactory::create( key, this, "emailComposer" );

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

See also QMailComposerFactory and QMailComposerPlugin.


Member Type Documentation

enum QMailComposerInterface::ComposeContext

Identifies the desired context for message composition.

ConstantValueDescription
QMailComposerInterface::Create0Create a new message
QMailComposerInterface::Reply1Create a reply message to a previously received message
QMailComposerInterface::ReplyToAll2Create a reply message addressed to all recipients of a previously received message
QMailComposerInterface::Forward3Create a message that forwards an existing message


Member Function Documentation

QMailComposerInterface::QMailComposerInterface ( QWidget * parent = 0 )

Constructs the QMailComposerInterface object with the parent widget parent.

QMailComposerInterface::~QMailComposerInterface ()   [virtual]

Destructs the QMailComposerInterface object.

void QMailComposerInterface::attach ( const QContent & item, QMailMessage::AttachmentsAction action = QMailMessage::LinkToAttachments )   [virtual slot]

Adds item as an attachment to the message in the composer. The action parameter specifies what the composer should do with item.

void QMailComposerInterface::cancel ()   [signal]

Signal that is emitted when message composition is cancelled.

See also changed().

void QMailComposerInterface::changed ()   [signal]

Signal that is emitted when the currently composed message has been changed.

See also cancel().

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

Clears any message content contained in the composer.

QList<QMailMessage::ContentType> QMailComposerInterface::contentTypes () const

Returns the content types created by the composer.

void QMailComposerInterface::contextChanged ()   [signal]

Signal that is emitted when the message composition context has changed. For example when transitioning from message body composition to message details composition in a multi page composer.

See also cancel() and changed().

QString QMailComposerInterface::contextTitle () const   [pure virtual]

Returns a string description of the current composition context.

QIcon QMailComposerInterface::displayIcon ( QMailMessage::MessageType type ) const

Returns the icon representing the message type type created by the composer.

QString QMailComposerInterface::displayName ( QMailMessage::MessageType type ) const

Returns the translated name of the message type type created by the composer, in a form suitable for display on a button or menu.

QString QMailComposerInterface::from () const   [pure virtual]

Returns the from address string for the currently composed message.

See also setFrom().

QMailAccount QMailComposerInterface::fromAccount () const   [pure virtual]

Returns the sending account for the currently composed message or an invalid QMailAccount if no account could be set.

bool QMailComposerInterface::isDetailsOnlyMode () const   [pure virtual]

Returns true if the composer is in details only mode, or false otherwise. This only applies to composers which may present a different view for message address details entry.

bool QMailComposerInterface::isEmpty () const   [pure virtual]

Returns true if the composer contains no message content; otherwise returns false.

bool QMailComposerInterface::isReadyToSend () const   [pure virtual]

Returns true if the composed message is ready to send or false otherwise.

QString QMailComposerInterface::key () const

Returns a string identifying the composer.

QMailMessage QMailComposerInterface::message () const   [pure virtual]

Returns the current content of the composer.

See also setMessage().

QList<QMailMessage::MessageType> QMailComposerInterface::messageTypes () const

Returns the message types created by the composer.

QString QMailComposerInterface::name ( QMailMessage::MessageType type ) const

Returns the translated name of the message type type created by the composer.

void QMailComposerInterface::reply ( const QMailMessage & source, int type )   [pure virtual slot]

Presets the content of the composer from the message source. The message may be presented differently based on the type of composition specified by type.

void QMailComposerInterface::sendMessage ()   [signal]

Signal that is emitted when message composition has finished and the message is ready to send.

See also isReadyToSend().

void QMailComposerInterface::setBody ( const QString & text, const QString & type )   [virtual slot]

Sets the message to contain body with text, if that is meaningful to the message type created by the composer. The text has the mime-type type.

void QMailComposerInterface::setDefaultAccount ( const QMailAccountId & id )   [pure virtual]

Sets the default sending account to the QMailAccount with a QMailAccountId id.

void QMailComposerInterface::setDetailsOnlyMode ( bool val )   [pure virtual]

If supported, sets the composer into details only mode if val is true. Otherwise the composer is set into normal composition mode.

See also isDetailsOnlyMode().

void QMailComposerInterface::setFrom ( const QString & fromAddress )   [pure virtual]

Sets the composed message from address to fromAddress.

See also from().

void QMailComposerInterface::setMessage ( const QMailMessage & mail )   [pure virtual slot]

Presets the content of the composer to mail.

See also message().

void QMailComposerInterface::setMessageType ( QMailMessage::MessageType type )   [virtual]

Sets the composer to produce a message of type type.

void QMailComposerInterface::setSignature ( const QString & signature )   [virtual slot]

Sets the composer to append signature to the body of the message, when creating a message.

void QMailComposerInterface::setSubject ( const QString & subject )   [pure virtual]

Sets the composed message subject to subject.

void QMailComposerInterface::setTo ( const QString & to )   [pure virtual]

Sets the composed message recipient address to to.

See also to().

QString QMailComposerInterface::to () const   [pure virtual]

Returns the recipient address of the composed message.

See also setTo().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web