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  class PartInfoPreferences *partinfo_prefs);
12  static PartinfoPreferencesEditor *create(Preferences *prefs, PartInfoPreferences *partinfo_prefs);
13  Preferences *preferences;
14  PartInfoPreferences *partinfo_preferences;
15 
16 private:
17  Gtk::Switch *partinfo_enable_switch = nullptr;
18  Gtk::Grid *partinfo_grid = nullptr;
19  Gtk::Entry *partinfo_base_url_entry = nullptr;
20  Gtk::ComboBoxText *partinfo_preferred_distributor_combo = nullptr;
21  Gtk::CheckButton *partinfo_ignore_moq_1_cb = nullptr;
22  Gtk::SpinButton *partinfo_max_price_breaks_sp = nullptr;
23  Gtk::SpinButton *partinfo_cache_days_sp = nullptr;
24  void update_warnings();
25 };
26 
27 
28 } // namespace horizon
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61
horizon::PartinfoPreferencesEditor
Definition: preferences_window_partinfo.hpp:8
horizon::Preferences
Definition: preferences.hpp:73
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:161
horizon::PartInfoPreferences
Definition: preferences.hpp:59