Resolve "(ui): IAction harmonisation and modernisation"
Description
IAction
vocabulary has been changed accordingly to the specifications in #876 (closed):
- executable -> enable
- active -> check
The old API is deprecated, and its usage has been replaced all over the repository.
Signals with a boolean state as a parameter were added.
A new service called SAction
has been added as a replacement for SDefaultAction
. It should be the main service used for buttons and menu items. An extra signal clicked
was added, which is similar to the updated
signal, with a more explicit terminology. The only important difference is that SAction
provides a sync
configuration option, that allows controlling the emission of the clicked
signal. Indeed, the updated signal is emitted by IService
and could not be changed.
This new service made it possible to deprecate SSlotCaller
and SBooleanSlotCaller
everywhere.
Closes #876 (closed)
Extra changes
An improvement has been added to add lambda functions support for slots. It is now possible to use for instance:
auto slot = sight::core::com::newSlot([](){sampleFunction(4321);});
or in a service:
newSlot("sample_slot", [this](){this->sampleFunction(4321);});
This was initially to simplify the writing of the new API of IAction
but this will be very handy everywhere.
How to test it?
- GUI tests should pass
- Tests applications and examples