Qt: Move soloar sensor menu items into submenu
Jeffrey Pfau jeffrey@endrift.com
Fri, 13 Mar 2015 00:11:10 -0700
1 files changed,
9 insertions(+),
9 deletions(-)
jump to
M
src/platform/qt/Window.cpp
→
src/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");