ActionGroup.cpp 425 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibGUI/Action.h>
  7. #include <LibGUI/ActionGroup.h>
  8. namespace GUI {
  9. void ActionGroup::add_action(Action& action)
  10. {
  11. action.set_group({}, this);
  12. m_actions.set(&action);
  13. }
  14. void ActionGroup::remove_action(Action& action)
  15. {
  16. action.set_group({}, nullptr);
  17. m_actions.remove(&action);
  18. }
  19. }