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

Method UpdateProfileList

qt/OpenRGBDialog2/OpenRGBDialog2.cpp:1328–1358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1326}
1327
1328void OpenRGBDialog2::UpdateProfileList()
1329{
1330 ProfileManager* profile_manager = ResourceManager::get()->GetProfileManager();
1331
1332 if(profile_manager != NULL)
1333 {
1334 /*-----------------------------------------------------*\
1335 | Clear profile combo box and tray icon menu |
1336 \*-----------------------------------------------------*/
1337 ui->ProfileBox->clear();
1338 profileMenu->clear();
1339
1340 for(std::size_t profile_index = 0; profile_index < profile_manager->profile_list.size(); profile_index++)
1341 {
1342 /*-----------------------------------------------------*\
1343 | Fill in profile combo box |
1344 \*-----------------------------------------------------*/
1345 ui->ProfileBox->addItem(profile_manager->profile_list[profile_index].c_str());
1346
1347 /*-----------------------------------------------------*\
1348 | Fill in profile tray icon menu |
1349 \*-----------------------------------------------------*/
1350 QAction* actionProfileSelected = new QAction(profile_manager->profile_list[profile_index].c_str(), this);
1351 actionProfileSelected->setObjectName(profile_manager->profile_list[profile_index].c_str());
1352 connect(actionProfileSelected, SIGNAL(triggered()), this, SLOT(on_ProfileSelected()));
1353 profileMenu->addAction(actionProfileSelected);
1354 }
1355 }
1356
1357 emit ProfileListChanged();
1358}
1359
1360void OpenRGBDialog2::on_Exit()
1361{

Callers

nothing calls this directly

Calls 3

GetProfileManagerMethod · 0.80
getFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected