We don't want to show e.g. the Quit button in the popup dialog when
Klipper is part of plasmashell. It would quit plasma. Not the best idea.
The menu now only shows the history items , all other options should be
used from the UI.
The ClipboardJob does no longer set the result directly when editing
is invoked, but instead connects to a new signal emitted from Klipper.
As soon as editing finished the result gets emitted.
This is useful to block the UI for further editing while an entry
gets edited.
For that the empty state is exposed in the DataEngine. As we have the
empty value now exposed the current on empty is now an empty string and
the clipboard is empty message is set in the plasmoid.
Klipper class needs to be splitted in a better way, but as a first step
just disable parts based on mode. E.g. we don't want to export the
klipper dbus interface when executed as a data engine.
The ClipboardEngine provides a service which in turn starts a
ClipboardJob. The following operations are globally supported:
* configureKlipper
* clearHistory
And the following operations are supported on uuid (base64):
* select
* remove
* edit
* barcode
* action
barcode is only supported if klipper gets compiled with prison support,
this is announced as data element "supportsBarcodes" in the "clipboard"
source of the DataEngine.
The slot to show barcode for top most item is turned into a method
taking the history item. The connection is changed to a lambda slot
passing the first item to this new method.
The UuidRole is mapped to a new data role which provides the item's
uuid base64 encoded. This is needed as the uuid will be passed through
the data engine and needs to be string convertable.
The slot is turned into a method taking a HistoryItem. The connect is
replaced by a variant using a lambda which delegates to the changed
method with the top item as argument.
The HistoryModel provides the needed functionality to be hooked into
History. It's not setting up the chaining (that's implicit in a model)
and uses shared pointer. Both needs further adjustments in Klipper.