Horizon
pool_cache_cleanup_dialog.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "common/common.hpp"
4 #include "util/uuid.hpp"
5 #include "nlohmann/json_fwd.hpp"
6 #include <set>
7 
8 namespace horizon {
9 using json = nlohmann::json;
10 
11 class PoolCacheCleanupDialog : public Gtk::Dialog {
12 public:
13  PoolCacheCleanupDialog(Gtk::Window *parent, const std::set<std::string> &filenames_delete,
14  const std::set<std::string> &models_delete, class Pool *pool);
15 
16 private:
17  void do_cleanup();
18  void action_toggled(const Glib::ustring &path);
19 
20  class TreeColumns : public Gtk::TreeModelColumnRecord {
21  public:
22  TreeColumns()
23  {
24  Gtk::TreeModelColumnRecord::add(name);
25  Gtk::TreeModelColumnRecord::add(filename);
26  Gtk::TreeModelColumnRecord::add(type);
27  Gtk::TreeModelColumnRecord::add(remove);
28  }
29  Gtk::TreeModelColumn<Glib::ustring> name;
30  Gtk::TreeModelColumn<ObjectType> type;
31  Gtk::TreeModelColumn<std::string> filename;
32  Gtk::TreeModelColumn<bool> remove;
33  };
34  TreeColumns list_columns;
35 
36  Glib::RefPtr<Gtk::ListStore> item_store;
37 };
38 } // namespace horizon
nlohmann::json
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61
horizon::PoolCacheCleanupDialog
Definition: pool_cache_cleanup_dialog.hpp:11
nlohmann::basic_json
a class to store JSON values
Definition: json.hpp:161
horizon::Pool
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:21