| 1326 | } |
| 1327 | |
| 1328 | void 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 | |
| 1360 | void OpenRGBDialog2::on_Exit() |
| 1361 | { |
nothing calls this directly
no test coverage detected