mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-21 05:27:50 -05:00
Rework Profiles to use JSON format
* Update OpenRGB Plugin Interface to include functions for loading/saving profile JSON data into OpenRGB profiles
* Update ProfileManager to handle auto-load profiles (Exit, Open, Resume, Suspend) and move their settings to ProfileManager section
* Update ProfileManager to store profiles in "profiles" folder in .json format
* Update ProfileManager to store size profile in sizes.json
* Update ProfileManager to perform device UpdateMode/UpdateColors when loading profile
* Code cleanup of ProfileManager and profile-related code
This commit is contained in:
@@ -704,7 +704,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
memcpy(&new_size, data + sizeof(int), sizeof(int));
|
||||
|
||||
controllers[header.pkt_dev_idx]->ResizeZone(zone, new_size);
|
||||
profile_manager->SaveProfile("sizes", true);
|
||||
profile_manager->SaveSizes();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -909,11 +909,6 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
profile_manager->LoadProfile(profile_name);
|
||||
}
|
||||
|
||||
for(RGBController* controller : controllers)
|
||||
{
|
||||
controller->UpdateLEDs();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_REQUEST_DELETE_PROFILE:
|
||||
@@ -964,7 +959,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
memcpy(&zone, data, sizeof(int));
|
||||
|
||||
controllers[header.pkt_dev_idx]->ClearSegments(zone);
|
||||
profile_manager->SaveProfile("sizes", true);
|
||||
profile_manager->SaveSizes();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -979,7 +974,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
if(header.pkt_dev_idx < controllers.size())
|
||||
{
|
||||
controllers[header.pkt_dev_idx]->SetSegmentDescription((unsigned char *)data);
|
||||
profile_manager->SaveProfile("sizes", true);
|
||||
profile_manager->SaveSizes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <QtPlugin>
|
||||
#include <QLabel>
|
||||
#include <QMenu>
|
||||
#include "nlohmann/json.hpp"
|
||||
#include "ResourceManagerInterface.h"
|
||||
|
||||
#define OpenRGBPluginInterface_IID "com.OpenRGBPluginInterface"
|
||||
@@ -87,6 +88,9 @@ public:
|
||||
virtual QWidget* GetWidget() = 0;
|
||||
virtual QMenu* GetTrayMenu() = 0;
|
||||
virtual void Unload() = 0;
|
||||
virtual void OnProfileAboutToLoad() = 0;
|
||||
virtual void OnProfileLoad(nlohmann::json profile_data) = 0;
|
||||
virtual nlohmann::json OnProfileSave() = 0;
|
||||
virtual unsigned char* OnSDKCommand(unsigned int pkt_id, unsigned char * pkt_data, unsigned int *pkt_size) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -533,6 +533,58 @@ void PluginManager::UnloadPlugins()
|
||||
}
|
||||
}
|
||||
|
||||
void PluginManager::OnProfileAboutToLoad()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Loop through all plugins and signal profile about to |
|
||||
| load |
|
||||
\*-----------------------------------------------------*/
|
||||
for(std::size_t plugin_idx = 0; plugin_idx < ActivePlugins.size(); plugin_idx++)
|
||||
{
|
||||
if(ActivePlugins[plugin_idx].enabled && ActivePlugins[plugin_idx].loader->isLoaded())
|
||||
{
|
||||
ActivePlugins[plugin_idx].plugin->OnProfileAboutToLoad();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PluginManager::OnProfileLoad(nlohmann::json profile_data)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Loop through all plugins call their OnProfileLoad if |
|
||||
| the profile data contains an entry for that plugin |
|
||||
\*-----------------------------------------------------*/
|
||||
for(std::size_t plugin_idx = 0; plugin_idx < ActivePlugins.size(); plugin_idx++)
|
||||
{
|
||||
if(ActivePlugins[plugin_idx].enabled && ActivePlugins[plugin_idx].loader->isLoaded())
|
||||
{
|
||||
if(profile_data.contains(ActivePlugins[plugin_idx].plugin->GetPluginInfo().Name))
|
||||
{
|
||||
ActivePlugins[plugin_idx].plugin->OnProfileLoad(profile_data[ActivePlugins[plugin_idx].plugin->GetPluginInfo().Name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nlohmann::json PluginManager::OnProfileSave()
|
||||
{
|
||||
nlohmann::json plugin_json;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Loop through all plugins and gather their profile |
|
||||
| data |
|
||||
\*-----------------------------------------------------*/
|
||||
for(std::size_t plugin_idx = 0; plugin_idx < ActivePlugins.size(); plugin_idx++)
|
||||
{
|
||||
if(ActivePlugins[plugin_idx].enabled && ActivePlugins[plugin_idx].loader->isLoaded())
|
||||
{
|
||||
plugin_json[ActivePlugins[plugin_idx].plugin->GetPluginInfo().Name] = ActivePlugins[plugin_idx].plugin->OnProfileSave();
|
||||
}
|
||||
}
|
||||
|
||||
return(plugin_json);
|
||||
}
|
||||
|
||||
unsigned char * PluginManager::OnSDKCommand(unsigned int plugin_idx, unsigned int pkt_id, unsigned char * pkt_data, unsigned int * pkt_size)
|
||||
{
|
||||
unsigned char * out_data = NULL;
|
||||
|
||||
@@ -60,6 +60,9 @@ public:
|
||||
void LoadPlugins();
|
||||
void UnloadPlugins();
|
||||
|
||||
void OnProfileAboutToLoad();
|
||||
void OnProfileLoad(nlohmann::json profile_data);
|
||||
nlohmann::json OnProfileSave();
|
||||
unsigned char * OnSDKCommand(unsigned int plugin_idx, unsigned int pkt_id, unsigned char * pkt_data, unsigned int * pkt_size);
|
||||
|
||||
std::vector<OpenRGBPluginEntry> ActivePlugins;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
class PluginManagerInterface
|
||||
{
|
||||
@@ -25,5 +26,8 @@ public:
|
||||
virtual void LoadPlugins() = 0;
|
||||
virtual void UnloadPlugins() = 0;
|
||||
|
||||
virtual void OnProfileAboutToLoad() = 0;
|
||||
virtual void OnProfileLoad(nlohmann::json profile_data) = 0;
|
||||
virtual nlohmann::json OnProfileSave() = 0;
|
||||
virtual unsigned char * OnSDKCommand(unsigned int plugin_idx, unsigned int pkt_id, unsigned char * pkt_data, unsigned int * pkt_size) = 0;
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
144
ProfileManager.h
144
ProfileManager.h
@@ -3,6 +3,8 @@
|
||||
| |
|
||||
| OpenRGB profile manager |
|
||||
| |
|
||||
| Adam Honse <calcprogrammer1@gmail.com> 09 Nov 2025 |
|
||||
| |
|
||||
| This file is part of the OpenRGB project |
|
||||
| SPDX-License-Identifier: GPL-2.0-or-later |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -15,34 +17,37 @@
|
||||
class ProfileManagerInterface
|
||||
{
|
||||
public:
|
||||
virtual bool SaveProfile
|
||||
(
|
||||
std::string profile_name,
|
||||
bool sizes = false
|
||||
) = 0;
|
||||
virtual bool LoadProfile(std::string profile_name) = 0;
|
||||
virtual bool LoadSizeFromProfile(std::string profile_name) = 0;
|
||||
virtual void DeleteProfile(std::string profile_name) = 0;
|
||||
virtual unsigned char * GetProfileListDescription() = 0;
|
||||
virtual void DeleteProfile(std::string profile_name) = 0;
|
||||
|
||||
std::vector<std::string> profile_list;
|
||||
virtual std::string GetActiveProfile() = 0;
|
||||
virtual std::vector<RGBController*> GetControllerListFromProfile(nlohmann::json profile_json) = 0;
|
||||
virtual std::vector<RGBController*> GetControllerListFromSizes() = 0;
|
||||
virtual std::vector<std::string> GetProfileList() = 0;
|
||||
virtual unsigned char * GetProfileListDescription() = 0;
|
||||
|
||||
virtual bool LoadDeviceFromListWithOptions
|
||||
(
|
||||
std::vector<RGBController*>& temp_controllers,
|
||||
std::vector<bool>& temp_controller_used,
|
||||
RGBController* load_controller,
|
||||
bool load_size,
|
||||
bool load_settings
|
||||
) = 0;
|
||||
virtual bool LoadControllerFromListWithOptions
|
||||
(
|
||||
std::vector<RGBController*>& temp_controllers,
|
||||
std::vector<bool>& temp_controller_used,
|
||||
RGBController* load_controller,
|
||||
bool load_size,
|
||||
bool load_settings
|
||||
) = 0;
|
||||
|
||||
virtual std::vector<RGBController*> LoadProfileToList
|
||||
(
|
||||
std::string profile_name,
|
||||
bool sizes = false
|
||||
) = 0;
|
||||
virtual bool LoadProfile(std::string profile_name) = 0;
|
||||
|
||||
virtual nlohmann::json ReadProfileJSON(std::string profile_name) = 0;
|
||||
|
||||
virtual bool SaveProfile(std::string profile_name) = 0;
|
||||
virtual bool SaveProfileFromJSON(nlohmann::json profile_json) = 0;
|
||||
virtual bool SaveSizes() = 0;
|
||||
|
||||
virtual void SetConfigurationDirectory(const filesystem::path& directory) = 0;
|
||||
|
||||
virtual void SetProfileListFromDescription(char * data_buf) = 0;
|
||||
|
||||
virtual void UpdateProfileList() = 0;
|
||||
|
||||
virtual void SetConfigurationDirectory(const filesystem::path& directory) = 0;
|
||||
protected:
|
||||
virtual ~ProfileManagerInterface() {};
|
||||
};
|
||||
@@ -53,43 +58,70 @@ public:
|
||||
ProfileManager(const filesystem::path& config_dir);
|
||||
~ProfileManager();
|
||||
|
||||
bool SaveProfile
|
||||
(
|
||||
std::string profile_name,
|
||||
bool sizes = false
|
||||
);
|
||||
bool LoadProfile(std::string profile_name);
|
||||
bool LoadSizeFromProfile(std::string profile_name);
|
||||
void DeleteProfile(std::string profile_name);
|
||||
unsigned char * GetProfileListDescription();
|
||||
void DeleteProfile(std::string profile_name);
|
||||
|
||||
std::vector<std::string> profile_list;
|
||||
std::string GetActiveProfile();
|
||||
std::vector<RGBController*> GetControllerListFromProfile(nlohmann::json profile_json);
|
||||
std::vector<RGBController*> GetControllerListFromSizes();
|
||||
std::vector<std::string> GetProfileList();
|
||||
unsigned char * GetProfileListDescription();
|
||||
|
||||
bool LoadDeviceFromListWithOptions
|
||||
(
|
||||
std::vector<RGBController*>& temp_controllers,
|
||||
std::vector<bool>& temp_controller_used,
|
||||
RGBController* load_controller,
|
||||
bool load_size,
|
||||
bool load_settings
|
||||
);
|
||||
bool LoadAutoProfileExit();
|
||||
bool LoadAutoProfileOpen();
|
||||
bool LoadAutoProfileResume();
|
||||
bool LoadAutoProfileSuspend();
|
||||
|
||||
std::vector<RGBController*> LoadProfileToList
|
||||
(
|
||||
std::string profile_name,
|
||||
bool sizes = false
|
||||
);
|
||||
bool LoadControllerFromListWithOptions
|
||||
(
|
||||
std::vector<RGBController*>& temp_controllers,
|
||||
std::vector<bool>& temp_controller_used,
|
||||
RGBController* load_controller,
|
||||
bool load_size,
|
||||
bool load_settings
|
||||
);
|
||||
|
||||
void SetConfigurationDirectory(const filesystem::path& directory);
|
||||
bool LoadProfile(std::string profile_name);
|
||||
|
||||
nlohmann::json ReadProfileJSON(std::string profile_name);
|
||||
|
||||
bool SaveProfile(std::string profile_name);
|
||||
bool SaveProfileFromJSON(nlohmann::json profile_json);
|
||||
bool SaveSizes();
|
||||
|
||||
void SetConfigurationDirectory(const filesystem::path& directory);
|
||||
|
||||
void SetProfileListFromDescription(char * data_buf);
|
||||
|
||||
void UpdateProfileList();
|
||||
|
||||
private:
|
||||
filesystem::path configuration_directory;
|
||||
/*-----------------------------------------------------*\
|
||||
| List of available profiles |
|
||||
\*-----------------------------------------------------*/
|
||||
std::vector<std::string> profile_list;
|
||||
|
||||
void UpdateProfileList();
|
||||
bool LoadProfileWithOptions
|
||||
(
|
||||
std::string profile_name,
|
||||
bool load_size,
|
||||
bool load_settings
|
||||
);
|
||||
/*-----------------------------------------------------*\
|
||||
| Active profile string |
|
||||
\*-----------------------------------------------------*/
|
||||
std::string active_profile;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Profile paths |
|
||||
\*-----------------------------------------------------*/
|
||||
filesystem::path configuration_directory;
|
||||
filesystem::path profile_directory;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Private functions |
|
||||
\*-----------------------------------------------------*/
|
||||
bool LoadAutoProfile(std::string setting_name);
|
||||
|
||||
bool LoadProfileWithOptions
|
||||
(
|
||||
std::string profile_name,
|
||||
bool load_size,
|
||||
bool load_settings
|
||||
);
|
||||
|
||||
nlohmann::json ReadProfileFileJSON(filesystem::path profile_filepath);
|
||||
};
|
||||
|
||||
@@ -103,6 +103,9 @@ using namespace std::chrono_literals;
|
||||
|
||||
ResourceManager *ResourceManager::get()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| If ResourceManager does not exist yet, create it |
|
||||
\*-----------------------------------------------------*/
|
||||
if(!instance)
|
||||
{
|
||||
instance = new ResourceManager();
|
||||
@@ -113,6 +116,25 @@ ResourceManager *ResourceManager::get()
|
||||
|
||||
ResourceManager::ResourceManager()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Initialize global instance pointer the when created |
|
||||
| There should only ever be one instance of |
|
||||
| ResourceManager |
|
||||
\*-----------------------------------------------------*/
|
||||
if(!instance)
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
/*-----------------------------------------------------*\
|
||||
| If, for whatever reason, ResourceManager already |
|
||||
| exists, delete this instance as only one should exist |
|
||||
\*-----------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
delete this;
|
||||
return;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Initialize Detection Variables |
|
||||
\*-----------------------------------------------------*/
|
||||
@@ -126,6 +148,7 @@ ResourceManager::ResourceManager()
|
||||
init_finished = false;
|
||||
initial_detection = true;
|
||||
background_thread_running = true;
|
||||
plugin_manager = NULL;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Start the background detection thread in advance; it |
|
||||
@@ -189,7 +212,7 @@ ResourceManager::ResourceManager()
|
||||
\*-----------------------------------------------------*/
|
||||
profile_manager = new ProfileManager(GetConfigurationDirectory());
|
||||
server->SetProfileManager(profile_manager);
|
||||
rgb_controllers_sizes = profile_manager->LoadProfileToList("sizes", true);
|
||||
rgb_controllers_sizes = profile_manager->GetControllerListFromSizes();
|
||||
}
|
||||
|
||||
ResourceManager::~ResourceManager()
|
||||
@@ -252,7 +275,7 @@ void ResourceManager::RegisterRGBController(RGBController *rgb_controller)
|
||||
\*-------------------------------------------------*/
|
||||
for(unsigned int controller_size_idx = detection_prev_size; controller_size_idx < rgb_controllers_hw.size(); controller_size_idx++)
|
||||
{
|
||||
profile_manager->LoadDeviceFromListWithOptions(rgb_controllers_sizes, detection_size_entry_used, rgb_controllers_hw[controller_size_idx], true, false);
|
||||
profile_manager->LoadControllerFromListWithOptions(rgb_controllers_sizes, detection_size_entry_used, rgb_controllers_hw[controller_size_idx], true, false);
|
||||
}
|
||||
|
||||
UpdateDeviceList();
|
||||
@@ -691,7 +714,7 @@ void ResourceManager::SetConfigurationDirectory(const filesystem::path &director
|
||||
profile_manager->SetConfigurationDirectory(directory);
|
||||
|
||||
rgb_controllers_sizes.clear();
|
||||
rgb_controllers_sizes = profile_manager->LoadProfileToList("sizes", true);
|
||||
rgb_controllers_sizes = profile_manager->GetControllerListFromSizes();
|
||||
}
|
||||
|
||||
NetworkServer* ResourceManager::GetServer()
|
||||
|
||||
19
cli.cpp
19
cli.cpp
@@ -865,7 +865,7 @@ bool OptionSize(std::vector<DeviceOptions>* current_devices, std::string argumen
|
||||
/*---------------------------------------------------------*\
|
||||
| Save the profile |
|
||||
\*---------------------------------------------------------*/
|
||||
ResourceManager::get()->GetProfileManager()->SaveProfile("sizes", true);
|
||||
ResourceManager::get()->GetProfileManager()->SaveSizes();
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -880,23 +880,6 @@ bool OptionProfile(std::string argument, std::vector<RGBController *>& rgb_contr
|
||||
\*---------------------------------------------------------*/
|
||||
if(ResourceManager::get()->GetProfileManager()->LoadProfile(argument))
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Change device mode if profile loading was successful |
|
||||
\*-----------------------------------------------------*/
|
||||
for(std::size_t controller_idx = 0; controller_idx < rgb_controllers.size(); controller_idx++)
|
||||
{
|
||||
RGBController* device = rgb_controllers[controller_idx];
|
||||
|
||||
device->DeviceUpdateMode();
|
||||
LOG_DEBUG("[CLI] Updating mode for %s to %i", device->GetName().c_str(), device->GetActiveMode());
|
||||
|
||||
if(device->GetModeColorMode(device->GetActiveMode()) == MODE_COLORS_PER_LED)
|
||||
{
|
||||
device->DeviceUpdateLEDs();
|
||||
LOG_DEBUG("[CLI] Mode uses per-LED color, also updating LEDs");
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Profile loaded successfully" << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2493,36 +2493,32 @@ void OpenRGBDevicePage::on_SpinBoxModeColors_valueChanged(int count)
|
||||
\*-----------------------------------------*/
|
||||
unsigned int mode_colors_min;
|
||||
unsigned int mode_colors_max;
|
||||
unsigned int mode_colors;
|
||||
|
||||
if(selected_zone_mode && (selected_mode >= 0))
|
||||
{
|
||||
mode_colors_min = device->GetZoneModeColorsMin(selected_zone, selected_mode);
|
||||
mode_colors_max = device->GetZoneModeColorsMax(selected_zone, selected_mode);
|
||||
mode_colors = device->GetZoneModeColorsCount(selected_zone, selected_mode);
|
||||
}
|
||||
else if(selected_zone_mode)
|
||||
{
|
||||
mode_colors_min = device->GetModeColorsMin(device->GetActiveMode());
|
||||
mode_colors_max = device->GetModeColorsMax(device->GetActiveMode());
|
||||
mode_colors = device->GetModeColorsCount(device->GetActiveMode());
|
||||
}
|
||||
else
|
||||
{
|
||||
mode_colors_min = device->GetModeColorsMin(selected_mode);
|
||||
mode_colors_max = device->GetModeColorsMax(selected_mode);
|
||||
mode_colors = device->GetModeColorsCount(selected_mode);
|
||||
}
|
||||
|
||||
if((count >= mode_colors_min) && (count <= mode_colors_max))
|
||||
if(((unsigned int)count >= mode_colors_min) && ((unsigned int)count <= mode_colors_max))
|
||||
{
|
||||
if(selected_zone_mode && (selected_mode >= 0))
|
||||
{
|
||||
device->SetZoneModeColorsCount(selected_zone, device->GetZoneActiveMode(selected_zone), count);
|
||||
device->SetZoneModeColorsCount(selected_zone, device->GetZoneActiveMode(selected_zone), (std::size_t)count);
|
||||
}
|
||||
else
|
||||
{
|
||||
device->SetModeColorsCount(device->GetActiveMode(), count);
|
||||
device->SetModeColorsCount(device->GetActiveMode(), (std::size_t)count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,8 +37,6 @@ public:
|
||||
void HideDeviceView();
|
||||
void ShowDeviceView();
|
||||
|
||||
void UpdateDevice();
|
||||
|
||||
private:
|
||||
/*-----------------------------------------------------*\
|
||||
| UI Pointer |
|
||||
@@ -70,6 +68,7 @@ private:
|
||||
\*-----------------------------------------------------*/
|
||||
void UpdateColor();
|
||||
void UpdateColorUi();
|
||||
void UpdateDevice();
|
||||
void UpdateLEDList();
|
||||
void UpdateLEDUi();
|
||||
void UpdateMode();
|
||||
|
||||
@@ -263,49 +263,6 @@ OpenRGBDialog::OpenRGBDialog(QWidget *parent) : QMainWindow(parent), ui(new Ui::
|
||||
setGeometry(set_window);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| If autoload_profiles doesn't exist or has missing |
|
||||
| profiles, write it to config |
|
||||
\*-----------------------------------------------------*/
|
||||
json autoload_profiles;
|
||||
if(ui_settings.contains("autoload_profiles"))
|
||||
{
|
||||
autoload_profiles = ui_settings["autoload_profiles"];
|
||||
}
|
||||
else
|
||||
{
|
||||
new_settings_keys = true;
|
||||
}
|
||||
|
||||
if(!autoload_profiles.contains("exit_profile"))
|
||||
{
|
||||
json profile;
|
||||
profile["enabled"] = false;
|
||||
profile["name"] = "";
|
||||
autoload_profiles["exit_profile"] = profile;
|
||||
new_settings_keys = true;
|
||||
}
|
||||
|
||||
if(!autoload_profiles.contains("resume_profile"))
|
||||
{
|
||||
json profile;
|
||||
profile["enabled"] = false;
|
||||
profile["name"] = "";
|
||||
autoload_profiles["resume_profile"] = profile;
|
||||
new_settings_keys = true;
|
||||
}
|
||||
|
||||
if(!autoload_profiles.contains("suspend_profile"))
|
||||
{
|
||||
json profile;
|
||||
profile["enabled"] = false;
|
||||
profile["name"] = "";
|
||||
autoload_profiles["suspend_profile"] = profile;
|
||||
new_settings_keys = true;
|
||||
}
|
||||
|
||||
ui_settings["autoload_profiles"] = autoload_profiles;
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Register detection progress callback with resource |
|
||||
| manager |
|
||||
@@ -592,7 +549,6 @@ void OpenRGBDialog::handleAboutToQuit()
|
||||
delete closeEvent;
|
||||
}
|
||||
|
||||
|
||||
void OpenRGBDialog::changeEvent(QEvent *event)
|
||||
{
|
||||
if(event->type() == QEvent::LanguageChange)
|
||||
@@ -631,10 +587,8 @@ void OpenRGBDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
plugin_manager->UnloadPlugins();
|
||||
|
||||
if(SelectConfigProfile("exit_profile"))
|
||||
if(ResourceManager::get()->GetProfileManager()->LoadAutoProfileExit())
|
||||
{
|
||||
on_ButtonLoadProfile_clicked();
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Pause briefly to ensure that all profiles are |
|
||||
| loaded. |
|
||||
@@ -667,39 +621,6 @@ void OpenRGBDialog::keyPressEvent(QKeyEvent *event)
|
||||
}
|
||||
}
|
||||
|
||||
bool OpenRGBDialog::SelectConfigProfile(const std::string name)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Set automatic profile (if enabled and valid) |
|
||||
\*-----------------------------------------------------*/
|
||||
json ui_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("UserInterface");
|
||||
|
||||
if(ui_settings.contains("autoload_profiles"))
|
||||
{
|
||||
json autoload_profiles = ui_settings["autoload_profiles"];
|
||||
if(autoload_profiles.contains(name))
|
||||
{
|
||||
json profile = autoload_profiles[name];
|
||||
if (profile.contains("enabled") && profile["enabled"].get<bool>() && profile.contains("name"))
|
||||
{
|
||||
/*-----------------------------------------*\
|
||||
| Set the profile name from settings and |
|
||||
| check the profile combobox for a match |
|
||||
\*-----------------------------------------*/
|
||||
std::string profile_name = profile["name"].get<std::string>();
|
||||
int profile_index = ui->ProfileBox->findText(QString::fromStdString(profile_name));
|
||||
|
||||
if(profile_index > -1)
|
||||
{
|
||||
ui->ProfileBox->setCurrentIndex(profile_index);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void OpenRGBDialog::AddPluginsPage()
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
@@ -1335,18 +1256,18 @@ void OpenRGBDialog::UpdateProfileList()
|
||||
ui->ProfileBox->clear();
|
||||
profileMenu->clear();
|
||||
|
||||
for(std::size_t profile_index = 0; profile_index < profile_manager->profile_list.size(); profile_index++)
|
||||
for(std::size_t profile_index = 0; profile_index < profile_manager->GetProfileList().size(); profile_index++)
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| Fill in profile combo box |
|
||||
\*---------------------------------------------*/
|
||||
ui->ProfileBox->addItem(profile_manager->profile_list[profile_index].c_str());
|
||||
ui->ProfileBox->addItem(profile_manager->GetProfileList()[profile_index].c_str());
|
||||
|
||||
/*---------------------------------------------*\
|
||||
| Fill in profile tray icon menu |
|
||||
\*---------------------------------------------*/
|
||||
QAction* actionProfileSelected = new QAction(profile_manager->profile_list[profile_index].c_str(), this);
|
||||
actionProfileSelected->setObjectName(profile_manager->profile_list[profile_index].c_str());
|
||||
QAction* actionProfileSelected = new QAction(profile_manager->GetProfileList()[profile_index].c_str(), this);
|
||||
actionProfileSelected->setObjectName(profile_manager->GetProfileList()[profile_index].c_str());
|
||||
connect(actionProfileSelected, SIGNAL(triggered()), this, SLOT(on_ProfileSelected()));
|
||||
profileMenu->addAction(actionProfileSelected);
|
||||
}
|
||||
@@ -1357,20 +1278,16 @@ void OpenRGBDialog::UpdateProfileList()
|
||||
|
||||
void OpenRGBDialog::OnSuspend()
|
||||
{
|
||||
if(SelectConfigProfile("suspend_profile"))
|
||||
if(ResourceManager::get()->GetProfileManager()->LoadAutoProfileSuspend())
|
||||
{
|
||||
plugin_manager->UnloadPlugins();
|
||||
on_ButtonLoadProfile_clicked();
|
||||
}
|
||||
}
|
||||
|
||||
void OpenRGBDialog::OnResume()
|
||||
{
|
||||
if(SelectConfigProfile("resume_profile"))
|
||||
{
|
||||
on_ButtonLoadProfile_clicked();
|
||||
}
|
||||
plugin_manager->LoadPlugins();
|
||||
ResourceManager::get()->GetProfileManager()->LoadAutoProfileResume();
|
||||
}
|
||||
|
||||
void OpenRGBDialog::on_Exit()
|
||||
@@ -1489,10 +1406,23 @@ void OpenRGBDialog::onDetectionEnded()
|
||||
{
|
||||
ShowLEDView();
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Load the on open automatic profile |
|
||||
\*-----------------------------------------------------*/
|
||||
ResourceManager::get()->GetProfileManager()->LoadAutoProfileOpen();
|
||||
}
|
||||
|
||||
void OpenRGBDialog::on_SetAllDevices(unsigned char red, unsigned char green, unsigned char blue)
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Send the about to load profile signal to plugins |
|
||||
\*-----------------------------------------------------*/
|
||||
plugin_manager->OnProfileAboutToLoad();
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Apply the color to all device pages |
|
||||
\*-----------------------------------------------------*/
|
||||
for(int device = 0; device < ui->DevicesTabBar->count(); device++)
|
||||
{
|
||||
qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device))->SetCustomMode(red, green, blue);
|
||||
@@ -1508,7 +1438,7 @@ void OpenRGBDialog::on_SaveSizeProfile()
|
||||
/*-------------------------------------------------*\
|
||||
| Save the profile |
|
||||
\*-------------------------------------------------*/
|
||||
profile_manager->SaveProfile("sizes", true);
|
||||
profile_manager->SaveSizes();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1646,13 +1576,7 @@ void OpenRGBDialog::on_ProfileSelected()
|
||||
/*-------------------------------------------------*\
|
||||
| Load the profile |
|
||||
\*-------------------------------------------------*/
|
||||
if(profile_manager->LoadProfile(profile_name))
|
||||
{
|
||||
for(int device = 0; device < ui->DevicesTabBar->count(); device++)
|
||||
{
|
||||
qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device))->UpdateDevice();
|
||||
}
|
||||
}
|
||||
profile_manager->LoadProfile(profile_name);
|
||||
|
||||
ui->ProfileBox->setCurrentIndex(ui->ProfileBox->findText(QString::fromStdString(profile_name)));
|
||||
}
|
||||
@@ -1672,13 +1596,7 @@ void OpenRGBDialog::on_ButtonLoadProfile_clicked()
|
||||
/*-------------------------------------------------*\
|
||||
| Load the profile |
|
||||
\*-------------------------------------------------*/
|
||||
if(profile_manager->LoadProfile(profile_name))
|
||||
{
|
||||
for(int device = 0; device < ui->DevicesTabBar->count(); device++)
|
||||
{
|
||||
qobject_cast<OpenRGBDevicePage *>(ui->DevicesTabBar->widget(device))->UpdateDevice();
|
||||
}
|
||||
}
|
||||
profile_manager->LoadProfile(profile_name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ OpenRGBProfileSaveDialog::OpenRGBProfileSaveDialog(QWidget *parent) :
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
|
||||
std::vector<std::string> filenames = ResourceManager::get()->GetProfileManager()->profile_list;
|
||||
std::vector<std::string> filenames = ResourceManager::get()->GetProfileManager()->GetProfileList();
|
||||
|
||||
if(filenames.empty())
|
||||
{
|
||||
|
||||
@@ -254,6 +254,23 @@ OpenRGBSettingsPage::OpenRGBSettingsPage(QWidget *parent) :
|
||||
ui->CheckboxSharedSMBusAccess->hide();
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Load server settings |
|
||||
\*-----------------------------------------------------*/
|
||||
json server_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("Server");
|
||||
|
||||
if(server_settings.contains("all_devices"))
|
||||
{
|
||||
bool all_devices = server_settings["all_devices"];
|
||||
ui->CheckboxAllDevices->setChecked(all_devices);
|
||||
}
|
||||
|
||||
if(server_settings.contains("legacy_workaround"))
|
||||
{
|
||||
bool legacy_workaround = server_settings["legacy_workaround"];
|
||||
ui->CheckboxLegacyWorkaround->setChecked(legacy_workaround);
|
||||
}
|
||||
|
||||
UpdateProfiles();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
@@ -315,53 +332,57 @@ void OpenRGBSettingsPage::changeEvent(QEvent *event)
|
||||
|
||||
void OpenRGBSettingsPage::UpdateProfiles()
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Load AutoStart settings |
|
||||
\*---------------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Load AutoStart settings |
|
||||
\*-----------------------------------------------------*/
|
||||
ProfileManager* profile_manager = ResourceManager::get()->GetProfileManager();
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Load profiles into combo box |
|
||||
\*---------------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Load profiles into combo box |
|
||||
\*-----------------------------------------------------*/
|
||||
if(profile_manager != NULL)
|
||||
{
|
||||
ui->ComboBoxAutoStartProfile->blockSignals(true);
|
||||
ui->ComboBoxSuspendProfile->blockSignals(true);
|
||||
ui->ComboBoxResumeProfile->blockSignals(true);
|
||||
ui->ComboBoxExitProfile->blockSignals(true);
|
||||
ui->ComboBoxOpenProfile->blockSignals(true);
|
||||
ui->ComboBoxResumeProfile->blockSignals(true);
|
||||
ui->ComboBoxSuspendProfile->blockSignals(true);
|
||||
|
||||
ui->ComboBoxAutoStartProfile->clear();
|
||||
ui->ComboBoxSuspendProfile->clear();
|
||||
ui->ComboBoxResumeProfile->clear();
|
||||
ui->ComboBoxExitProfile->clear();
|
||||
ui->ComboBoxOpenProfile->clear();
|
||||
ui->ComboBoxResumeProfile->clear();
|
||||
ui->ComboBoxSuspendProfile->clear();
|
||||
|
||||
for(std::size_t profile_index = 0; profile_index < profile_manager->profile_list.size(); profile_index++)
|
||||
for(std::size_t profile_index = 0; profile_index < profile_manager->GetProfileList().size(); profile_index++)
|
||||
{
|
||||
QString new_profile = QString(profile_manager->profile_list[profile_index].c_str());
|
||||
QString new_profile = QString(profile_manager->GetProfileList()[profile_index].c_str());
|
||||
|
||||
ui->ComboBoxAutoStartProfile->addItem(new_profile);
|
||||
ui->ComboBoxSuspendProfile->addItem(new_profile);
|
||||
ui->ComboBoxResumeProfile->addItem(new_profile);
|
||||
ui->ComboBoxExitProfile->addItem(new_profile);
|
||||
ui->ComboBoxOpenProfile->addItem(new_profile);
|
||||
ui->ComboBoxResumeProfile->addItem(new_profile);
|
||||
ui->ComboBoxSuspendProfile->addItem(new_profile);
|
||||
}
|
||||
|
||||
ui->ComboBoxAutoStartProfile->blockSignals(false);
|
||||
ui->ComboBoxSuspendProfile->blockSignals(false);
|
||||
ui->ComboBoxResumeProfile->blockSignals(false);
|
||||
ui->ComboBoxExitProfile->blockSignals(false);
|
||||
ui->ComboBoxOpenProfile->blockSignals(false);
|
||||
ui->ComboBoxResumeProfile->blockSignals(false);
|
||||
ui->ComboBoxSuspendProfile->blockSignals(false);
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Load user interface settings |
|
||||
\*---------------------------------------------------------*/
|
||||
/*-----------------------------------------------------*\
|
||||
| Load user interface settings |
|
||||
\*-----------------------------------------------------*/
|
||||
json autostart_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("AutoStart");
|
||||
|
||||
if(autostart_settings.contains("profile"))
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Set the profile name from settings and check the |
|
||||
| profile combobox for a match |
|
||||
\*-----------------------------------------------------*/
|
||||
/*-------------------------------------------------*\
|
||||
| Set the profile name from settings and check the |
|
||||
| profile combobox for a match |
|
||||
\*-------------------------------------------------*/
|
||||
std::string profile_name = autostart_settings["profile"].get<std::string>();
|
||||
int profile_index = ui->ComboBoxAutoStartProfile->findText(QString::fromStdString(profile_name));
|
||||
|
||||
@@ -371,112 +392,117 @@ void OpenRGBSettingsPage::UpdateProfiles()
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Load user interface settings |
|
||||
\*---------------------------------------------------------*/
|
||||
json ui_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("UserInterface");
|
||||
/*-----------------------------------------------------*\
|
||||
| Load profile manager settings |
|
||||
\*-----------------------------------------------------*/
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
|
||||
if(ui_settings.contains("autoload_profiles"))
|
||||
if(profilemanager_settings.contains("exit_profile"))
|
||||
{
|
||||
json autoload_profiles = ui_settings["autoload_profiles"];
|
||||
json profile = profilemanager_settings["exit_profile"];
|
||||
|
||||
if(autoload_profiles.contains("exit_profile"))
|
||||
if(profile.contains("enabled"))
|
||||
{
|
||||
json profile = autoload_profiles["exit_profile"];
|
||||
|
||||
if(profile.contains("enabled"))
|
||||
{
|
||||
bool is_enabled = profile["enabled"].get<bool>();
|
||||
ui->CheckboxSetOnExit->setChecked(is_enabled);
|
||||
ui->ComboBoxExitProfile->setEnabled(is_enabled);
|
||||
}
|
||||
|
||||
if(profile.contains("name"))
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Set the profile name from settings and check the |
|
||||
| profile combobox for a match |
|
||||
\*-----------------------------------------------------*/
|
||||
std::string profile_name = profile["name"].get<std::string>();
|
||||
int profile_index = ui->ComboBoxExitProfile->findText(QString::fromStdString(profile_name));
|
||||
|
||||
if(profile_index > -1)
|
||||
{
|
||||
ui->ComboBoxExitProfile->setCurrentIndex(profile_index);
|
||||
}
|
||||
}
|
||||
bool is_enabled = profile["enabled"].get<bool>();
|
||||
ui->CheckboxSetOnExit->setChecked(is_enabled);
|
||||
ui->ComboBoxExitProfile->setEnabled(is_enabled);
|
||||
}
|
||||
|
||||
if(autoload_profiles.contains("resume_profile"))
|
||||
if(profile.contains("name"))
|
||||
{
|
||||
json profile = autoload_profiles["resume_profile"];
|
||||
/*---------------------------------------------*\
|
||||
| Set the profile name from settings and check |
|
||||
| the profile combobox for a match |
|
||||
\*---------------------------------------------*/
|
||||
std::string profile_name = profile["name"].get<std::string>();
|
||||
int profile_index = ui->ComboBoxExitProfile->findText(QString::fromStdString(profile_name));
|
||||
|
||||
if(profile.contains("enabled"))
|
||||
if(profile_index > -1)
|
||||
{
|
||||
bool is_enabled = profile["enabled"].get<bool>();
|
||||
ui->CheckboxSetOnResume->setChecked(is_enabled);
|
||||
ui->ComboBoxResumeProfile->setEnabled(is_enabled);
|
||||
}
|
||||
|
||||
if(profile.contains("name"))
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Set the profile name from settings and check the |
|
||||
| profile combobox for a match |
|
||||
\*-----------------------------------------------------*/
|
||||
std::string profile_name = profile["name"].get<std::string>();
|
||||
int profile_index = ui->ComboBoxResumeProfile->findText(QString::fromStdString(profile_name));
|
||||
|
||||
if(profile_index > -1)
|
||||
{
|
||||
ui->ComboBoxResumeProfile->setCurrentIndex(profile_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(autoload_profiles.contains("suspend_profile"))
|
||||
{
|
||||
json profile = autoload_profiles["suspend_profile"];
|
||||
|
||||
if(profile.contains("enabled"))
|
||||
{
|
||||
bool is_enabled = profile["enabled"].get<bool>();
|
||||
ui->CheckboxSetOnSuspend->setChecked(is_enabled);
|
||||
ui->ComboBoxSuspendProfile->setEnabled(is_enabled);
|
||||
}
|
||||
|
||||
if(profile.contains("name"))
|
||||
{
|
||||
/*-----------------------------------------------------*\
|
||||
| Set the profile name from settings and check the |
|
||||
| profile combobox for a match |
|
||||
\*-----------------------------------------------------*/
|
||||
std::string profile_name = profile["name"].get<std::string>();
|
||||
int profile_index = ui->ComboBoxSuspendProfile->findText(QString::fromStdString(profile_name));
|
||||
|
||||
if(profile_index > -1)
|
||||
{
|
||||
ui->ComboBoxSuspendProfile->setCurrentIndex(profile_index);
|
||||
}
|
||||
ui->ComboBoxExitProfile->setCurrentIndex(profile_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Load server settings |
|
||||
\*---------------------------------------------------------*/
|
||||
json server_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("Server");
|
||||
|
||||
if(server_settings.contains("all_devices"))
|
||||
if(profilemanager_settings.contains("open_profile"))
|
||||
{
|
||||
bool all_devices = server_settings["all_devices"];
|
||||
ui->CheckboxAllDevices->setChecked(all_devices);
|
||||
json profile = profilemanager_settings["open_profile"];
|
||||
|
||||
if(profile.contains("enabled"))
|
||||
{
|
||||
bool is_enabled = profile["enabled"].get<bool>();
|
||||
ui->CheckboxSetOnOpen->setChecked(is_enabled);
|
||||
ui->ComboBoxOpenProfile->setEnabled(is_enabled);
|
||||
}
|
||||
|
||||
if(profile.contains("name"))
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| Set the profile name from settings and check |
|
||||
| the profile combobox for a match |
|
||||
\*---------------------------------------------*/
|
||||
std::string profile_name = profile["name"].get<std::string>();
|
||||
int profile_index = ui->ComboBoxOpenProfile->findText(QString::fromStdString(profile_name));
|
||||
|
||||
if(profile_index > -1)
|
||||
{
|
||||
ui->ComboBoxOpenProfile->setCurrentIndex(profile_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(server_settings.contains("legacy_workaround"))
|
||||
if(profilemanager_settings.contains("resume_profile"))
|
||||
{
|
||||
bool legacy_workaround = server_settings["legacy_workaround"];
|
||||
ui->CheckboxLegacyWorkaround->setChecked(legacy_workaround);
|
||||
json profile = profilemanager_settings["resume_profile"];
|
||||
|
||||
if(profile.contains("enabled"))
|
||||
{
|
||||
bool is_enabled = profile["enabled"].get<bool>();
|
||||
ui->CheckboxSetOnResume->setChecked(is_enabled);
|
||||
ui->ComboBoxResumeProfile->setEnabled(is_enabled);
|
||||
}
|
||||
|
||||
if(profile.contains("name"))
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| Set the profile name from settings and check |
|
||||
| the profile combobox for a match |
|
||||
\*---------------------------------------------*/
|
||||
std::string profile_name = profile["name"].get<std::string>();
|
||||
int profile_index = ui->ComboBoxResumeProfile->findText(QString::fromStdString(profile_name));
|
||||
|
||||
if(profile_index > -1)
|
||||
{
|
||||
ui->ComboBoxResumeProfile->setCurrentIndex(profile_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(profilemanager_settings.contains("suspend_profile"))
|
||||
{
|
||||
json profile = profilemanager_settings["suspend_profile"];
|
||||
|
||||
if(profile.contains("enabled"))
|
||||
{
|
||||
bool is_enabled = profile["enabled"].get<bool>();
|
||||
ui->CheckboxSetOnSuspend->setChecked(is_enabled);
|
||||
ui->ComboBoxSuspendProfile->setEnabled(is_enabled);
|
||||
}
|
||||
|
||||
if(profile.contains("name"))
|
||||
{
|
||||
/*---------------------------------------------*\
|
||||
| Set the profile name from settings and check |
|
||||
| the profile combobox for a match |
|
||||
\*---------------------------------------------*/
|
||||
std::string profile_name = profile["name"].get<std::string>();
|
||||
int profile_index = ui->ComboBoxSuspendProfile->findText(QString::fromStdString(profile_name));
|
||||
|
||||
if(profile_index > -1)
|
||||
{
|
||||
ui->ComboBoxSuspendProfile->setCurrentIndex(profile_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,10 +612,10 @@ void OpenRGBSettingsPage::on_CheckboxRunZoneChecks_clicked()
|
||||
|
||||
void OpenRGBSettingsPage::on_CheckboxSetOnExit_clicked(bool checked)
|
||||
{
|
||||
json ui_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("UserInterface");
|
||||
ui_settings["autoload_profiles"]["exit_profile"]["enabled"] = checked;
|
||||
ui_settings["autoload_profiles"]["exit_profile"]["name"] = ui->ComboBoxExitProfile->currentText().toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("UserInterface", ui_settings);
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
profilemanager_settings["exit_profile"]["enabled"] = checked;
|
||||
profilemanager_settings["exit_profile"]["name"] = ui->ComboBoxExitProfile->currentText().toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("ProfileManager", profilemanager_settings);
|
||||
SaveSettings();
|
||||
|
||||
ui->ComboBoxExitProfile->setEnabled(checked);
|
||||
@@ -597,18 +623,37 @@ void OpenRGBSettingsPage::on_CheckboxSetOnExit_clicked(bool checked)
|
||||
|
||||
void OpenRGBSettingsPage::on_ComboBoxExitProfile_currentTextChanged(const QString exit_profile_name)
|
||||
{
|
||||
json ui_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("UserInterface");
|
||||
ui_settings["autoload_profiles"]["exit_profile"]["name"] = exit_profile_name.toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("UserInterface", ui_settings);
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
profilemanager_settings["exit_profile"]["name"] = exit_profile_name.toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("ProfileManager", profilemanager_settings);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
void OpenRGBSettingsPage::on_CheckboxSetOnOpen_clicked(bool checked)
|
||||
{
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
profilemanager_settings["open_profile"]["enabled"] = checked;
|
||||
profilemanager_settings["open_profile"]["name"] = ui->ComboBoxOpenProfile->currentText().toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("ProfileManager", profilemanager_settings);
|
||||
SaveSettings();
|
||||
|
||||
ui->ComboBoxOpenProfile->setEnabled(checked);
|
||||
}
|
||||
|
||||
void OpenRGBSettingsPage::on_ComboBoxOpenProfile_currentTextChanged(const QString open_profile_name)
|
||||
{
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
profilemanager_settings["open_profile"]["name"] = open_profile_name.toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("ProfileManager", profilemanager_settings);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
void OpenRGBSettingsPage::on_CheckboxSetOnResume_clicked(bool checked)
|
||||
{
|
||||
json ui_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("UserInterface");
|
||||
ui_settings["autoload_profiles"]["resume_profile"]["enabled"] = checked;
|
||||
ui_settings["autoload_profiles"]["resume_profile"]["name"] = ui->ComboBoxResumeProfile->currentText().toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("UserInterface", ui_settings);
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
profilemanager_settings["resume_profile"]["enabled"] = checked;
|
||||
profilemanager_settings["resume_profile"]["name"] = ui->ComboBoxResumeProfile->currentText().toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("ProfileManager", profilemanager_settings);
|
||||
SaveSettings();
|
||||
|
||||
ui->ComboBoxResumeProfile->setEnabled(checked);
|
||||
@@ -616,18 +661,18 @@ void OpenRGBSettingsPage::on_CheckboxSetOnResume_clicked(bool checked)
|
||||
|
||||
void OpenRGBSettingsPage::on_ComboBoxResumeProfile_currentTextChanged(const QString resume_profile_name)
|
||||
{
|
||||
json ui_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("UserInterface");
|
||||
ui_settings["autoload_profiles"]["resume_profile"]["name"] = resume_profile_name.toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("UserInterface", ui_settings);
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
profilemanager_settings["resume_profile"]["name"] = resume_profile_name.toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("ProfileManager", profilemanager_settings);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
void OpenRGBSettingsPage::on_CheckboxSetOnSuspend_clicked(bool checked)
|
||||
{
|
||||
json ui_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("UserInterface");
|
||||
ui_settings["autoload_profiles"]["suspend_profile"]["enabled"] = checked;
|
||||
ui_settings["autoload_profiles"]["suspend_profile"]["name"] = ui->ComboBoxSuspendProfile->currentText().toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("UserInterface", ui_settings);
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
profilemanager_settings["suspend_profile"]["enabled"] = checked;
|
||||
profilemanager_settings["suspend_profile"]["name"] = ui->ComboBoxSuspendProfile->currentText().toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("ProfileManager", profilemanager_settings);
|
||||
SaveSettings();
|
||||
|
||||
ui->ComboBoxSuspendProfile->setEnabled(checked);
|
||||
@@ -635,9 +680,9 @@ void OpenRGBSettingsPage::on_CheckboxSetOnSuspend_clicked(bool checked)
|
||||
|
||||
void OpenRGBSettingsPage::on_ComboBoxSuspendProfile_currentTextChanged(const QString suspend_profile_name)
|
||||
{
|
||||
json ui_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("UserInterface");
|
||||
ui_settings["autoload_profiles"]["suspend_profile"]["name"] = suspend_profile_name.toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("UserInterface", ui_settings);
|
||||
json profilemanager_settings = ResourceManager::get()->GetSettingsManager()->GetSettings("ProfileManager");
|
||||
profilemanager_settings["suspend_profile"]["name"] = suspend_profile_name.toStdString();
|
||||
ResourceManager::get()->GetSettingsManager()->SetSettings("ProfileManager", profilemanager_settings);
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,8 @@ private slots:
|
||||
|
||||
void on_CheckboxSetOnExit_clicked(bool checked);
|
||||
void on_ComboBoxExitProfile_currentTextChanged(const QString exit_profile_name);
|
||||
void on_CheckboxSetOnOpen_clicked(bool checked);
|
||||
void on_ComboBoxOpenProfile_currentTextChanged(const QString open_profile_name);
|
||||
void on_CheckboxSetOnResume_clicked(bool checked);
|
||||
void on_ComboBoxResumeProfile_currentTextChanged(const QString resume_profile_name);
|
||||
void on_CheckboxSetOnSuspend_clicked(bool checked);
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>475</width>
|
||||
<height>500</height>
|
||||
<width>500</width>
|
||||
<height>475</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -30,129 +30,29 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-328</y>
|
||||
<y>-211</y>
|
||||
<width>508</width>
|
||||
<height>1105</height>
|
||||
<height>1161</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="15" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLogConsole">
|
||||
<item row="27" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnResume">
|
||||
<property name="text">
|
||||
<string>Enable Log Console (restart required)</string>
|
||||
<string>Set Profile on Resume</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="36" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartProfile">
|
||||
<property name="text">
|
||||
<string>Load Profile</string>
|
||||
<item row="40" column="1">
|
||||
<widget class="QSpinBox" name="TextServerPort">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxDisableKeyExpansion">
|
||||
<property name="text">
|
||||
<string>Disable Key Expansion in Device View</string>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="21" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSharedSMBusAccess">
|
||||
<property name="text">
|
||||
<string>Shared SMBus Access (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxLanguage"/>
|
||||
</item>
|
||||
<item row="40" column="0">
|
||||
<widget class="QLabel" name="AutoStartStatusLabel">
|
||||
<property name="text">
|
||||
<string>Start at Login Status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLoadGeometry">
|
||||
<property name="text">
|
||||
<string>Load Window Geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="HexFormatLabel">
|
||||
<property name="text">
|
||||
<string>Hex Format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxShowLEDView">
|
||||
<property name="text">
|
||||
<string>Show LED View by Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="24" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLegacyWorkaround">
|
||||
<property name="text">
|
||||
<string>Legacy Workaround</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="38" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxResumeProfile"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="ThemeLabel">
|
||||
<property name="text">
|
||||
<string>Theme (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxHexFormat"/>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<widget class="QLabel" name="DetectionSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Detection Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="23" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAllDevices">
|
||||
<property name="text">
|
||||
<string>Serve All Devices (Including those from client connections)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="32" column="1">
|
||||
<widget class="QLineEdit" name="TextServerHost"/>
|
||||
</item>
|
||||
<item row="20" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAMDSMBusReduceCPU">
|
||||
<property name="text">
|
||||
<string>AMD SMBus: Reduce CPU Usage (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="37" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxSuspendProfile"/>
|
||||
</item>
|
||||
<item row="25" column="0">
|
||||
<widget class="QLabel" name="AutoStartLabel">
|
||||
<property name="text">
|
||||
<string>Start at Login Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="32" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartSetServerHost">
|
||||
<property name="text">
|
||||
<string>Set Server Host</string>
|
||||
<property name="value">
|
||||
<number>6742</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -163,29 +63,13 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxTheme"/>
|
||||
</item>
|
||||
<item row="30" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartMinimized">
|
||||
<item row="40" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartSetServerPort">
|
||||
<property name="text">
|
||||
<string>Start Minimized</string>
|
||||
<string>Set Server Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="36" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxAutoStartProfile"/>
|
||||
</item>
|
||||
<item row="26" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStart">
|
||||
<property name="text">
|
||||
<string>Start at Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="39" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxExitProfile"/>
|
||||
</item>
|
||||
<item row="17" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxHIDSafeMode">
|
||||
<property name="text">
|
||||
@@ -193,10 +77,116 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="34" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartClient">
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxLanguage"/>
|
||||
</item>
|
||||
<item row="39" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartSetServerHost">
|
||||
<property name="text">
|
||||
<string>Start Client</string>
|
||||
<string>Set Server Host</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="16" column="0">
|
||||
<widget class="QLabel" name="DetectionSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Detection Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="22" column="0">
|
||||
<widget class="QLabel" name="ProfileSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Profile Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="47" column="0">
|
||||
<widget class="QLabel" name="AutoStartStatusLabel">
|
||||
<property name="text">
|
||||
<string>Start at Login Status</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxRunZoneChecks">
|
||||
<property name="text">
|
||||
<string>Run Zone Checks on Rescan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="30" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAllDevices">
|
||||
<property name="text">
|
||||
<string>Serve All Devices (Including those from client connections)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="23" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnExit">
|
||||
<property name="text">
|
||||
<string>Set Profile on Exit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="27" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxResumeProfile"/>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSaveGeometry">
|
||||
<property name="text">
|
||||
<string>Save Geometry on Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="23" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxExitProfile"/>
|
||||
</item>
|
||||
<item row="21" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSharedSMBusAccess">
|
||||
<property name="text">
|
||||
<string>Shared SMBus Access (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="19" column="0">
|
||||
<widget class="QLabel" name="DriversSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Drivers Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="24" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxOpenProfile"/>
|
||||
</item>
|
||||
<item row="20" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAMDSMBusReduceCPU">
|
||||
<property name="text">
|
||||
<string>AMD SMBus: Reduce CPU Usage (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxShowLEDView">
|
||||
<property name="text">
|
||||
<string>Show LED View by Default</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxTheme"/>
|
||||
</item>
|
||||
<item row="31" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLegacyWorkaround">
|
||||
<property name="text">
|
||||
<string>Legacy Workaround</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="32" column="0">
|
||||
<widget class="QLabel" name="AutoStartLabel">
|
||||
<property name="text">
|
||||
<string>Start at Login Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -207,7 +197,103 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="41" column="0">
|
||||
<item row="29" column="0">
|
||||
<widget class="QLabel" name="ServerSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Server Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="26" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxSuspendProfile"/>
|
||||
</item>
|
||||
<item row="38" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartServer">
|
||||
<property name="text">
|
||||
<string>Start Server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="26" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnSuspend">
|
||||
<property name="text">
|
||||
<string>Set Profile on Suspend</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="43" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxAutoStartProfile"/>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLogFile">
|
||||
<property name="text">
|
||||
<string>Enable Log File (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="0">
|
||||
<widget class="QLabel" name="HexFormatLabel">
|
||||
<property name="text">
|
||||
<string>Hex Format</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="LabelLanguage">
|
||||
<property name="text">
|
||||
<string>Language</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="12" column="1">
|
||||
<widget class="QComboBox" name="ComboBoxHexFormat"/>
|
||||
</item>
|
||||
<item row="42" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartCustom">
|
||||
<property name="text">
|
||||
<string>Custom Arguments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLoadGeometry">
|
||||
<property name="text">
|
||||
<string>Load Window Geometry</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="37" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartMinimized">
|
||||
<property name="text">
|
||||
<string>Start Minimized</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxDisableKeyExpansion">
|
||||
<property name="text">
|
||||
<string>Disable Key Expansion in Device View</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="33" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStart">
|
||||
<property name="text">
|
||||
<string>Start at Login</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="41" column="1">
|
||||
<widget class="QLineEdit" name="TextClientHost"/>
|
||||
</item>
|
||||
<item row="43" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartProfile">
|
||||
<property name="text">
|
||||
<string>Load Profile</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="48" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
@@ -223,9 +309,6 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="35" column="1">
|
||||
<widget class="QLineEdit" name="TextCustomArgs"/>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxMinimizeOnClose">
|
||||
<property name="text">
|
||||
@@ -233,48 +316,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="22" column="0">
|
||||
<widget class="QLabel" name="ServerSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Server Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSaveGeometry">
|
||||
<property name="text">
|
||||
<string>Save Geometry on Close</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="31" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartServer">
|
||||
<property name="text">
|
||||
<string>Start Server</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="33" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartSetServerPort">
|
||||
<property name="text">
|
||||
<string>Set Server Port</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="37" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnSuspend">
|
||||
<property name="text">
|
||||
<string>Set Profile on Suspend</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxRunZoneChecks">
|
||||
<property name="text">
|
||||
<string>Run Zone Checks on Rescan</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="13" column="0">
|
||||
<widget class="QLabel" name="LogManagerSettingsLabel">
|
||||
<property name="text">
|
||||
@@ -282,61 +323,37 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="14" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLogFile">
|
||||
<item row="39" column="1">
|
||||
<widget class="QLineEdit" name="TextServerHost"/>
|
||||
</item>
|
||||
<item row="15" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxLogConsole">
|
||||
<property name="text">
|
||||
<string>Enable Log File (restart required)</string>
|
||||
<string>Enable Log Console (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="33" column="1">
|
||||
<widget class="QSpinBox" name="TextServerPort">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65535</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>6742</number>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="ThemeLabel">
|
||||
<property name="text">
|
||||
<string>Theme (restart required)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="38" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnResume">
|
||||
<item row="42" column="1">
|
||||
<widget class="QLineEdit" name="TextCustomArgs"/>
|
||||
</item>
|
||||
<item row="24" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnOpen">
|
||||
<property name="text">
|
||||
<string>Set Profile on Resume</string>
|
||||
<string>Set Profile on Open</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="LabelLanguage">
|
||||
<item row="41" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartClient">
|
||||
<property name="text">
|
||||
<string>Language</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="19" column="0">
|
||||
<widget class="QLabel" name="DriversSettingsLabel">
|
||||
<property name="text">
|
||||
<string>Drivers Settings:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="35" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxAutoStartCustom">
|
||||
<property name="text">
|
||||
<string>Custom Arguments</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="34" column="1">
|
||||
<widget class="QLineEdit" name="TextClientHost"/>
|
||||
</item>
|
||||
<item row="39" column="0">
|
||||
<widget class="QCheckBox" name="CheckboxSetOnExit">
|
||||
<property name="text">
|
||||
<string>Set Profile on Exit</string>
|
||||
<string>Start Client</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -196,7 +196,7 @@ void OpenRGBZonesBulkResizer::on_save_button_clicked()
|
||||
/*-----------------------------------------------------*\
|
||||
| Save the profile |
|
||||
\*-----------------------------------------------------*/
|
||||
profile_manager->SaveProfile("sizes", true);
|
||||
profile_manager->SaveSizes();
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
|
||||
Reference in New Issue
Block a user