| 1741 | } |
| 1742 | |
| 1743 | void OpenRGBDialog2::SaveProfileAs() |
| 1744 | { |
| 1745 | ProfileManager* profile_manager = ResourceManager::get()->GetProfileManager(); |
| 1746 | |
| 1747 | if(profile_manager != NULL) |
| 1748 | { |
| 1749 | OpenRGBProfileSaveDialog dialog; |
| 1750 | |
| 1751 | /*---------------------------------------------------------*\ |
| 1752 | | Open Profile Name Dialog | |
| 1753 | \*---------------------------------------------------------*/ |
| 1754 | std::string profile_name = dialog.show(); |
| 1755 | |
| 1756 | if(!profile_name.empty()) |
| 1757 | { |
| 1758 | /*---------------------------------------------------------*\ |
| 1759 | | Extension .orp - OpenRgb Profile | |
| 1760 | \*---------------------------------------------------------*/ |
| 1761 | std::string filename = profile_name; |
| 1762 | |
| 1763 | /*---------------------------------------------------------*\ |
| 1764 | | Save the profile | |
| 1765 | \*---------------------------------------------------------*/ |
| 1766 | if(profile_manager->SaveProfile(filename)) |
| 1767 | { |
| 1768 | UpdateProfileList(); |
| 1769 | |
| 1770 | ui->ProfileBox->setCurrentIndex(ui->ProfileBox->findText(QString::fromStdString(profile_name))); |
| 1771 | } |
| 1772 | } |
| 1773 | } |
| 1774 | } |
| 1775 | |
| 1776 | void Ui::OpenRGBDialog2::on_ButtonRescan_clicked() |
| 1777 | { |
nothing calls this directly
no test coverage detected