Horizon
tuning_window.hpp
1 #pragma once
2 #include <set>
3 #include <gtkmm.h>
4 #include "util/uuid.hpp"
5 #include "util/window_state_store.hpp"
6 
7 namespace horizon {
8 
9 class TuningWindow : public Gtk::Window {
10 public:
11  TuningWindow(const class Board *brd);
12  void update();
13  void add_tracks(const std::set<UUID> &tracks, bool all);
14 
15 private:
16  const Board *board;
17 
18  class ListColumns : public Gtk::TreeModelColumnRecord {
19  public:
20  ListColumns()
21  {
22  Gtk::TreeModelColumnRecord::add(net);
23  Gtk::TreeModelColumnRecord::add(net_name);
24  Gtk::TreeModelColumnRecord::add(all_tracks);
25  Gtk::TreeModelColumnRecord::add(ref);
26  Gtk::TreeModelColumnRecord::add(tracks);
27  Gtk::TreeModelColumnRecord::add(length);
28  Gtk::TreeModelColumnRecord::add(length_ps);
29  Gtk::TreeModelColumnRecord::add(delta_ps);
30  Gtk::TreeModelColumnRecord::add(fill_value);
31  }
32  Gtk::TreeModelColumn<UUID> net;
33  Gtk::TreeModelColumn<Glib::ustring> net_name;
34  Gtk::TreeModelColumn<std::set<UUID>> tracks;
35  Gtk::TreeModelColumn<uint64_t> length;
36  Gtk::TreeModelColumn<int> fill_value;
37  Gtk::TreeModelColumn<double> length_ps;
38  Gtk::TreeModelColumn<double> delta_ps;
39  Gtk::TreeModelColumn<bool> all_tracks;
40  Gtk::TreeModelColumn<bool> ref;
41  };
42  ListColumns list_columns;
43 
44  Glib::RefPtr<Gtk::ListStore> store;
45  Gtk::TreeView *tree_view = nullptr;
46  Gtk::ScrolledWindow *sc = nullptr;
47  Gtk::SpinButton *sp_vf = nullptr;
48  Gtk::SpinButton *sp_er = nullptr;
49 
50  WindowStateStore state_store;
51 };
52 } // namespace horizon
horizon::WindowStateStore
Definition: window_state_store.hpp:20
horizon::Board
Definition: board.hpp:31
horizon::TuningWindow
Definition: tuning_window.hpp:9