MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / createMenuBar

Method createMenuBar

pcsx2-qt/Debugger/Docking/DockManager.cpp:482–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482QWidget* DockManager::createMenuBar(QWidget* original_menu_bar)
483{
484 pxAssert(!m_menu_bar);
485
486 m_menu_bar = new DockMenuBar(original_menu_bar);
487
488 connect(m_menu_bar, &DockMenuBar::currentLayoutChanged, this, [this](DockLayout::Index layout_index) {
489 if (layout_index >= m_layouts.size())
490 return;
491
492 switchToLayout(layout_index);
493 });
494 connect(m_menu_bar, &DockMenuBar::newButtonClicked, this, &DockManager::newLayoutClicked);
495 connect(m_menu_bar, &DockMenuBar::layoutMoved, this, &DockManager::layoutSwitcherTabMoved);
496 connect(m_menu_bar, &DockMenuBar::lockButtonToggled, this, &DockManager::setLayoutLockedAndSaveSetting);
497 connect(m_menu_bar, &DockMenuBar::layoutSwitcherContextMenuRequested,
498 this, &DockManager::openLayoutSwitcherContextMenu);
499
500 updateLayoutSwitcher();
501
502 bool layout_locked = Host::GetBaseBoolSettingValue("Debugger/UserInterface", "LayoutLocked", true);
503 setLayoutLocked(layout_locked, false);
504
505 return m_menu_bar;
506}
507
508void DockManager::updateLayoutSwitcher()
509{

Callers 1

DebuggerWindowMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected