| 1559 | } |
| 1560 | |
| 1561 | void 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 | |
| 1587 | void Ui::OpenRGBDialog2::on_ButtonLoadProfile_clicked() |
| 1588 | { |
nothing calls this directly
no test coverage detected