dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
usbsignalfilter.h
Go to the documentation of this file.
1 
13 /*
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License as published by
16  * the Free Software Foundation; either version 3 of the License, or
17  * (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful, but
20  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  * for more details.
23  *
24  * You should have received a copy of the GNU General Public License along
25  * with this program; if not, see <http://www.gnu.org/licenses/>
26  *
27  * Additional note on redistribution: The copyright and license notices above
28  * must be maintained in each individual source file that is a derivative work
29  * of this source file; otherwise redistribution is prohibited.
30  */
31 
32 #ifndef USBSIGNALFILTER_H
33 #define USBSIGNALFILTER_H
34 #include <QObject>
35 #include "usbmonitor.h"
36 #include <QList>
37 class RAWHID_EXPORT USBSignalFilter : public QObject
38 {
39  Q_OBJECT
40 private:
41  QList<int> m_vid;
42  int m_pid;
43  int m_boardModel;
44  int m_runState;
45  bool portMatches(USBPortInfo port);
46 signals:
47  void deviceDiscovered();
48  void deviceRemoved();
49 private slots:
50  void m_deviceDiscovered(USBPortInfo port);
51  void m_deviceRemoved(USBPortInfo port);
52 
53 public:
54  USBSignalFilter(int vid, int pid, int boardModel, int runState);
55  USBSignalFilter(QList<int> vid, int pid, int boardModel, int runState);
56 };
57 #endif // USBSIGNALFILTER_H