2 #include "block/block.hpp"
4 #include "pool/pool.hpp"
5 #include "pool/symbol.hpp"
6 #include "schematic/schematic.hpp"
7 #include "document/idocument_schematic.hpp"
14 CoreSchematic(
const std::string &schematic_filename,
const std::string &block_filename,
15 const std::string &pictures_dir,
Pool &pool);
16 bool has_object_type(ObjectType ty)
const override;
19 Line *get_line(
const UUID &uu)
override;
20 Arc *get_arc(
const UUID &uu)
override;
23 Sheet *get_sheet()
override;
24 const Sheet *get_sheet()
const;
25 Text *get_text(
const UUID &uu)
override;
28 void delete_junction(
const UUID &uu)
override;
29 Line *insert_line(
const UUID &uu)
override;
30 void delete_line(
const UUID &uu)
override;
31 Arc *insert_arc(
const UUID &uu)
override;
32 void delete_arc(
const UUID &uu)
override;
34 void delete_schematic_symbol(
const UUID &uu)
override;
37 void delete_line_net(
const UUID &uu)
override;
39 Text *insert_text(
const UUID &uu)
override;
40 void delete_text(
const UUID &uu)
override;
42 class Picture *insert_picture(
const UUID &uu)
override;
43 class Picture *get_picture(
const UUID &uu)
override;
44 void delete_picture(
const UUID &uu)
override;
46 std::vector<Line *> get_lines()
override;
47 std::vector<Arc *> get_arcs()
override;
48 std::vector<LineNet *> get_net_lines()
override;
49 std::vector<NetLabel *> get_net_labels()
override;
51 class Block *get_block()
override;
54 bool set_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
56 bool get_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
58 bool get_property_meta(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
61 std::string get_display_name(ObjectType type,
const UUID &uu)
override;
62 std::string get_display_name(ObjectType type,
const UUID &uu,
const UUID &sheet)
override;
64 class Rules *get_rules()
override;
68 return &bom_export_settings;
73 return &pdf_export_settings;
76 void rebuild(
bool from_undo =
false)
override;
79 void delete_sheet(
const UUID &uu);
81 void set_sheet(
const UUID &uu);
82 const Sheet *get_canvas_data();
83 std::pair<Coordi, Coordi> get_bbox()
override;
85 const std::string &get_filename()
const override;
87 bool get_project_meta_loaded_from_block()
const
89 return project_meta_loaded_from_block;
92 ObjectType get_object_type()
const override
94 return ObjectType::SCHEMATIC;
99 const bool project_meta_loaded_from_block;
108 std::string m_schematic_filename;
109 std::string m_block_filename;
110 std::string m_pictures_dir;
114 HistoryItem(
const Block &b,
const Schematic &s) : block(b), sch(s)
120 void history_push()
override;
121 void history_load(
unsigned int i)
override;
122 void save(
const std::string &suffix)
override;
123 void delete_autosave()
override;