File: band_ctl.h

package info (click to toggle)
eq10q 1.2-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 592 kB
  • sloc: cpp: 2,105; makefile: 22
file content (85 lines) | stat: -rw-r--r-- 3,011 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/***************************************************************************
 *   Copyright (C) 2009 by Pere Ràfols Soler                               *
 *   sapista2@gmail.com                                                    *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/

#include "ctlbutton.h"
#include "pixmapcombo.h"

#include <gtkmm/box.h>
#include <gtkmm/label.h>
#include <gtkmm/togglebutton.h>
//#include <gtkmm/comboboxtext.h>
#include <gtkmm/scale.h>
#include <gtkmm/alignment.h>


class BandCtl : public Gtk::VBox{
  public:
    BandCtl(); //constructor cutre
    BandCtl( float *freq, const int band_num,
            sigc::slot<void> gain_slot,
            sigc::slot<void> freq_slot,
            sigc::slot<void> Q_slot,
            sigc::slot<void> type_slot, int *semafor
            );
    virtual ~BandCtl();
    float get_gain();
    float get_freq();
    float get_Q();
    float get_filter_type();
    void set_gain(float g);
    void set_freq(float f);
    void set_freq_direct(float f);
    void set_Q(float q);
    void set_filter_type(float t);
    void hide_spins();
    
  protected:
    Gtk::Label band_label;
    Gtk::ToggleButton m_on_button;
    //Gtk::ComboBoxText m_filter_sel;
    PixMapCombo m_filter_sel;
    Gtk::Alignment button_align, combo_align;
    EQButton *m_gain, *m_freq, *m_Q;
    
    void on_button_clicked();
    void on_combo_changed();
    void config_type();
    void config_sensitive();
    void reset_Q(float q);
    
    
  private:
    int filter_type, ant_filter;
    float *f;
    bool vic_de_set;
};

class  GainCtl : public Gtk::VBox{
  public:
    GainCtl(const Glib::ustring title, sigc::slot<void> m_slot);
    virtual ~GainCtl();
    void set_gain(float g);
    float get_gain();
  
  protected:
    Gtk::VScale gain_scale;
    Gtk::Label gain_label;

};