2 #include "block/block.hpp"
4 #include "pool/pool.hpp"
5 #include "pool/symbol.hpp"
6 #include "schematic/schematic.hpp"
13 CoreSchematic(
const std::string &schematic_filename,
const std::string &block_filename,
Pool &pool);
14 bool has_object_type(ObjectType ty)
const override;
16 Junction *get_junction(
const UUID &uu,
bool work =
true)
override;
17 Line *get_line(
const UUID &uu,
bool work =
true)
override;
18 Arc *get_arc(
const UUID &uu,
bool work =
true)
override;
20 Schematic *get_schematic(
bool work =
true);
21 Sheet *get_sheet(
bool work =
true);
22 Text *get_text(
const UUID &uu,
bool work =
true)
override;
24 Junction *insert_junction(
const UUID &uu,
bool work =
true)
override;
25 void delete_junction(
const UUID &uu,
bool work =
true)
override;
26 Line *insert_line(
const UUID &uu,
bool work =
true)
override;
27 void delete_line(
const UUID &uu,
bool work =
true)
override;
28 Arc *insert_arc(
const UUID &uu,
bool work =
true)
override;
29 void delete_arc(
const UUID &uu,
bool work =
true)
override;
31 void delete_schematic_symbol(
const UUID &uu,
bool work =
true);
33 LineNet *insert_line_net(
const UUID &uu,
bool work =
true);
34 void delete_line_net(
const UUID &uu,
bool work =
true);
36 Text *insert_text(
const UUID &uu,
bool work =
true)
override;
37 void delete_text(
const UUID &uu,
bool work =
true)
override;
39 std::vector<Line *> get_lines(
bool work =
true)
override;
40 std::vector<Arc *> get_arcs(
bool work =
true)
override;
41 std::vector<LineNet *> get_net_lines(
bool work =
true);
42 std::vector<NetLabel *> get_net_labels(
bool work =
true);
44 class Block *get_block(
bool work =
true)
override;
47 bool set_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
49 bool get_property(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
51 bool get_property_meta(ObjectType type,
const UUID &uu, ObjectProperty::ID property,
54 std::string get_display_name(ObjectType type,
const UUID &uu)
override;
55 std::string get_display_name(ObjectType type,
const UUID &uu,
const UUID &sheet)
override;
57 class Rules *get_rules()
override;
61 return &bom_export_settings;
66 return &pdf_export_settings;
69 void rebuild(
bool from_undo =
false)
override;
70 void commit()
override;
71 void revert()
override;
74 void delete_sheet(
const UUID &uu);
76 void set_sheet(
const UUID &uu);
77 const Sheet *get_canvas_data();
78 std::pair<Coordi, Coordi> get_bbox()
override;
80 bool can_search_for_object_type(ObjectType type)
const override;
81 std::list<SearchResult> search(
const SearchQuery &q)
override;
83 const std::string &get_filename()
const override;
96 std::string m_schematic_filename;
97 std::string m_block_filename;
101 HistoryItem(
const Block &b,
const Schematic &s) : block(b), sch(s)
107 void history_push()
override;
108 void history_load(
unsigned int i)
override;
109 void save(
const std::string &suffix)
override;
110 void delete_autosave()
override;