Changeset View
Changeset View
Standalone View
Standalone View
applets/clipboard/contents/ui/Menu.qml
Show All 24 Lines | 23 | PlasmaExtras.ScrollArea { | |||
---|---|---|---|---|---|
25 | property alias view: menuListView | 25 | property alias view: menuListView | ||
26 | property alias model: menuListView.model | 26 | property alias model: menuListView.model | ||
27 | property bool supportsBarcodes | 27 | property bool supportsBarcodes | ||
28 | signal itemSelected(string uuid) | 28 | signal itemSelected(string uuid) | ||
29 | signal remove(string uuid) | 29 | signal remove(string uuid) | ||
30 | signal edit(string uuid) | 30 | signal edit(string uuid) | ||
31 | signal barcode(string uuid) | 31 | signal barcode(string uuid) | ||
32 | signal action(string uuid) | 32 | signal action(string uuid) | ||
33 | signal share(string text) | ||||
33 | 34 | | |||
34 | ListView { | 35 | ListView { | ||
35 | id: menuListView | 36 | id: menuListView | ||
36 | focus: true | 37 | focus: true | ||
37 | 38 | | |||
38 | boundsBehavior: Flickable.StopAtBounds | 39 | boundsBehavior: Flickable.StopAtBounds | ||
39 | interactive: contentHeight > height | 40 | interactive: contentHeight > height | ||
40 | highlight: PlasmaComponents.Highlight { } | 41 | highlight: PlasmaComponents.Highlight { } | ||
41 | highlightMoveDuration: 0 | 42 | highlightMoveDuration: 0 | ||
42 | highlightResizeDuration: 0 | 43 | highlightResizeDuration: 0 | ||
43 | currentIndex: -1 | 44 | currentIndex: -1 | ||
44 | 45 | | |||
45 | delegate: ClipboardItemDelegate { | 46 | delegate: ClipboardItemDelegate { | ||
46 | width: menuListView.width | 47 | width: menuListView.width | ||
47 | supportsBarcodes: menu.supportsBarcodes | 48 | supportsBarcodes: menu.supportsBarcodes | ||
48 | 49 | | |||
49 | onItemSelected: menu.itemSelected(uuid) | 50 | onItemSelected: menu.itemSelected(uuid) | ||
50 | onRemove: menu.remove(uuid) | 51 | onRemove: menu.remove(uuid) | ||
51 | onEdit: menu.edit(uuid) | 52 | onEdit: menu.edit(uuid) | ||
52 | onBarcode: menu.barcode(uuid) | 53 | onBarcode: menu.barcode(uuid) | ||
53 | onAction: menu.action(uuid) | 54 | onAction: menu.action(uuid) | ||
55 | onShare: menu.share(text) | ||||
54 | } | 56 | } | ||
55 | } | 57 | } | ||
56 | } | 58 | } |