2 #include "canvas/appearance.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include <sigc++/sigc++.h>
6 #include "imp/action_catalog.hpp"
11 enum class InToolActionID;
16 void load_from_json(
const json &j);
17 void load_colors_from_json(
const json &j);
18 json serialize()
const;
19 json serialize_colors()
const;
24 bool show_all_junctions =
false;
25 bool drag_start_net_line =
true;
26 bool bend_non_ortho =
true;
28 void load_from_json(
const json &j);
29 json serialize()
const;
34 bool drag_start_track =
true;
35 bool highlight_on_top =
true;
36 bool show_text_in_tracks =
true;
37 bool show_text_in_vias =
true;
38 bool move_using_router =
true;
40 void load_from_json(
const json &j);
41 json serialize()
const;
46 std::map<ActionToolID, std::map<ActionCatalogItem::Availability, std::vector<KeySequence>>> keys;
48 void load_from_json(
const json &j);
49 void append_from_json(
const json &j);
50 json serialize()
const;
55 std::map<InToolActionID, std::vector<KeySequence>> keys;
57 void load_from_json(
const json &j);
58 void append_from_json(
const json &j);
59 json serialize()
const;
64 bool smooth_zoom_2d =
true;
65 bool smooth_zoom_3d =
false;
66 bool touchpad_pan =
false;
67 float zoom_factor = 50;
68 bool keyboard_zoom_to_cursor =
false;
70 void load_from_json(
const json &j);
71 json serialize()
const;
76 std::string url =
"https://dev-partinfo.kitspace.org/graphql";
77 std::string preferred_distributor;
78 bool ignore_moq_gt_1 =
true;
79 unsigned int max_price_breaks = 3;
80 unsigned int cache_days = 5;
82 void load_from_json(
const json &j);
83 json serialize()
const;
88 std::string client_id;
89 std::string client_secret;
90 std::string site =
"DE";
91 std::string currency =
"EUR";
92 unsigned int max_price_breaks = 3;
94 void load_from_json(
const json &j);
95 json serialize()
const;
101 bool remember =
true;
102 bool show_in_tool =
true;
104 void load_from_json(
const json &j);
105 json serialize()
const;
110 bool switch_layers =
true;
111 bool switch_sheets =
true;
112 bool drag_polygon_edges =
true;
113 bool drag_to_move =
true;
115 void load_from_json(
const json &j);
116 json serialize()
const;
122 void set_filename(
const std::string &filename);
125 void load_from_json(
const json &j);
127 static std::string get_preferences_filename();
128 json serialize()
const;
136 bool capture_output =
false;
138 enum class StockInfoProviderSel { NONE, PARTINFO, DIGIKEY };
139 StockInfoProviderSel stock_info_provider = StockInfoProviderSel::NONE;
147 bool show_pull_request_tools =
false;
148 bool hud_debug =
false;
150 typedef sigc::signal<void> type_signal_changed;
151 type_signal_changed signal_changed()
153 return s_signal_changed;
157 std::string filename;
158 type_signal_changed s_signal_changed;
Definition: preferences.hpp:98
Definition: appearance.hpp:7
Definition: preferences.hpp:32
Definition: preferences.hpp:13
Definition: preferences.hpp:86
Definition: preferences.hpp:44
Definition: preferences.hpp:108
Definition: preferences.hpp:74
Definition: preferences.hpp:119
Definition: preferences.hpp:22
Definition: preferences.hpp:62
a class to store JSON values
Definition: json.hpp:170
basic_json<> json
default JSON class
Definition: json_fwd.hpp:62