2 * Copyright 2012 Ruediger Gad
4 * This file is part of QZeeControl.
6 * QZeeControl is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * QZeeControl is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with QZeeControl. If not, see <http://www.gnu.org/licenses/>.
24 #include <QtConnectivity/QBluetoothAddress>
25 #include <QtConnectivity/QBluetoothSocket>
28 class BtConnector : public QObject
32 Q_PROPERTY(bool a READ a NOTIFY aChanged)
33 Q_PROPERTY(bool b READ b NOTIFY bChanged)
34 Q_PROPERTY(bool c READ c NOTIFY cChanged)
35 Q_PROPERTY(bool d READ d NOTIFY dChanged)
37 Q_PROPERTY(int x READ x NOTIFY xChanged)
38 Q_PROPERTY(int y READ y NOTIFY yChanged)
40 explicit BtConnector(QObject *parent = 0);
47 Q_INVOKABLE void connect(QString address, int port);
72 void error(QBluetoothSocket::SocketError errorCode);
74 void stickMoved(int x, int y);
75 void buttonsChanged(bool a, bool b, bool c, bool d);
77 void aChanged(bool val);
78 void bChanged(bool val);
79 void cChanged(bool val);
80 void dChanged(bool val);
82 void xChanged(int val);
83 void yChanged(int val);
89 QBluetoothSocket *socket;
101 #endif // BTCONNECTOR_H