2 #include "common/common.hpp" 3 #include "nlohmann/json_fwd.hpp" 4 #include "pool/pool.hpp" 5 #include "pool/pool_cached.hpp" 6 #include "util/uuid.hpp" 16 PoolCacheWindow(BaseObjectType *cobject,
const Glib::RefPtr<Gtk::Builder> &x,
const std::string &cache_path,
17 const std::string &pool_path);
18 static PoolCacheWindow *create(Gtk::Window *p,
const std::string &cache_path,
const std::string &pool_path);
23 void selection_changed();
24 void update_from_pool();
26 std::string cache_path;
27 std::string base_path;
32 Gtk::TreeView *pool_item_view =
nullptr;
33 Gtk::Stack *stack =
nullptr;
34 Gtk::TextView *delta_text_view =
nullptr;
35 Gtk::Button *update_from_pool_button =
nullptr;
36 Gtk::Label *status_label =
nullptr;
38 enum class ItemState { CURRENT, OUT_OF_DATE, MISSING_IN_POOL };
40 class TreeColumns :
public Gtk::TreeModelColumnRecord {
44 Gtk::TreeModelColumnRecord::add(name);
45 Gtk::TreeModelColumnRecord::add(type);
46 Gtk::TreeModelColumnRecord::add(uuid);
47 Gtk::TreeModelColumnRecord::add(state);
48 Gtk::TreeModelColumnRecord::add(delta);
49 Gtk::TreeModelColumnRecord::add(filename_cached);
51 Gtk::TreeModelColumn<Glib::ustring> name;
52 Gtk::TreeModelColumn<std::string> filename_cached;
53 Gtk::TreeModelColumn<ObjectType> type;
54 Gtk::TreeModelColumn<UUID> uuid;
55 Gtk::TreeModelColumn<ItemState> state;
56 Gtk::TreeModelColumn<json> delta;
58 TreeColumns tree_columns;
60 Glib::RefPtr<Gtk::ListStore> item_store;
a class to store JSON values
Definition: json.hpp:161
Definition: pool_cache_window.hpp:14
Definition: pool_cached.hpp:5
Stores objects (Unit, Entity, Symbol, Part, etc.) from the pool.
Definition: pool.hpp:18
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61