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 bool show_hints =
true;
77 unsigned int max_depth = 50;
79 void load_from_json(
const json &j);
80 json serialize()
const;
85 std::string url =
"https://dev-partinfo.kitspace.org/graphql";
86 std::string preferred_distributor;
87 bool ignore_moq_gt_1 =
true;
88 unsigned int max_price_breaks = 3;
89 unsigned int cache_days = 5;
91 void load_from_json(
const json &j);
92 json serialize()
const;
97 std::string client_id;
98 std::string client_secret;
99 std::string site =
"DE";
100 std::string currency =
"EUR";
101 unsigned int max_price_breaks = 3;
103 void load_from_json(
const json &j);
104 json serialize()
const;
110 bool remember =
true;
111 bool show_in_tool =
true;
113 void load_from_json(
const json &j);
114 json serialize()
const;
119 bool switch_layers =
true;
120 bool switch_sheets =
true;
121 bool drag_polygon_edges =
true;
122 bool drag_to_move =
true;
124 void load_from_json(
const json &j);
125 json serialize()
const;
130 bool dark_theme =
false;
132 void load_from_json(
const json &j);
133 json serialize()
const;
139 void set_filename(
const std::string &filename);
142 void load_from_json(
const json &j);
144 static std::string get_preferences_filename();
145 json serialize()
const;
153 bool capture_output =
false;
155 enum class StockInfoProviderSel { NONE, PARTINFO, DIGIKEY };
156 StockInfoProviderSel stock_info_provider = StockInfoProviderSel::NONE;
166 bool show_pull_request_tools =
false;
167 bool hud_debug =
false;
169 typedef sigc::signal<void> type_signal_changed;
170 type_signal_changed signal_changed()
172 return s_signal_changed;
176 std::string filename;
177 type_signal_changed s_signal_changed;
Definition: preferences.hpp:107
Definition: preferences.hpp:128
Definition: appearance.hpp:7
Definition: preferences.hpp:32
Definition: preferences.hpp:13
Definition: preferences.hpp:95
Definition: preferences.hpp:44
Definition: preferences.hpp:117
Definition: preferences.hpp:83
Definition: preferences.hpp:136
Definition: preferences.hpp:22
Definition: preferences.hpp:74
Definition: preferences.hpp:62
a class to store JSON values
Definition: json.hpp:177
basic_json<> json
default JSON class
Definition: json_fwd.hpp:62