drumstick  1.0.2
midiparser.h
1 /*
2  Drumstick MIDI realtime input-output
3  Copyright (C) 2009-2015 Pedro Lopez-Cabanillas <plcl@users.sf.net>
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 #ifndef MIDIPARSER_H
21 #define MIDIPARSER_H
22 
23 #include <QObject>
24 #include "rtmidiinput.h"
25 
26 namespace drumstick {
27 namespace rt {
28 
29 class MIDIParser : public QObject
30 {
31  Q_OBJECT
32 public:
33  explicit MIDIParser(MIDIInput *in = 0, QObject *parent = 0);
34  virtual ~MIDIParser();
35  void setMIDIThruDevice(MIDIOutput* device);
36 
37 public slots:
38  void parse(unsigned char byte);
39  void parse(QByteArray bytes);
40 
41 private:
42  class MIDIParserPrivate;
43  MIDIParserPrivate *d;
44 };
45 
46 }}
47 
48 #endif // MIDIPARSER_H
The QObject class is the base class of all Qt objects.