diff --git a/qt/OpenRGBDialog2.cpp b/qt/OpenRGBDialog2.cpp index 5be520ca6..1b45b5515 100644 --- a/qt/OpenRGBDialog2.cpp +++ b/qt/OpenRGBDialog2.cpp @@ -22,7 +22,11 @@ OpenRGBDialog2::OpenRGBDialog2(std::vector& bus, std::vec QAction* actionShowHide = new QAction("Show/Hide", this); connect(actionShowHide, SIGNAL(triggered()), this, SLOT(on_ShowHide())); trayIconMenu->addAction(actionShowHide); - + + QAction* actionLightsOff = new QAction("Lights Off", this); + connect(actionLightsOff, SIGNAL(triggered()), this, SLOT(on_LightsOff())); + trayIconMenu->addAction(actionLightsOff); + QAction* actionExit = new QAction( "Exit", this ); connect( actionExit, SIGNAL( triggered() ), this, SLOT( on_Exit() )); trayIconMenu->addAction(actionExit); @@ -179,6 +183,11 @@ void OpenRGBDialog2::on_Exit() close(); } +void OpenRGBDialog2::on_LightsOff() +{ + on_SetAllDevices(0, 0, 0); +} + void OpenRGBDialog2::on_SetAllDevices(unsigned char red, unsigned char green, unsigned char blue) { for(int device = 0; device < ui->DevicesTabBar->count(); device++) diff --git a/qt/OpenRGBDialog2.h b/qt/OpenRGBDialog2.h index 4c2a981ef..c23171d63 100644 --- a/qt/OpenRGBDialog2.h +++ b/qt/OpenRGBDialog2.h @@ -38,6 +38,7 @@ private: private slots: void on_Exit(); + void on_LightsOff(); void on_SetAllDevices(unsigned char red, unsigned char green, unsigned char blue); void on_ShowHide(); };