21 PartWizard(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
const UUID &pkg_uuid,
23 static PartWizard *create(
const UUID &pkg_uuid,
const std::string &pool_base_path,
class Pool &po,
25 std::vector<std::string> get_files_saved()
const;
31 std::shared_ptr<const class Package> pkg;
32 void set_pkg(std::shared_ptr<const Package> p);
33 std::string pool_base_path;
36 Gtk::HeaderBar *header =
nullptr;
37 Gtk::Button *button_back =
nullptr;
38 Gtk::Button *button_next =
nullptr;
39 Gtk::Button *button_finish =
nullptr;
40 Gtk::Button *button_select =
nullptr;
41 Gtk::Stack *stack =
nullptr;
44 Gtk::Allocation canvas_alloc;
46 Gtk::ListBox *pads_lb =
nullptr;
47 Gtk::ToolButton *button_link_pads =
nullptr;
48 Gtk::ToolButton *button_unlink_pads =
nullptr;
49 Gtk::ToolButton *button_import_pads =
nullptr;
51 Glib::RefPtr<Gtk::SizeGroup> sg_pad;
52 Glib::RefPtr<Gtk::SizeGroup> sg_pin_name;
53 Glib::RefPtr<Gtk::SizeGroup> sg_direction;
54 Glib::RefPtr<Gtk::SizeGroup> sg_alt_names;
55 Glib::RefPtr<Gtk::SizeGroup> sg_gate;
57 Gtk::Box *page_assign =
nullptr;
58 Gtk::Box *page_edit =
nullptr;
59 Gtk::Box *edit_left_box =
nullptr;
61 Gtk::Entry *entity_name_entry =
nullptr;
62 Gtk::Button *entity_name_from_mpn_button =
nullptr;
63 Gtk::Entry *entity_prefix_entry =
nullptr;
64 class TagEntry *entity_tags_entry =
nullptr;
66 Gtk::Entry *part_mpn_entry =
nullptr;
67 Gtk::Entry *part_value_entry =
nullptr;
68 Gtk::Entry *part_manufacturer_entry =
nullptr;
69 Gtk::Entry *part_datasheet_entry =
nullptr;
70 Gtk::Entry *part_description_entry =
nullptr;
71 class TagEntry *part_tags_entry =
nullptr;
72 Gtk::Button *part_autofill_button =
nullptr;
77 Gtk::Grid *steps_grid =
nullptr;
80 std::shared_ptr<Entity> entity;
82 class ListColumns :
public Gtk::TreeModelColumnRecord {
86 Gtk::TreeModelColumnRecord::add(name);
88 Gtk::TreeModelColumn<Glib::ustring> name;
90 ListColumns list_columns;
92 Glib::RefPtr<Gtk::ListStore> gate_name_store;
93 void update_gate_names();
94 void update_pin_warnings();
95 std::map<std::pair<std::string, std::string>, std::set<class PadEditor *>> get_pin_names();
101 class PadImportItem {
104 std::string gate =
"Main";
107 Pin::Direction direction = Pin::Direction::INPUT;
109 std::vector<AltName> alt;
110 Pin::Direction direction = Pin::Direction::INPUT;
112 void import_pads(
const json &j);
114 void import_pads(
const std::map<std::string, PadImportItem> &items);
116 void create_pad_editors();
117 void autolink_pads();
118 void link_pads(
const std::deque<class PadEditor *> &eds);
121 enum class Mode { PACKAGE, ASSIGN, EDIT };
125 void handle_finish();
126 void handle_select();
129 std::string get_rel_part_filename();
130 void update_can_finish();
134 bool mpn_valid =
false;
135 bool part_filename_valid =
false;
136 bool gates_valid =
false;
137 std::vector<std::string> get_filenames();
138 std::vector<std::string> files_saved;
140 Mode mode = Mode::ASSIGN;
141 void set_mode(Mode mo);
143 std::map<std::string, std::shared_ptr<Unit>> units;
144 std::map<UUID, UUID> symbols;
145 std::map<UUID, unsigned int> symbol_pins_mapped;
146 void update_symbol_pins_mapped();
148 std::map<std::string, class PoolProjectManagerProcess *> processes;
149 std::set<UUID> symbols_open;
153 class LocationEntry *pack_location_entry(
const Glib::RefPtr<Gtk::Builder> &x,
const std::string &w,
154 Gtk::Button **button_other =
nullptr);
Definition location_entry.hpp:6
Definition tag_entry.hpp:9