all repos — mgba @ d9797cf0843aaf537303c33be2d6ed0ac842639b

mGBA Game Boy Advance Emulator

Qt: Move soloar sensor menu items into submenu
Jeffrey Pfau jeffrey@endrift.com
Fri, 13 Mar 2015 00:11:10 -0700
commit

d9797cf0843aaf537303c33be2d6ed0ac842639b

parent

943b805306a362a0c20bbe6d7d4ee660cc75f036

1 files changed, 9 insertions(+), 9 deletions(-)

jump to
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -698,22 +698,22 @@ connect(gdbWindow, SIGNAL(triggered()), this, SLOT(gdbOpen()));

addControlledAction(toolsMenu, gdbWindow, "gdbWindow"); #endif - toolsMenu->addSeparator(); - QAction* solarIncrease = new QAction(tr("Increase solar level"), toolsMenu); + QMenu* solarMenu = toolsMenu->addMenu(tr("Solar sensor")); + QAction* solarIncrease = new QAction(tr("Increase solar level"), solarMenu); connect(solarIncrease, SIGNAL(triggered()), m_controller, SLOT(increaseLuminanceLevel())); - addControlledAction(toolsMenu, solarIncrease, "increaseLuminanceLevel"); + addControlledAction(solarMenu, solarIncrease, "increaseLuminanceLevel"); - QAction* solarDecrease = new QAction(tr("Decrease solar level"), toolsMenu); + QAction* solarDecrease = new QAction(tr("Decrease solar level"), solarMenu); connect(solarDecrease, SIGNAL(triggered()), m_controller, SLOT(decreaseLuminanceLevel())); - addControlledAction(toolsMenu, solarDecrease, "decreaseLuminanceLevel"); + addControlledAction(solarMenu, solarDecrease, "decreaseLuminanceLevel"); - QAction* maxSolar = new QAction(tr("Brightest solar level"), toolsMenu); + QAction* maxSolar = new QAction(tr("Brightest solar level"), solarMenu); connect(maxSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(10); }); - addControlledAction(toolsMenu, maxSolar, "maxLuminanceLevel"); + addControlledAction(solarMenu, maxSolar, "maxLuminanceLevel"); - QAction* minSolar = new QAction(tr("Darkest solar level"), toolsMenu); + QAction* minSolar = new QAction(tr("Darkest solar level"), solarMenu); connect(minSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(0); }); - addControlledAction(toolsMenu, minSolar, "minLuminanceLevel"); + addControlledAction(solarMenu, minSolar, "minLuminanceLevel"); toolsMenu->addSeparator(); addControlledAction(toolsMenu, toolsMenu->addAction(tr("Settings..."), this, SLOT(openSettingsWindow())), "settings");