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

Method on_ButtonLoadProfile_clicked

qt/OpenRGBDialog2/OpenRGBDialog2.cpp:1587–1609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1585}
1586
1587void Ui::OpenRGBDialog2::on_ButtonLoadProfile_clicked()
1588{
1589 ProfileManager* profile_manager = ResourceManager::get()->GetProfileManager();
1590
1591 if(profile_manager != NULL)
1592 {
1593 /*---------------------------------------------------------*\
1594 | Get the profile filename from the profiles list |
1595 \*---------------------------------------------------------*/
1596 std::string profile_name = ui->ProfileBox->currentText().toStdString();
1597
1598 /*---------------------------------------------------------*\
1599 | Load the profile |
1600 \*---------------------------------------------------------*/
1601 if(profile_manager->LoadProfile(profile_name))
1602 {
1603 for(int device = 0; device < ui->DevicesTabBar->count(); device++)
1604 {
1605 qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device))->UpdateDevice();
1606 }
1607 }
1608 }
1609}
1610
1611void Ui::OpenRGBDialog2::on_ButtonDeleteProfile_clicked()
1612{

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