Horizon
prj-mgr_views.hpp
1 #pragma once
2 #include "project/project.hpp"
3 #include <gtkmm.h>
4 #include <memory>
5 #include <zmq.hpp>
6 
7 namespace horizon {
8 
10 public:
11  PoolProjectManagerViewCreateProject(const Glib::RefPtr<Gtk::Builder> &refBuilder,
13  void clear();
14  std::pair<bool, std::string> create();
15  typedef sigc::signal<void, bool> type_signal_valid_change;
16  type_signal_valid_change signal_valid_change()
17  {
18  return s_signal_valid_change;
19  }
20  void populate_pool_combo(const Glib::RefPtr<Gtk::Application> &app);
21  void update();
22 
23 private:
24  PoolProjectManagerAppWindow *win = nullptr;
25  Gtk::FileChooserButton *project_path_chooser = nullptr;
26  Gtk::Label *project_dir_label = nullptr;
27  Gtk::ComboBoxText *project_pool_combo = nullptr;
28  std::map<std::string, std::string> meta_values;
29  class ProjectMetaEditor *meta_editor = nullptr;
30 
31  type_signal_valid_change s_signal_valid_change;
32 };
33 
35 public:
36  PoolProjectManagerViewProject(const Glib::RefPtr<Gtk::Builder> &refBuilder, class PoolProjectManagerAppWindow *w);
37  Gtk::Label *label_project_title = nullptr;
38  Gtk::Label *label_project_author = nullptr;
39  Gtk::Label *label_pool_name = nullptr;
40  Gtk::Label *label_pool_path = nullptr;
41  Gtk::Label *label_project_directory = nullptr;
42  Gtk::InfoBar *pool_info_bar = nullptr;
43  Gtk::Label *pool_info_bar_label = nullptr;
44 
45  void open_top_schematic();
46  void open_board();
47  bool update_meta();
48  void update_pool_cache_status(const class PoolCacheStatus &status);
49  void reset_pool_cache_status();
50 
51 private:
52  PoolProjectManagerAppWindow *win = nullptr;
53  Gtk::Button *button_top_schematic = nullptr;
54  Gtk::Button *button_board = nullptr;
55  Gtk::Button *button_part_browser = nullptr;
56  Gtk::Button *button_pool_cache = nullptr;
57  Gtk::Button *button_change_pool = nullptr;
58  Gtk::Label *pool_cache_status_label = nullptr;
59 
60 
61  void handle_button_part_browser();
62  void handle_button_pool_cache();
63  void handle_button_change_pool();
64 };
65 } // namespace horizon
horizon::ProjectMetaEditor
Definition: project_meta_editor.hpp:8
horizon::PoolCacheStatus
Definition: pool_cache_status.hpp:11
horizon::PoolProjectManagerViewCreateProject
Definition: prj-mgr_views.hpp:9
horizon::PoolProjectManagerViewProject
Definition: prj-mgr_views.hpp:34
horizon::PoolProjectManagerAppWindow
Definition: pool-prj-mgr-app_win.hpp:21