Horizon
pool_settings_box.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include <set>
4 #include <mutex>
5 #include "util/uuid.hpp"
6 #include "common/common.hpp"
7 #include "nlohmann/json.hpp"
8 
9 class git_repository;
10 
11 namespace horizon {
12 using json = nlohmann::json;
13 
14 class PoolSettingsBox : public Gtk::Box {
15 public:
16  PoolSettingsBox(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x, class PoolNotebook *nb,
17  const std::string &bp);
18  static PoolSettingsBox *create(class PoolNotebook *nb, const std::string &bp);
19  bool get_needs_save() const;
20  void save();
21  void pool_updated();
22 
23 private:
24  class PoolNotebook *notebook = nullptr;
25  std::string pool_base_path;
26  Gtk::Entry *entry_name = nullptr;
27  Gtk::Button *save_button = nullptr;
28  Gtk::ListBox *pools_available_listbox = nullptr;
29  Gtk::ListBox *pools_included_listbox = nullptr;
30  Gtk::Button *pool_inc_button = nullptr;
31  Gtk::Button *pool_excl_button = nullptr;
32  Gtk::Button *pool_up_button = nullptr;
33  Gtk::Button *pool_down_button = nullptr;
34  Gtk::Label *hint_label = nullptr;
35 
36  std::vector<UUID> pools_included;
37 
38  void update_pools();
39 
40  void inc_excl_pool(bool inc);
41 
42  bool needs_save = false;
43  void set_needs_save();
44 };
45 } // namespace horizon
a class to store JSON values
Definition: json.hpp:161
Definition: pool_notebook.hpp:18
Definition: pool_settings_box.hpp:14
Definition: block.cpp:9
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61