2#include "canvas/appearance.hpp"
3#include "canvas3d/spacenav_prefs.hpp"
4#include "canvas/show_via_span.hpp"
5#include "canvas/input_devices_prefs.hpp"
6#include "nlohmann/json_fwd.hpp"
7#include <sigc++/sigc++.h>
9#include "imp/action_catalog.hpp"
14enum class InToolActionID;
19 void load_from_json(
const json &j);
20 void load_colors_from_json(
const json &j);
21 json serialize()
const;
22 json serialize_colors()
const;
27 bool show_all_junctions =
false;
28 bool drag_start_net_line =
true;
29 bool bend_non_ortho =
true;
31 void load_from_json(
const json &j);
32 json serialize()
const;
37 bool drag_start_track =
true;
38 bool highlight_on_top =
true;
39 bool show_text_in_tracks =
true;
40 bool show_text_in_vias =
true;
41 ShowViaSpan show_via_span = ShowViaSpan::BLIND_BURIED;
42 bool move_using_router =
true;
44 void load_from_json(
const json &j);
45 json serialize()
const;
50 std::map<ActionToolID, std::map<ActionCatalogItem::Availability, std::vector<KeySequence>>> keys;
52 void load_from_json(
const json &j);
53 void append_from_json(
const json &j);
54 json serialize()
const;
59 std::map<InToolActionID, std::vector<KeySequence>> keys;
61 void load_from_json(
const json &j);
62 void append_from_json(
const json &j);
63 json serialize()
const;
68 bool smooth_zoom_2d =
true;
69 bool smooth_zoom_3d =
false;
70 bool touchpad_pan =
false;
71 float zoom_factor = 50;
72 bool keyboard_zoom_to_cursor =
false;
74 void load_from_json(
const json &j);
75 json serialize()
const;
80 bool show_hints =
true;
81 unsigned int max_depth = 50;
82 bool never_forgets =
false;
84 void load_from_json(
const json &j);
85 json serialize()
const;
90 std::string url =
"https://dev-partinfo.kitspace.org/graphql";
91 std::string preferred_distributor;
92 bool ignore_moq_gt_1 =
true;
93 unsigned int max_price_breaks = 3;
94 unsigned int cache_days = 5;
96 void load_from_json(
const json &j);
97 json serialize()
const;
102 std::string client_id;
103 std::string client_secret;
104 std::string site =
"DE";
105 std::string currency =
"EUR";
106 unsigned int max_price_breaks = 3;
108 void load_from_json(
const json &j);
109 json serialize()
const;
115 bool remember =
true;
116 bool show_in_tool =
true;
118 void load_from_json(
const json &j);
119 json serialize()
const;
124 bool switch_layers =
true;
125 bool switch_sheets =
true;
126 bool drag_polygon_edges =
true;
127 bool drag_to_move =
true;
129 void load_from_json(
const json &j);
130 json serialize()
const;
135 bool vertical_layout =
false;
137 void load_from_json(
const json &j);
138 json serialize()
const;
143 bool dark_theme =
false;
145 void load_from_json(
const json &j);
146 json serialize()
const;
153 std::vector<ActionID> buttons;
155 void load_from_json(
const json &j);
156 json serialize()
const;
163 void load_from_json(
const json &j);
164 json serialize()
const;
170 void set_filename(
const std::string &filename);
173 void load_from_json(
const json &j);
175 static std::string get_preferences_filename();
176 json serialize()
const;
184 bool capture_output =
false;
186 enum class StockInfoProviderSel { NONE, PARTINFO, DIGIKEY };
187 StockInfoProviderSel stock_info_provider = StockInfoProviderSel::NONE;
200 bool show_pull_request_tools =
false;
201 bool hud_debug =
false;
203 typedef sigc::signal<void> type_signal_changed;
204 type_signal_changed signal_changed()
206 return s_signal_changed;
210 std::string filename;
211 type_signal_changed s_signal_changed;
Definition preferences.hpp:112
Definition preferences.hpp:141
Definition appearance.hpp:7
Definition preferences.hpp:35
Definition preferences.hpp:16
Definition preferences.hpp:100
Definition preferences.hpp:48
Definition preferences.hpp:122
Definition preferences.hpp:88
Definition preferences.hpp:167
Definition preferences.hpp:25
Definition preferences.hpp:149
Definition preferences.hpp:78
Definition preferences.hpp:66
a class to store JSON values
Definition json.hpp:177
basic_json<> json
default JSON class
Definition json_fwd.hpp:62
Definition spacenav_prefs.hpp:4