- Downloads
enh(core): add a toggle state in module::ui::qt::signal_shortcut
`sight::module::ui::qt::signal_shortcut` provides a signal that can be connected in XML, triggered by a keyboard shortcut. We added an optional toggle state, offering a similar signal/slots interface as a `sight::module::ui::action`: - is_checked(bool): Emitted when the state is checked or unchecked. - checked(): Emitted when the state is checked. - unchecked(): Emitted when the state is unchecked.. - set_checked(bool): sets whether the state is checked. - check(): check the state. - uncheck(): uncheck the state. On top of that, three other improvements were made: - a comma or semi-colon-separated list of shortcuts can be given - the `QShortcut` are now only created when the state is enabled, which allows to have multiple services running at the same time on the same shortcut, but of course, only one can be enabled at once, and it will be up to the developer to ensure that - the unit test has been really implemented, testing previous and new features
parent
83f6e2c5