2#include "canvas/appearance.hpp"
3#include "canvas3d/spacenav_prefs.hpp"
4#include "nlohmann/json_fwd.hpp"
5#include <sigc++/sigc++.h>
7#include "imp/action_catalog.hpp"
12enum class InToolActionID;
17 void load_from_json(
const json &j);
18 void load_colors_from_json(
const json &j);
19 json serialize()
const;
20 json serialize_colors()
const;
25 bool show_all_junctions =
false;
26 bool drag_start_net_line =
true;
27 bool bend_non_ortho =
true;
29 void load_from_json(
const json &j);
30 json serialize()
const;
35 bool drag_start_track =
true;
36 bool highlight_on_top =
true;
37 bool show_text_in_tracks =
true;
38 bool show_text_in_vias =
true;
39 bool move_using_router =
true;
41 void load_from_json(
const json &j);
42 json serialize()
const;
47 std::map<ActionToolID, std::map<ActionCatalogItem::Availability, std::vector<KeySequence>>> keys;
49 void load_from_json(
const json &j);
50 void append_from_json(
const json &j);
51 json serialize()
const;
56 std::map<InToolActionID, std::vector<KeySequence>> keys;
58 void load_from_json(
const json &j);
59 void append_from_json(
const json &j);
60 json serialize()
const;
65 bool smooth_zoom_2d =
true;
66 bool smooth_zoom_3d =
false;
67 bool touchpad_pan =
false;
68 float zoom_factor = 50;
69 bool keyboard_zoom_to_cursor =
false;
71 void load_from_json(
const json &j);
72 json serialize()
const;
77 bool show_hints =
true;
78 unsigned int max_depth = 50;
80 void load_from_json(
const json &j);
81 json serialize()
const;
86 std::string url =
"https://dev-partinfo.kitspace.org/graphql";
87 std::string preferred_distributor;
88 bool ignore_moq_gt_1 =
true;
89 unsigned int max_price_breaks = 3;
90 unsigned int cache_days = 5;
92 void load_from_json(
const json &j);
93 json serialize()
const;
98 std::string client_id;
99 std::string client_secret;
100 std::string site =
"DE";
101 std::string currency =
"EUR";
102 unsigned int max_price_breaks = 3;
104 void load_from_json(
const json &j);
105 json serialize()
const;
111 bool remember =
true;
112 bool show_in_tool =
true;
114 void load_from_json(
const json &j);
115 json serialize()
const;
120 bool switch_layers =
true;
121 bool switch_sheets =
true;
122 bool drag_polygon_edges =
true;
123 bool drag_to_move =
true;
125 void load_from_json(
const json &j);
126 json serialize()
const;
131 bool dark_theme =
false;
133 void load_from_json(
const json &j);
134 json serialize()
const;
141 std::vector<ActionID> buttons;
143 void load_from_json(
const json &j);
144 json serialize()
const;
150 void set_filename(
const std::string &filename);
153 void load_from_json(
const json &j);
155 static std::string get_preferences_filename();
156 json serialize()
const;
164 bool capture_output =
false;
166 enum class StockInfoProviderSel { NONE, PARTINFO, DIGIKEY };
167 StockInfoProviderSel stock_info_provider = StockInfoProviderSel::NONE;
178 bool show_pull_request_tools =
false;
179 bool hud_debug =
false;
181 typedef sigc::signal<void> type_signal_changed;
182 type_signal_changed signal_changed()
184 return s_signal_changed;
188 std::string filename;
189 type_signal_changed s_signal_changed;
Definition: preferences.hpp:108
Definition: preferences.hpp:129
Definition: appearance.hpp:7
Definition: preferences.hpp:33
Definition: preferences.hpp:14
Definition: preferences.hpp:96
Definition: preferences.hpp:45
Definition: preferences.hpp:118
Definition: preferences.hpp:84
Definition: preferences.hpp:147
Definition: preferences.hpp:23
Definition: preferences.hpp:137
Definition: preferences.hpp:75
Definition: preferences.hpp:63
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