Ardour  9.0-pre0-822-g12e3bc5c20
analysis_window.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006 Sampo Savolainen <v2@iki.fi>
3  * Copyright (C) 2008-2012 Paul Davis <paul@linuxaudiosystems.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License along
16  * with this program; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #pragma once
21 
22 #include <glibmm.h>
23 #include <glibmm/refptr.h>
24 
25 #include <ytkmm/radiobutton.h>
26 #include <ytkmm/dialog.h>
27 #include <ytkmm/layout.h>
28 #include <ytkmm/treeview.h>
29 #include <ytkmm/notebook.h>
30 #include <ytkmm/label.h>
31 #include <ytkmm/liststore.h>
32 #include <ytkmm/separator.h>
33 #include <ytkmm/window.h>
34 
35 #include <gtkmm2ext/dndtreeview.h>
36 
37 #include <glibmm/threads.h>
38 
39 #include "ardour/session_handle.h"
40 
41 #include "fft_graph.h"
42 #include "fft_result.h"
43 
44 namespace ARDOUR {
45  class Session;
46 }
47 
48 class AnalysisWindow : public Gtk::Window, public ARDOUR::SessionHandlePtr
49 {
50 public:
53 
54  void set_rangemode();
56 
57  void track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
58 
59  void analyze ();
60 
61 private:
63 
64  void source_selection_changed (Gtk::RadioButton *);
65  void display_model_changed (Gtk::RadioButton *);
66 
70 
71  void analyze_data (Gtk::Button *);
72 
73  struct TrackListColumns : public Gtk::TreeModel::ColumnRecord {
74  public:
76  add (trackname);
77  add (visible);
78  add (color);
79  add (graph);
80  }
81  Gtk::TreeModelColumn<std::string> trackname;
82  Gtk::TreeModelColumn<bool> visible;
83  Gtk::TreeModelColumn<Gdk::Color> color;
84  Gtk::TreeModelColumn<FFTResult *> graph;
85  };
86 
87  // Packing essentials
88  Gtk::HBox hbox;
89  Gtk::VBox vbox;
90 
91  // Left side
92  Glib::RefPtr<Gtk::ListStore> tlmodel;
94  Gtk::TreeView track_list;
95 
97 
98  Gtk::RadioButton source_selection_ranges_rb;
99  Gtk::RadioButton source_selection_regions_rb;
100 
101  Gtk::HSeparator hseparator1;
102 
103  Gtk::Button refresh_button;
104 
105  Gtk::CheckButton show_minmax_button;
106  Gtk::CheckButton show_normalized_button;
107  Gtk::CheckButton show_proportional_button;
108 
109  // The graph
111 
113  Glib::Threads::Mutex track_list_lock;
114 
115  friend class FFTGraph;
116 };
117 
void clear_tracklist()
TrackListColumns tlcols
void set_regionmode()
void source_selection_changed(Gtk::RadioButton *)
Glib::RefPtr< Gtk::ListStore > tlmodel
Gtk::Button refresh_button
Gtk::TreeView track_list
void analyze_data(Gtk::Button *)
Gtk::Label source_selection_label
Gtk::CheckButton show_minmax_button
Glib::Threads::Mutex track_list_lock
void set_rangemode()
Gtk::RadioButton source_selection_ranges_rb
Gtk::CheckButton show_normalized_button
void display_model_changed(Gtk::RadioButton *)
void show_normalized_changed()
Gtk::CheckButton show_proportional_button
void track_list_row_changed(const Gtk::TreeModel::Path &path, const Gtk::TreeModel::iterator &iter)
void show_minmax_changed()
Gtk::RadioButton source_selection_regions_rb
void show_proportional_changed()
Gtk::HSeparator hseparator1
Gtk::TreeModelColumn< Gdk::Color > color
Gtk::TreeModelColumn< FFTResult * > graph
Gtk::TreeModelColumn< std::string > trackname
Gtk::TreeModelColumn< bool > visible