mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-04 04:33:38 -04:00
Add Lights Off option to tray icon menu
This commit is contained in:
@@ -22,7 +22,11 @@ OpenRGBDialog2::OpenRGBDialog2(std::vector<i2c_smbus_interface *>& 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++)
|
||||
|
||||
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user