代码拉取完成,页面将自动刷新
/*---------------------------------------------------------*\
| ProfileManager.h |
| |
| OpenRGB profile manager |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-only |
\*---------------------------------------------------------*/
#pragma once
#include "RGBController.h"
#include "filesystem.h"
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;
std::vector<std::string> profile_list;
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 std::vector<RGBController*> LoadProfileToList
(
std::string profile_name,
bool sizes = false
) = 0;
virtual void SetConfigurationDirectory(const filesystem::path& directory) = 0;
protected:
virtual ~ProfileManagerInterface() {};
};
class ProfileManager: public ProfileManagerInterface
{
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();
std::vector<std::string> profile_list;
bool LoadDeviceFromListWithOptions
(
std::vector<RGBController*>& temp_controllers,
std::vector<bool>& temp_controller_used,
RGBController* load_controller,
bool load_size,
bool load_settings
);
std::vector<RGBController*> LoadProfileToList
(
std::string profile_name,
bool sizes = false
);
void SetConfigurationDirectory(const filesystem::path& directory);
private:
filesystem::path configuration_directory;
void UpdateProfileList();
bool LoadProfileWithOptions
(
std::string profile_name,
bool load_size,
bool load_settings
);
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。