feat(ui): add multiple shortcut sequence support for toolbar
Description
It would be useful to be able to bind multiple shortcuts to a single toolbar button.
Functional specifications
In the xml one should be able to call something like :
<menuItem name="myButton" icon="sight::module::ui::icons/myIcon.svg" style="check" shortcut="space;f" />
This should bind the "myButton" action to both of the specified keys space
and f
Technical specifications
the toolbar manager uses boost::split
with ;
separator, then passes the resulting vector of strings through the action vector to the actual toolbar service.
The service creates a QList
of QSequenceKeys
and adds them to the QAction
with setShortcuts
.
Test plan
- Launch tuto14_gui
- Press the
space
key - observe that the start action prompted you for confirmation.
- Press "No" and then press
f
keyto pay respectson your keyboard. - observe that the start action prompted you for confirmation.