ardour
analysis_window.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2006 Paul Davis
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 
18 */
19 
20 #ifndef __ardour_analysis_window_h__
21 #define __ardour_analysis_window_h__
22 
23 #include <glibmm.h>
24 #include <glibmm/refptr.h>
25 
26 #include <gtkmm/radiobutton.h>
27 #include <gtkmm/dialog.h>
28 #include <gtkmm/layout.h>
29 #include <gtkmm/treeview.h>
30 #include <gtkmm/notebook.h>
31 #include <gtkmm/label.h>
32 #include <gtkmm/liststore.h>
33 #include <gtkmm/separator.h>
34 #include <gtkmm/window.h>
35 
36 #include <gtkmm2ext/dndtreeview.h>
37 
38 #include <glibmm/threads.h>
39 
40 #include "ardour/session_handle.h"
41 
42 #include "fft_graph.h"
43 #include "fft_result.h"
44 
45 namespace ARDOUR {
46  class Session;
47 }
48 
49 
50 class AnalysisWindow : public Gtk::Window, public ARDOUR::SessionHandlePtr
51 {
52 public:
53  AnalysisWindow ();
54  ~AnalysisWindow ();
55 
56  void set_rangemode();
57  void set_regionmode();
58 
59  void track_list_row_changed(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
60 
61  void analyze ();
62 
63 private:
64  void clear_tracklist();
65 
66  void source_selection_changed (Gtk::RadioButton *);
67  void display_model_changed (Gtk::RadioButton *);
68  void show_minmax_changed ();
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 
99  Gtk::RadioButton source_selection_ranges_rb;
100  Gtk::RadioButton source_selection_regions_rb;
101 
102  Gtk::HSeparator hseparator1;
103 
107 
108  Gtk::Button refresh_button;
109 
110 
111  Gtk::CheckButton show_minmax_button;
112  Gtk::CheckButton show_normalized_button;
113 
114 
115  // The graph
117 
119  Glib::Threads::Mutex track_list_lock;
120 
121  friend class FFTGraph;
122 };
123 
124 #endif // __ardour_analysis_window_h
125 
Gtk::TreeView track_list
Gtk::RadioButton source_selection_regions_rb
void show_normalized_changed()
Gtk::TreeModelColumn< Gdk::Color > color
Gtk::Label source_selection_label
TrackListColumns tlcols
Gtk::Button refresh_button
Gtk::TreeModelColumn< bool > visible
Gtk::RadioButton source_selection_ranges_rb
Gtk::TreeModelColumn< std::string > trackname
Definition: amp.h:29
Glib::RefPtr< Gtk::ListStore > tlmodel
void display_model_changed(Gtk::RadioButton *)
Gtk::TreeModelColumn< FFTResult * > graph
void show_minmax_changed()
Gtk::HSeparator hseparator1
Gtk::RadioButton display_model_composite_all_tracks_rb
Gtk::RadioButton display_model_composite_separate_rb
Glib::Threads::Mutex track_list_lock
void analyze_data(Gtk::Button *)
Gtk::CheckButton show_normalized_button
Gtk::Label display_model_label
void source_selection_changed(Gtk::RadioButton *)
Gtk::CheckButton show_minmax_button
void track_list_row_changed(const Gtk::TreeModel::Path &path, const Gtk::TreeModel::iterator &iter)