13 PartEditor(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
const std::string &filename,
16 void reload()
override;
18 void save_as(
const std::string &fn)
override;
19 std::string get_name()
const override;
20 const UUID &get_uuid()
const override;
23 unsigned int get_required_version()
const override;
24 ObjectType get_type()
const override;
38 std::map<Part::Attribute, class EntryWithInheritance *> attr_editors;
41 Gtk::Label *w_entity_label =
nullptr;
42 Gtk::Label *w_package_label =
nullptr;
43 Gtk::Label *w_base_label =
nullptr;
44 Gtk::Button *w_change_package_button =
nullptr;
45 Gtk::MenuItem *w_set_base_menu_item =
nullptr;
46 Gtk::MenuItem *w_clear_base_menu_item =
nullptr;
47 Gtk::MenuItem *w_create_base_menu_item =
nullptr;
49 Gtk::ToggleButton *w_model_inherit =
nullptr;
52 Gtk::Entry *w_tags_inherited =
nullptr;
53 Gtk::ToggleButton *w_tags_inherit =
nullptr;
55 Gtk::TreeView *w_tv_pins =
nullptr;
56 Gtk::TreeView *w_tv_pads =
nullptr;
57 Gtk::Button *w_button_map =
nullptr;
58 Gtk::Button *w_button_unmap =
nullptr;
59 Gtk::Button *w_button_automap =
nullptr;
60 Gtk::Button *w_button_select_pin =
nullptr;
61 Gtk::Button *w_button_select_pads =
nullptr;
62 Gtk::Button *w_button_copy_from_other =
nullptr;
63 Gtk::Label *w_pin_stat =
nullptr;
64 Gtk::Label *w_pad_stat =
nullptr;
66 Gtk::ComboBoxText *w_parametric_table_combo =
nullptr;
67 Gtk::Box *w_parametric_box =
nullptr;
69 Gtk::Label *w_orderable_MPNs_label =
nullptr;
70 Gtk::Button *w_orderable_MPNs_add_button =
nullptr;
71 Gtk::Box *w_orderable_MPNs_box =
nullptr;
73 Gtk::Label *w_flags_label =
nullptr;
74 Gtk::Grid *w_flags_grid =
nullptr;
76 Gtk::RadioButton *w_override_prefix_inherit_button =
nullptr;
77 Gtk::RadioButton *w_override_prefix_no_button =
nullptr;
78 Gtk::RadioButton *w_override_prefix_yes_button =
nullptr;
79 Gtk::Entry *w_override_prefix_entry =
nullptr;
80 sigc::connection override_prefix_entry_connection;
82 class PinListColumns :
public Gtk::TreeModelColumnRecord {
86 Gtk::TreeModelColumnRecord::add(gate_name);
87 Gtk::TreeModelColumnRecord::add(gate_uuid);
88 Gtk::TreeModelColumnRecord::add(pin_name);
89 Gtk::TreeModelColumnRecord::add(pin_uuid);
90 Gtk::TreeModelColumnRecord::add(mapped);
92 Gtk::TreeModelColumn<Glib::ustring> gate_name;
93 Gtk::TreeModelColumn<Glib::ustring> pin_name;
94 Gtk::TreeModelColumn<horizon::UUID> gate_uuid;
95 Gtk::TreeModelColumn<horizon::UUID> pin_uuid;
96 Gtk::TreeModelColumn<bool> mapped;
98 PinListColumns pin_list_columns;
100 Glib::RefPtr<Gtk::ListStore> pin_store;
102 class PadListColumns :
public Gtk::TreeModelColumnRecord {
106 Gtk::TreeModelColumnRecord::add(pad_name);
107 Gtk::TreeModelColumnRecord::add(pad_uuid);
108 Gtk::TreeModelColumnRecord::add(gate_name);
109 Gtk::TreeModelColumnRecord::add(gate_uuid);
110 Gtk::TreeModelColumnRecord::add(pin_name);
111 Gtk::TreeModelColumnRecord::add(pin_uuid);
113 Gtk::TreeModelColumn<Glib::ustring> pad_name;
114 Gtk::TreeModelColumn<horizon::UUID> pad_uuid;
115 Gtk::TreeModelColumn<Glib::ustring> gate_name;
116 Gtk::TreeModelColumn<Glib::ustring> pin_name;
117 Gtk::TreeModelColumn<horizon::UUID> gate_uuid;
118 Gtk::TreeModelColumn<horizon::UUID> pin_uuid;
120 PadListColumns pad_list_columns;
122 Glib::RefPtr<Gtk::ListStore> pad_store;
123 void update_pad_map();
125 void update_orderable_MPNs_label();
126 void update_treeview();
127 void update_mapped();
128 void update_entries();
129 void change_package();
130 void set_package(std::shared_ptr<const Package> pkg);
131 void set_base(std::shared_ptr<const Part> part);
132 bool check_base(
const UUID &new_base_uuid);
136 void populate_models();
137 void update_model_inherit();
138 void map_pin(Gtk::TreeModel::iterator it_pin);
139 void copy_from_other_part();
140 void update_map_buttons();
141 void update_flags_label();
142 void update_prefix_entry();
144 std::map<Part::OverridePrefix, Gtk::RadioButton *> override_prefix_radio_buttons;
146 std::map<Part::Flag, class FlagEditor *> flag_editors;
148 void update_parametric_editor();
149 std::map<std::string, std::map<std::string, std::string>> parametric_data;
150 Glib::RefPtr<Gtk::SizeGroup> sg_parametric_label;
154 UUID pending_base_part;
156 std::unique_ptr<HistoryManager::HistoryItem> make_history_item(
const std::string &comment)
override;
Definition tag_entry.hpp:9