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

Method editLayoutClicked

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

Source from the content-addressed store, hash-verified

603}
604
605void DockManager::editLayoutClicked(DockLayout::Index layout_index)
606{
607 if (layout_index >= m_layouts.size())
608 return;
609
610 const DockLayout& layout = m_layouts[layout_index];
611
612 const auto name_validator = [this, layout_index](const QString& name) {
613 return !hasNameConflict(name, layout_index);
614 };
615
616 LayoutEditorDialog* dialog = new LayoutEditorDialog(layout.name(), layout.cpu(), name_validator, g_debugger_window);
617 dialog->setAttribute(Qt::WA_DeleteOnClose);
618
619 connect(dialog, &QDialog::accepted, this, [this, layout_index, dialog, name_validator]() {
620 if (layout_index >= m_layouts.size())
621 return;
622
623 DockLayout& layout = m_layouts[layout_index];
624
625 if (!name_validator(dialog->name()))
626 return;
627
628 layout.setName(dialog->name());
629 layout.setCpu(dialog->cpu());
630
631 layout.save(layout_index);
632
633 updateLayoutSwitcher();
634 });
635
636 dialog->open();
637}
638
639void DockManager::resetLayoutClicked(DockLayout::Index layout_index)
640{

Callers

nothing calls this directly

Calls 7

sizeMethod · 0.45
nameMethod · 0.45
cpuMethod · 0.45
setNameMethod · 0.45
setCpuMethod · 0.45
saveMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected