Horizon
preferences_window_partinfo.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "preferences/preferences.hpp"
4 #include "nlohmann/json.hpp"
5 
6 namespace horizon {
7 using json = nlohmann::json;
8 class PartinfoPreferencesEditor : public Gtk::Box {
9 public:
10  PartinfoPreferencesEditor(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x, class Preferences &prefs);
11  static PartinfoPreferencesEditor *create(Preferences &prefs);
12 
13 private:
14  Preferences &preferences;
15  PartInfoPreferences &partinfo_preferences;
16  Gtk::Switch *partinfo_enable_switch = nullptr;
17  Gtk::Grid *partinfo_grid = nullptr;
18  Gtk::Entry *partinfo_base_url_entry = nullptr;
19  Gtk::ComboBoxText *partinfo_preferred_distributor_combo = nullptr;
20  Gtk::CheckButton *partinfo_ignore_moq_1_cb = nullptr;
21  Gtk::SpinButton *partinfo_max_price_breaks_sp = nullptr;
22  Gtk::SpinButton *partinfo_cache_days_sp = nullptr;
23  void update_warnings();
24 };
25 
26 
27 } // namespace horizon
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:166
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61