Jump to content

Mail API QML: Difference between revisions

From KDE Community Wiki
Created page with "=DRAFT= This document just serves as draft for developing a QML Calendar API. =API= ==Accounts== ==Folders== ==MessageList== ==Message== <syntaxhighlight lang="javascrip..."
 
Abhijeet (talk | contribs)
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
=DRAFT=
=DRAFT=
This document just serves as draft for developing a QML Calendar API.
This document just serves as draft for developing a QML Mail API.


=API=
=API=
Line 19: Line 19:


==Composer==
==Composer==
This Composer Api will be exposed through QML. The backend contains the basic functions of a message composer. This will be further extended in future. We already have implemented the following till now:
* the send function
* receive from, body, subject
* receiver model and an attachment model ( which is being re-used from the present kmail composer)
The complete basic Api plan is as follows:
===PROPERTIES:===
Q_PROPERTY(QString identity ....)
Q_PROPERTY(ReceiverModel *toModel .... CONSTANT)
Q_PROPERTY(ReceiverModel *ccModel .... CONSTANT)
Q_PROPERTY(ReceiverModel *bccModel ... CONSTANT)
Q_PROPERTY(QString subject ....)
Q_PROPERTY(QString body ....)
Q_PROPERTY(QString from ....)
Q_PROPERTY(AttachmentModel *attachmentModel .... CONSTANT)
===FUNCTIONS:===
void subject()
Recieves the text input as QString from the editor in QML for subject 
void body()
Recieves the text input as QString from the editor in QML for body. 
void replyTo()
Will set the address of receiver. It will also be received as QString. Recepient count will be set.
void from()
Sets the sender's address.
void cc()
Sets the CC field in recepients list.
void bcc()
Sets the BCC field in the recepients list.
===SLOTS:===
void addAttachment()
Adds attachments to the message using KMime content part.
void insertSignature()
Inserts saved signature.
void send()
Will send the message using MessageComposer::MessageSender
void saveDraft()
Saves the created text message as draft.
void sendLater()
Queues the message to be sent later.
void forward()
Forwards a received mail.
void replySender()
Composes mail with the sender's address in reply field
void replyToAll()
Sends the message to multiple selected recipients.
void replyToMailingList()
Sends the message to mailing list.

Latest revision as of 16:08, 27 June 2014

DRAFT

This document just serves as draft for developing a QML Mail API.

API

Accounts

Folders

MessageList

Message

Message {

}

Composer

This Composer Api will be exposed through QML. The backend contains the basic functions of a message composer. This will be further extended in future. We already have implemented the following till now:

  • the send function
  • receive from, body, subject
  • receiver model and an attachment model ( which is being re-used from the present kmail composer)


The complete basic Api plan is as follows:

PROPERTIES:

Q_PROPERTY(QString identity ....)
Q_PROPERTY(ReceiverModel *toModel .... CONSTANT)
Q_PROPERTY(ReceiverModel *ccModel .... CONSTANT)
Q_PROPERTY(ReceiverModel *bccModel ... CONSTANT)
Q_PROPERTY(QString subject ....)
Q_PROPERTY(QString body ....)
Q_PROPERTY(QString from ....)
Q_PROPERTY(AttachmentModel *attachmentModel .... CONSTANT)

FUNCTIONS:

void subject()

Recieves the text input as QString from the editor in QML for subject


void body()

Recieves the text input as QString from the editor in QML for body.


void replyTo()

Will set the address of receiver. It will also be received as QString. Recepient count will be set.


void from()

Sets the sender's address.


void cc()

Sets the CC field in recepients list.


void bcc()

Sets the BCC field in the recepients list.

SLOTS:

void addAttachment()

Adds attachments to the message using KMime content part.


void insertSignature()

Inserts saved signature.


void send()

Will send the message using MessageComposer::MessageSender


void saveDraft()

Saves the created text message as draft.


void sendLater()

Queues the message to be sent later.


void forward()

Forwards a received mail.


void replySender()

Composes mail with the sender's address in reply field


void replyToAll()

Sends the message to multiple selected recipients.


void replyToMailingList()

Sends the message to mailing list.