Debian Codegraph @

rc/qml/AlbumEditor/AlbumEditMenu.qml

raw
1 /*
2 * Copyright (C) 2012-2015 Canonical Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors:
17 * Eric Gregory <[email protected]>
18 */
19
20 import QtQuick 2.9
21 import Lomiri.Components.Popups 1.3
22 import Lomiri.Components.ListItems 1.3 as ListItem
23
24 /*!
25 Popover to show the context menu for an album
26 */
27 Popover {
28 id: albumEditMenu
29
30 /// The user clicked on the edit button
31 signal editClicked()
32 /// The user clicked on the delete button
33 signal deleteClicked()
34
35 Column {
36 anchors {
37 left: parent.left
38 right: parent.right
39 top: parent.top
40 }
41 ListItem.Standard {
42 objectName: "editAlbumListItem"
43 text: i18n.tr("Edit album")
44 onClicked: {
45 hide()
46 editClicked()
47 }
48 }
49 ListItem.Standard {
50 text: i18n.tr("Delete")
51 onClicked: {
52 hide()
53 deleteClicked()
54 }
55 }
56 }
57 }