Changeset View
Changeset View
Standalone View
Standalone View
applets/clipboard/contents/ui/BarcodePage.qml
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 53 | PlasmaComponents.Button { | |||
---|---|---|---|---|---|
55 | iconSource: "go-previous-view" | 55 | iconSource: "go-previous-view" | ||
56 | text: i18n("Return to Clipboard") | 56 | text: i18n("Return to Clipboard") | ||
57 | onClicked: stack.pop() | 57 | onClicked: stack.pop() | ||
58 | } | 58 | } | ||
59 | PlasmaComponents.ContextMenu { | 59 | PlasmaComponents.ContextMenu { | ||
60 | id: menu | 60 | id: menu | ||
61 | visualParent: configureButton | 61 | visualParent: configureButton | ||
62 | placement: PlasmaCore.Types.BottomPosedLeftAlignedPopup | 62 | placement: PlasmaCore.Types.BottomPosedLeftAlignedPopup | ||
63 | onStatusChanged: { | 63 | function onStatusChanged() { | ||
64 | if (status == PlasmaComponents.DialogStatus.Closed) { | 64 | if (status == PlasmaComponents.DialogStatus.Closed) { | ||
65 | configureButton.checked = false; | 65 | configureButton.checked = false; | ||
66 | } | 66 | } | ||
67 | } | 67 | } | ||
68 | 68 | | |||
69 | function change(type) { | 69 | function change(type) { | ||
70 | barcodeView.barcodeType = type; | 70 | barcodeView.barcodeType = type; | ||
71 | barcodeView.show(barcodeView.uuid); | 71 | barcodeView.show(barcodeView.uuid); | ||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
114 | 114 | | |||
115 | QImageItem { | 115 | QImageItem { | ||
116 | id: barcodePreview | 116 | id: barcodePreview | ||
117 | property alias busy: busyIndicator.visible | 117 | property alias busy: busyIndicator.visible | ||
118 | fillMode: QImageItem.PreserveAspectFit | 118 | fillMode: QImageItem.PreserveAspectFit | ||
119 | Layout.fillWidth: true | 119 | Layout.fillWidth: true | ||
120 | Layout.fillHeight: true | 120 | Layout.fillHeight: true | ||
121 | Layout.topMargin: units.smallSpacing | 121 | Layout.topMargin: units.smallSpacing | ||
122 | onWidthChanged: barcodeView.show(barcodeView.uuid) | 122 | function onWidthChanged() { barcodeView.show(barcodeView.uuid) } | ||
123 | onHeightChanged: barcodeView.show(barcodeView.uuid) | 123 | function onHeightChanged() { barcodeView.show(barcodeView.uuid) } | ||
124 | PlasmaComponents.BusyIndicator { | 124 | PlasmaComponents.BusyIndicator { | ||
125 | id: busyIndicator | 125 | id: busyIndicator | ||
126 | anchors.centerIn: parent | 126 | anchors.centerIn: parent | ||
127 | } | 127 | } | ||
128 | PlasmaComponents.Label { | 128 | PlasmaComponents.Label { | ||
129 | anchors.centerIn: parent | 129 | anchors.centerIn: parent | ||
130 | text: i18n("Creating barcode failed") | 130 | text: i18n("Creating barcode failed") | ||
131 | visible: !barcodePreview.busy && barcodePreview.null | 131 | visible: !barcodePreview.busy && barcodePreview.null | ||
132 | } | 132 | } | ||
133 | } | 133 | } | ||
134 | } | 134 | } |