Merge pull request #11250 from AdmiralCurtiss/memory-widget-menu

MemoryWidget: Split Actions into Import and Export.
This commit is contained in:
Admiral H. Curtiss 2022-11-06 18:50:02 +01:00 committed by GitHub
commit c75b53c7ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -246,17 +246,18 @@ void MemoryWidget::CreateWidgets()
// Sidebar top menu
QMenuBar* menubar = new QMenuBar(sidebar);
menubar->setNativeMenuBar(false);
QMenu* menu_actions = new QMenu(tr("&Actions"));
menu_actions->addAction(tr("&Load file to current address"), this,
QMenu* menu_import = new QMenu(tr("&Import"));
menu_import->addAction(tr("&Load file to current address"), this,
&MemoryWidget::OnSetValueFromFile);
menu_actions->addSeparator();
menu_actions->addAction(tr("Dump &MRAM"), this, &MemoryWidget::OnDumpMRAM);
menu_actions->addAction(tr("Dump &ExRAM"), this, &MemoryWidget::OnDumpExRAM);
menu_actions->addAction(tr("Dump &ARAM"), this, &MemoryWidget::OnDumpARAM);
menu_actions->addAction(tr("Dump &FakeVMEM"), this, &MemoryWidget::OnDumpFakeVMEM);
menubar->addMenu(menu_import);
menubar->addMenu(menu_actions);
QMenu* menu_export = new QMenu(tr("&Export"));
menu_export->addAction(tr("Dump &MRAM"), this, &MemoryWidget::OnDumpMRAM);
menu_export->addAction(tr("Dump &ExRAM"), this, &MemoryWidget::OnDumpExRAM);
menu_export->addAction(tr("Dump &ARAM"), this, &MemoryWidget::OnDumpARAM);
menu_export->addAction(tr("Dump &FakeVMEM"), this, &MemoryWidget::OnDumpFakeVMEM);
menubar->addMenu(menu_export);
sidebar_layout->setSpacing(1);
sidebar->setLayout(sidebar_layout);