MCPcopy Create free account
hub / github.com/CalcProgrammer1/OpenRGB / on_ProfileSelected

Method on_ProfileSelected

qt/OpenRGBDialog2/OpenRGBDialog2.cpp:1561–1585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1559}
1560
1561void Ui::OpenRGBDialog2::on_ProfileSelected()
1562{
1563 ProfileManager* profile_manager = ResourceManager::get()->GetProfileManager();
1564
1565 if(profile_manager != NULL)
1566 {
1567 /*---------------------------------------------------------*\
1568 | Get the profile filename from the selected object |
1569 \*---------------------------------------------------------*/
1570 std::string profile_name = QObject::sender()->objectName().toStdString();
1571
1572 /*---------------------------------------------------------*\
1573 | Load the profile |
1574 \*---------------------------------------------------------*/
1575 if(profile_manager->LoadProfile(profile_name))
1576 {
1577 for(int device = 0; device < ui->DevicesTabBar->count(); device++)
1578 {
1579 qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device))->UpdateDevice();
1580 }
1581 }
1582
1583 ui->ProfileBox->setCurrentIndex(ui->ProfileBox->findText(QString::fromStdString(profile_name)));
1584 }
1585}
1586
1587void Ui::OpenRGBDialog2::on_ButtonLoadProfile_clicked()
1588{

Callers

nothing calls this directly

Calls 5

GetProfileManagerMethod · 0.80
LoadProfileMethod · 0.80
getFunction · 0.50
countMethod · 0.45
UpdateDeviceMethod · 0.45

Tested by

no test coverage detected