mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-09 04:29:04 +03:00
chore: structured src/gui, run clang-format
This commit is contained in:
31
src/gui/controllers/template_controller.hpp
Normal file
31
src/gui/controllers/template_controller.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef CLRSYNC_GUI_TEMPLATE_CONTROLLER_HPP
|
||||
#define CLRSYNC_GUI_TEMPLATE_CONTROLLER_HPP
|
||||
|
||||
#include "core/io/toml_file.hpp"
|
||||
#include "core/theme/template_manager.hpp"
|
||||
#include "core/theme/theme_template.hpp"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
class template_controller
|
||||
{
|
||||
public:
|
||||
template_controller();
|
||||
[[nodiscard]] const std::unordered_map<std::string, clrsync::core::theme_template> &templates()
|
||||
const
|
||||
{
|
||||
return m_templates;
|
||||
}
|
||||
void set_template_enabled(const std::string &key, bool enabled);
|
||||
void set_template_input_path(const std::string &key, const std::string &path);
|
||||
void set_template_output_path(const std::string &key, const std::string &path);
|
||||
void set_template_reload_command(const std::string &key, const std::string &cmd);
|
||||
bool remove_template(const std::string &key);
|
||||
void refresh();
|
||||
|
||||
private:
|
||||
clrsync::core::template_manager<clrsync::core::io::toml_file> m_template_manager;
|
||||
std::unordered_map<std::string, clrsync::core::theme_template> m_templates;
|
||||
};
|
||||
|
||||
#endif // CLRSYNC_GUI_TEMPLATE_CONTROLLER_HPP
|
||||
Reference in New Issue
Block a user