2 #include "canvas/appearance.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include <sigc++/sigc++.h>
6 #include "imp/action_catalog.hpp"
13 enum class InToolActionID;
18 void load_from_json(
const json &j);
19 void load_colors_from_json(
const json &j);
20 json serialize()
const;
21 json serialize_colors()
const;
26 bool show_all_junctions =
false;
27 bool drag_start_net_line =
true;
28 bool bend_non_ortho =
true;
30 void load_from_json(
const json &j);
31 json serialize()
const;
36 bool drag_start_track =
true;
37 bool highlight_on_top =
true;
38 bool show_text_in_tracks =
true;
39 bool show_text_in_vias =
true;
40 bool move_using_router =
true;
42 void load_from_json(
const json &j);
43 json serialize()
const;
48 std::map<ActionToolID, std::map<ActionCatalogItem::Availability, std::vector<KeySequence>>> keys;
50 void load_from_json(
const json &j);
51 void append_from_json(
const json &j);
52 json serialize()
const;
57 std::map<InToolActionID, std::vector<KeySequence>> keys;
59 void load_from_json(
const json &j);
60 void append_from_json(
const json &j);
61 json serialize()
const;
66 bool smooth_zoom_2d =
true;
67 bool smooth_zoom_3d =
false;
68 bool touchpad_pan =
false;
70 void load_from_json(
const json &j);
71 json serialize()
const;
77 std::string url =
"https://dev-partinfo.kitspace.org/graphql";
78 std::string preferred_distributor;
79 bool ignore_moq_gt_1 =
true;
80 unsigned int max_price_breaks = 3;
81 unsigned int cache_days = 5;
82 bool is_enabled()
const;
84 void load_from_json(
const json &j);
85 json serialize()
const;
93 void load_from_json(
const json &j);
94 json serialize()
const;
100 void set_filename(
const std::string &filename);
103 void load_from_json(
const json &j);
105 static std::string get_preferences_filename();
106 json serialize()
const;
114 bool capture_output =
false;
120 typedef sigc::signal<void> type_signal_changed;
121 type_signal_changed signal_changed()
123 return s_signal_changed;
127 std::string filename;
128 type_signal_changed s_signal_changed;