Horizon
Loading...
Searching...
No Matches
tool_helper_map_symbol.hpp
1#pragma once
2#include "core/tool.hpp"
3
4namespace horizon {
5class ToolHelperMapSymbol : public virtual ToolBase {
6public:
7 using ToolBase::ToolBase;
8
9 class Settings : public ToolSettings {
10 public:
11 json serialize() const override;
12 void load_from_json(const json &j) override;
13 std::map<UUID, UUID> selected_symbols;
14 };
15
16 std::map<ToolID, ToolSettings *> get_all_settings() override;
17
18protected:
19 class SchematicSymbol *map_symbol(class Component *c, const class Gate *g, const UUID &sym_default = UUID());
20 std::shared_ptr<const class Symbol> get_symbol_for_unit(const UUID &unit_uu, bool *auto_selected = nullptr,
21 const UUID &sym_default = UUID());
22 void change_symbol(class SchematicSymbol *schsym);
23
24private:
25 Settings settings;
26};
27} // namespace horizon
A Component is an instanced Entity in a Block.
Definition component.hpp:40
Definition gate.hpp:9
Definition schematic_symbol.hpp:15
Common interface for all Tools.
Definition tool_pub.hpp:94
Definition tool_helper_map_symbol.hpp:9
Definition tool_helper_map_symbol.hpp:5
Definition tool_pub.hpp:82
This class encapsulates a UUID and allows it to be uses as a value type.
Definition uuid.hpp:16
a class to store JSON values
Definition json.hpp:177