D21755: [RFC] Replace ToolAction by a more universal “ToggleActionMenu”

David Hurka noreply at phabricator.kde.org
Fri Jun 21 17:41:36 BST 2019


davidhurka added a comment.


  I could imagine to add a parameter ToggleActionMenu::MenuLogic to the constructor.
  
    enum MenuLogic {
        DefaultLogic = 0x0,
        /**
         * Automatically makes the triggered action the default action, even if in a submenu.
         * When a toolbar button is constructed, the default action is set to the first checked action in the menu.
         * setDefaultAction() provides a fallback if no action is checked.
         */
        ImplicitDefaultAction = 0x1
    };
  
  The integrated QActionGroup (for mutually exclusive actions) requires to subclass ToggleActionMenu, to shadow addAction(). addAction() would need to add the action to the action group.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D21755

To: davidhurka, #okular
Cc: simgunz, aacid, #vdg, okular-devel, fbampaloukas, joaonetto, tfella, ngraham, darcyshen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190621/f6360a44/attachment-0001.html>


More information about the Okular-devel mailing list