2 #include "block/block.hpp"
4 #include "schematic/schematic.hpp"
5 #include "document/idocument_schematic.hpp"
11 CoreSchematic(
const std::string &schematic_filename,
const std::string &block_filename,
12 const std::string &pictures_dir,
IPool &pool);
13 bool has_object_type(ObjectType ty)
const override;
16 Line *get_line(
const UUID &uu)
override;
17 Arc *get_arc(
const UUID &uu)
override;
20 Sheet *get_sheet()
override;
21 const Sheet *get_sheet()
const;
22 Text *get_text(
const UUID &uu)
override;
25 void delete_junction(
const UUID &uu)
override;
26 Line *insert_line(
const UUID &uu)
override;
27 void delete_line(
const UUID &uu)
override;
28 Arc *insert_arc(
const UUID &uu)
override;
29 void delete_arc(
const UUID &uu)
override;
31 void delete_schematic_symbol(
const UUID &uu)
override;
34 void delete_line_net(
const UUID &uu)
override;
36 Text *insert_text(
const UUID &uu)
override;
37 void delete_text(
const UUID &uu)
override;
39 class Picture *insert_picture(
const UUID &uu)
override;
40 class Picture *get_picture(
const UUID &uu)
override;
41 void delete_picture(
const UUID &uu)
override;
43 std::vector<Line *> get_lines()
override;
44 std::vector<Arc *> get_arcs()
override;
45 std::vector<LineNet *> get_net_lines()
override;
46 std::vector<NetLabel *> get_net_labels()
override;
48 class Block *get_block()
override;
51 bool set_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
53 bool get_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
55 bool get_property_meta(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
58 std::string get_display_name(ObjectType type,
const UUID &uu)
override;
59 std::string get_display_name(ObjectType type,
const UUID &uu,
const UUID &sheet)
override;
61 class Rules *get_rules()
override;
65 return &bom_export_settings;
70 return &pdf_export_settings;
73 void rebuild(
bool from_undo =
false)
override;
76 void delete_sheet(
const UUID &uu);
78 void set_sheet(
const UUID &uu);
79 const Sheet *get_canvas_data();
80 std::pair<Coordi, Coordi> get_bbox()
override;
82 const std::string &get_filename()
const override;
84 bool get_project_meta_loaded_from_block()
const
86 return project_meta_loaded_from_block;
89 ObjectType get_object_type()
const override
91 return ObjectType::SCHEMATIC;
101 const bool project_meta_loaded_from_block;
110 std::string m_schematic_filename;
111 std::string m_block_filename;
112 std::string m_pictures_dir;
116 HistoryItem(
const Block &b,
const Schematic &s) : block(b), sch(s)
122 void history_push()
override;
123 void history_load(
unsigned int i)
override;
124 void save(
const std::string &suffix)
override;
125 void delete_autosave()
override;