~ubuntu-branches/ubuntu/quantal/muse/quantal

« back to all changes in this revision

Viewing changes to muse/widgets/midi_audio_control.h

  • Committer: Package Import Robot
  • Author(s): Alessio Treglia
  • Date: 2012-07-18 16:07:06 UTC
  • mto: (10.1.11 sid) (1.1.12)
  • mto: This revision was merged to the branch mainline in revision 31.
  • Revision ID: package-import@ubuntu.com-20120718160706-yc6332ishfcq7b7g
ImportĀ upstreamĀ versionĀ 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//=========================================================
 
2
//  MusE
 
3
//  Linux Music Editor
 
4
//
 
5
//  midi_audio_control.h
 
6
//  Copyright (C) 2012 by Tim E. Real (terminator356 at users.sourceforge.net)
 
7
//
 
8
//  This program is free software; you can redistribute it and/or
 
9
//  modify it under the terms of the GNU General Public License
 
10
//  as published by the Free Software Foundation; version 2 of
 
11
//  the License, or (at your option) any later version.
 
12
//
 
13
//  This program is distributed in the hope that it will be useful,
 
14
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
//  GNU General Public License for more details.
 
17
//
 
18
//  You should have received a copy of the GNU General Public License
 
19
//  along with this program; if not, write to the Free Software
 
20
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
21
//
 
22
//=========================================================
 
23
#ifndef MIDI_AUDIO_CONTROL_H
 
24
#define MIDI_AUDIO_CONTROL_H
 
25
 
 
26
#include "ui_midi_audio_control_base.h"
 
27
 
 
28
namespace MusEGui {
 
29
 
 
30
class MidiAudioControl : public QDialog, public Ui::MidiAudioControlBase
 
31
{
 
32
    Q_OBJECT
 
33
 
 
34
private:
 
35
    int _port, _chan, _ctrl;
 
36
    bool _is_learning;
 
37
    void update();
 
38
    void resetLearn();
 
39
    void updateCtrlBoxes();
 
40
 
 
41
private slots:
 
42
    void heartbeat();
 
43
    void learnChanged(bool);
 
44
    void portChanged(int);
 
45
    void chanChanged();
 
46
    void ctrlTypeChanged(int);
 
47
    void ctrlHChanged();
 
48
    void ctrlLChanged();
 
49
    void configChanged();
 
50
 
 
51
public:
 
52
    MidiAudioControl(int port = -1, int chan = 0, int ctrl = 0, QWidget* parent = 0);
 
53
    int port() const { return _port; }
 
54
    int chan() const { return _chan; }
 
55
    int ctrl() const { return _ctrl; }
 
56
};
 
57
 
 
58
}
 
59
 
 
60
#endif // MIDI_AUDIO_CONTROL_H