Make foldback bus match foldback sends namewise
[ardour.git] / gtk2_ardour / idleometer.h
1 /*
2  * Copyright (C) 2076 Robin Gareus <robin@gareus.org>
3  * Copyright (C) 2011 Paul Davis
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (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
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
18  */
19
20 #ifndef __ardour_idle_o_meter_h__
21 #define __ardour_idle_o_meter_h__
22
23 #include <gtkmm/label.h>
24 #include "ardour_dialog.h"
25
26 class IdleOMeter : public ArdourDialog
27 {
28 public:
29         IdleOMeter ();
30         ~IdleOMeter ();
31
32 protected:
33         virtual void on_show ();
34         virtual void on_hide ();
35
36 private:
37         void reset ();
38         bool idle ();
39
40         Gtk::Label _label_cur;
41         Gtk::Label _label_min;
42         Gtk::Label _label_max;
43         Gtk::Label _label_avg;
44         Gtk::Label _label_dev;
45         Gtk::Label _label_acq;
46
47         int64_t _last_display;
48
49         int64_t _start;
50         int64_t _last;
51         int64_t _min;
52         int64_t _max;
53
54         int64_t _cnt;
55         double _total;
56         double _var_m, _var_s;
57         sigc::connection _idle_connection;
58 };
59 #endif
60