menu-separator.cpp 476 B

1234567891011121314151617181920212223242526
  1. #if defined(Hiro_MenuSeparator)
  2. namespace hiro {
  3. auto pMenuSeparator::construct() -> void {
  4. qtMenuSeparator = new QAction(nullptr);
  5. qtMenuSeparator->setSeparator(true);
  6. if(auto parent = _parentMenu()) {
  7. parent->qtMenu->addAction(qtMenuSeparator);
  8. }
  9. if(auto parent = _parentPopupMenu()) {
  10. parent->qtPopupMenu->addAction(qtMenuSeparator);
  11. }
  12. }
  13. auto pMenuSeparator::destruct() -> void {
  14. delete qtMenuSeparator;
  15. qtMenuSeparator = nullptr;
  16. }
  17. }
  18. #endif