Debian Codegraph @

Dekko/api/public/Composer/ComposerActions.qml

raw
1 /* Copyright (C) 2016 - 2017 Dan Chapman <[email protected]>
2
3 This file is part of Dekko email client for Ubuntu devices
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of
8 the License or (at your option) version 3
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 pragma Singleton
19 import QtQuick 2.4
20 import QuickFlux 1.0
21
22 /*!
23 *
24 * QML Composer action API
25 *
26 * API for interacting with the message composer from QML, via dispatched actions
27 *
28 * @ingroup qml_actions
29 */
30 ActionCreator {
31
32 signal resetComposer()
33 signal addCC()
34 signal addBCC()
35 signal sendMessage()
36 signal respondToMessage(int type, int msgId)
37 signal forwardMessage(int type, int msgId)
38 signal saveDraft()
39 signal openDraft(int draftId)
40 signal discardMessage()
41 signal addFileAttachment(string url)
42 signal removeAttachment(int index)
43 signal appendTextToSubject(string text)
44 signal appendTextToBody(string text)
45 signal validateAddress(int type, string address)
46 signal invalidAddress(int type, string address)
47 signal validAddress(int type, string address)
48
49 signal addRecipientIfValid(int type, string address)
50
51 /* Add a recipient by email address
52
53 type: RecipientType enum value
54 address: valid email address
55 */
56 signal addRecipientFromAddress(int type, string address)
57
58 /* Add a recipient by name & email address
59
60 type: RecipientType enum value
61 name: Recipients name
62 address: valid email address
63
64 This is useful when adding from a contacts list. The added recipient
65 will be in the format "User name <[email protected]>"
66 */
67 signal addRecipientFromNameAddress(int type, string name, string address)
68
69 signal removeRecipient(int type, int index)
70
71 signal discardMessageConfirmed()
72
73 /* Set which identity the MessageBuilder should use
74
75 idx: index of the identity in SenderIdentities model
76 */
77 signal setIdentity(int idx)
78
79 signal composeMailtoUri(string mailto)
80 }