Horizon
Loading...
Searching...
No Matches
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
7namespace horizon {
8
9class TuningWindow : public Gtk::Window {
10public:
11 TuningWindow(const class Board &brd);
12 void update();
13 void add_tracks(const std::set<UUID> &tracks, bool all);
14 uint64_t get_ref_length() const;
15
16private:
17 const Board &board;
18
19 class ListColumns : public Gtk::TreeModelColumnRecord {
20 public:
21 ListColumns()
22 {
23 Gtk::TreeModelColumnRecord::add(net);
24 Gtk::TreeModelColumnRecord::add(net_name);
25 Gtk::TreeModelColumnRecord::add(all_tracks);
26 Gtk::TreeModelColumnRecord::add(ref);
27 Gtk::TreeModelColumnRecord::add(tracks);
28 Gtk::TreeModelColumnRecord::add(length);
29 Gtk::TreeModelColumnRecord::add(length_ps);
30 Gtk::TreeModelColumnRecord::add(delta_ps);
31 Gtk::TreeModelColumnRecord::add(fill_value);
32 }
33 Gtk::TreeModelColumn<UUID> net;
34 Gtk::TreeModelColumn<Glib::ustring> net_name;
35 Gtk::TreeModelColumn<std::set<UUID>> tracks;
36 Gtk::TreeModelColumn<uint64_t> length;
37 Gtk::TreeModelColumn<int> fill_value;
38 Gtk::TreeModelColumn<double> length_ps;
39 Gtk::TreeModelColumn<double> delta_ps;
40 Gtk::TreeModelColumn<bool> all_tracks;
41 Gtk::TreeModelColumn<bool> ref;
42 };
43 ListColumns list_columns;
44
45 Glib::RefPtr<Gtk::ListStore> store;
46 Gtk::TreeView *tree_view = nullptr;
47 Gtk::ScrolledWindow *sc = nullptr;
48 Gtk::SpinButton *sp_vf = nullptr;
49 Gtk::SpinButton *sp_er = nullptr;
50
51 WindowStateStore state_store;
52 Gtk::Label *placeholder_label = nullptr;
53
54 uint64_t ref_length = 0;
55};
56} // namespace horizon
Definition board.hpp:47
Definition tuning_window.hpp:9
Definition window_state_store.hpp:25