Horizon
Loading...
Searching...
No Matches
pools_window.hpp
1#pragma once
2#include <gtkmm.h>
3#include <memory>
4#include <thread>
5#include "util/uuid.hpp"
6#include "pool_index.hpp"
7
8namespace horizon {
9
10class PoolsWindow : public Gtk::Window {
11public:
12 PoolsWindow(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x,
14 static PoolsWindow *create(class PoolProjectManagerApplication &a_app);
15 void add_pool(const std::string &path);
16 void show_pool(const std::string &path);
17 void check_for_updates();
19
20private:
21 class PoolManager &mgr;
23 Gtk::Stack *stack = nullptr;
24 Gtk::Stack *button_stack = nullptr;
25 Gtk::ListBox *installed_listbox = nullptr;
26 Gtk::Box *info_box = nullptr;
27 Gtk::ListBox *available_listbox = nullptr;
28 Gtk::Label *available_placeholder_label = nullptr;
29 class PoolInfoBox *pool_info_box = nullptr;
30 void update();
31 std::map<std::string, std::unique_ptr<class PoolStatusProviderBase>> pool_status_providers;
32
33 std::map<UUID, PoolIndex> pools_index;
34 std::thread index_fetch_thread;
35 std::mutex index_mutex;
36 std::map<UUID, PoolIndex> pools_index_thread;
37 std::string pools_index_err_thread;
38 void index_fetch_worker();
39 void update_index();
40 Glib::Dispatcher index_dispatcher;
41
42 void update_available();
43 void show_download_window(const PoolIndex *idx);
44};
45} // namespace horizon
Definition pool_index.hpp:9
Definition pools_window.cpp:82
Definition pool_manager.hpp:16
Definition pool-prj-mgr-app.hpp:16
Definition pools_window.hpp:10