Qt: Move solar sensor menu to emulation menu
Jeffrey Pfau jeffrey@endrift.com
Fri, 03 Apr 2015 21:46:23 -0700
1 files changed,
19 insertions(+),
17 deletions(-)
jump to
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -685,6 +685,25 @@ m_controller->setAudioSync(value.toBool());
}, this); m_config->updateOption("audioSync"); + emulationMenu->addSeparator(); + + QMenu* solarMenu = emulationMenu->addMenu(tr("Solar sensor")); + QAction* solarIncrease = new QAction(tr("Increase solar level"), solarMenu); + connect(solarIncrease, SIGNAL(triggered()), m_controller, SLOT(increaseLuminanceLevel())); + addControlledAction(solarMenu, solarIncrease, "increaseLuminanceLevel"); + + QAction* solarDecrease = new QAction(tr("Decrease solar level"), solarMenu); + connect(solarDecrease, SIGNAL(triggered()), m_controller, SLOT(decreaseLuminanceLevel())); + addControlledAction(solarMenu, solarDecrease, "decreaseLuminanceLevel"); + + QAction* maxSolar = new QAction(tr("Brightest solar level"), solarMenu); + connect(maxSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(10); }); + addControlledAction(solarMenu, maxSolar, "maxLuminanceLevel"); + + QAction* minSolar = new QAction(tr("Darkest solar level"), solarMenu); + connect(minSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(0); }); + addControlledAction(solarMenu, minSolar, "minLuminanceLevel"); + QMenu* avMenu = menubar->addMenu(tr("Audio/&Video")); m_shortcutController->addMenu(avMenu); QMenu* frameMenu = avMenu->addMenu(tr("Frame size"));@@ -802,23 +821,6 @@ QAction* gdbWindow = new QAction(tr("Start &GDB server..."), toolsMenu);
connect(gdbWindow, SIGNAL(triggered()), this, SLOT(gdbOpen())); addControlledAction(toolsMenu, gdbWindow, "gdbWindow"); #endif - - 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(solarMenu, solarIncrease, "increaseLuminanceLevel"); - - QAction* solarDecrease = new QAction(tr("Decrease solar level"), solarMenu); - connect(solarDecrease, SIGNAL(triggered()), m_controller, SLOT(decreaseLuminanceLevel())); - addControlledAction(solarMenu, solarDecrease, "decreaseLuminanceLevel"); - - QAction* maxSolar = new QAction(tr("Brightest solar level"), solarMenu); - connect(maxSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(10); }); - addControlledAction(solarMenu, maxSolar, "maxLuminanceLevel"); - - QAction* minSolar = new QAction(tr("Darkest solar level"), solarMenu); - connect(minSolar, &QAction::triggered, [this]() { m_controller->setLuminanceLevel(0); }); - addControlledAction(solarMenu, minSolar, "minLuminanceLevel"); toolsMenu->addSeparator(); addControlledAction(toolsMenu, toolsMenu->addAction(tr("Settings..."), this, SLOT(openSettingsWindow())), "settings");