Horizon
tool_helper_map_symbol.hpp
1 #pragma once
2 #include "core/tool.hpp"
3 
4 namespace horizon {
5 class ToolHelperMapSymbol : public virtual ToolBase {
6 public:
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 
18 protected:
19  class SchematicSymbol *map_symbol(class Component *c, const class Gate *g, const UUID &sym_default = UUID());
20  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 
24 private:
25  Settings settings;
26 };
27 } // namespace horizon
A Component is an instanced Entity in a Block.
Definition: component.hpp:41
Definition: gate.hpp:10
Definition: schematic_symbol.hpp:17
Definition: symbol.hpp:72
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