Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QMailComposerInterface class defines the interface to objects that can compose a mail message. More...
#include <QMailComposerInterface>
Inherits QWidget.
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.
Identifies the desired context for message composition.
Constant | Value | Description |
---|---|---|
QMailComposerInterface::Create | 0 | Create a new message |
QMailComposerInterface::Reply | 1 | Create a reply message to a previously received message |
QMailComposerInterface::ReplyToAll | 2 | Create a reply message addressed to all recipients of a previously received message |
QMailComposerInterface::Forward | 3 | Create a message that forwards an existing message |
Constructs the QMailComposerInterface object with the parent widget parent.
Destructs the QMailComposerInterface object.
Adds item as an attachment to the message in the composer. The action parameter specifies what the composer should do with item.
Signal that is emitted when message composition is cancelled.
See also changed().
Signal that is emitted when the currently composed message has been changed.
See also cancel().
Clears any message content contained in the composer.
Returns the content types created by the composer.
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().
Returns a string description of the current composition context.
Returns the icon representing the message type type created by the composer.
Returns the translated name of the message type type created by the composer, in a form suitable for display on a button or menu.
Returns the from address string for the currently composed message.
See also setFrom().
Returns the sending account for the currently composed message or an invalid QMailAccount if no account could be set.
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.
Returns true if the composer contains no message content; otherwise returns false.
Returns true if the composed message is ready to send or false otherwise.
Returns a string identifying the composer.
Returns the current content of the composer.
See also setMessage().
Returns the message types created by the composer.
Returns the translated name of the message type type created by the composer.
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.
Signal that is emitted when message composition has finished and the message is ready to send.
See also isReadyToSend().
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.
Sets the default sending account to the QMailAccount with a QMailAccountId id.
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().
Sets the composed message from address to fromAddress.
See also from().
Presets the content of the composer to mail.
See also message().
Sets the composer to produce a message of type type.
Sets the composer to append signature to the body of the message, when creating a message.
Sets the composed message subject to subject.
Sets the composed message recipient address to to.
See also to().
Returns the recipient address of the composed message.
See also setTo().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |