| 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 |
import QtQuick 2.4 |
| 19 |
import Lomiri.Components 1.3 |
| 20 |
import Dekko.Components 1.0 |
| 21 |
import Dekko.Mail.API 1.0 |
| 22 |
|
| 23 |
QtObject { |
| 24 |
|
| 25 |
property Action sendAction: Action { |
| 26 |
text: qsTr("Send") |
| 27 |
iconName: Icons.SendIcon |
| 28 |
iconSource: Paths.actionIconUrl(Icons.SendIcon) |
| 29 |
onTriggered: ComposerActions.sendMessage() |
| 30 |
} |
| 31 |
|
| 32 |
property Action saveDraftAction: Action { |
| 33 |
text: qsTr("Save draft") |
| 34 |
iconName: Icons.DraftIcon |
| 35 |
iconSource: Paths.actionIconUrl(Icons.DraftIcon) |
| 36 |
onTriggered: ComposerActions.saveDraft() |
| 37 |
} |
| 38 |
|
| 39 |
property Action discardMessageAction: Action { |
| 40 |
text: qsTr("Discard") |
| 41 |
iconName: Icons.BackIcon |
| 42 |
iconSource: Paths.actionIconUrl(Icons.BackIcon) |
| 43 |
onTriggered: ComposerActions.discardMessage() |
| 44 |
} |
| 45 |
|
| 46 |
property Action attachmentsAction: Action { |
| 47 |
text: qsTr("Attach") |
| 48 |
iconName: Icons.AttachmentIcon |
| 49 |
iconSource: Paths.actionIconUrl(Icons.AttachmentIcon) |
| 50 |
onTriggered: ContentActions.pickFile() |
| 51 |
} |
| 52 |
|
| 53 |
property Action deleteAttachment: Action { |
| 54 |
iconName: "delete" |
| 55 |
parameterType: Action.Integer |
| 56 |
onTriggered: { |
| 57 |
ComposerActions.removeAttachment(value) |
| 58 |
} |
| 59 |
} |
| 60 |
} |
| 61 |
|