SoDaRadio-5.0.3-master:8901fb5
qtgui
soda_hamlib_listener.hpp
Go to the documentation of this file.
1
/*
2
Copyright (c) 2017 Matthew H. Reilly (kb1vc)
3
All rights reserved.
4
5
Redistribution and use in source and binary forms, with or without
6
modification, are permitted provided that the following conditions are
7
met:
8
9
Redistributions of source code must retain the above copyright
10
notice, this list of conditions and the following disclaimer.
11
Redistributions in binary form must reproduce the above copyright
12
notice, this list of conditions and the following disclaimer in
13
the documentation and/or other materials provided with the
14
distribution.
15
16
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
29
#ifndef SODA_HAMLIB_LISTENER_DEF
30
#define SODA_HAMLIB_LISTENER_DEF
31
32
#include <QThread>
33
#include <QtNetwork/QtNetwork>
34
#include "
soda_hamlib_handler.hpp
"
35
36
namespace
GUISoDa
{
37
38
class
HamlibListener
:
public
QThread {
39
Q_OBJECT
40
public
:
41
explicit
HamlibListener
(qintptr desc,
42
HamlibHandler
* _handler,
43
QObject *parent = 0);
44
45
void
run
();
46
47
48
signals:
49
void
error
(QTcpSocket::SocketError err);
50
51
public
slots:
52
void
readyRead
();
53
void
disconnected
();
54
void
setFinished
() { exit(0); }
55
56
protected
:
57
HamlibHandler
*
handler_p
;
58
qintptr
socket_desc
;
59
QString
current_command
;
60
QTcpSocket *
socket_p
;
61
};
62
}
63
#endif
GUISoDa::HamlibListener::run
void run()
Definition:
soda_hamlib_listener.cpp:42
GUISoDa::HamlibListener::HamlibListener
HamlibListener(qintptr desc, HamlibHandler *_handler, QObject *parent=0)
Definition:
soda_hamlib_listener.cpp:33
soda_hamlib_handler.hpp
GUISoDa::HamlibListener::socket_p
QTcpSocket * socket_p
Definition:
soda_hamlib_listener.hpp:60
GUISoDa::HamlibListener::error
void error(QTcpSocket::SocketError err)
GUISoDa::HamlibListener::handler_p
HamlibHandler * handler_p
Definition:
soda_hamlib_listener.hpp:57
GUISoDa::HamlibListener::socket_desc
qintptr socket_desc
Definition:
soda_hamlib_listener.hpp:58
GUISoDa::HamlibListener::disconnected
void disconnected()
Definition:
soda_hamlib_listener.cpp:74
GUISoDa::HamlibListener::readyRead
void readyRead()
Definition:
soda_hamlib_listener.cpp:57
GUISoDa::HamlibListener
Definition:
soda_hamlib_listener.hpp:38
GUISoDa
Definition:
freqlabel.hpp:38
GUISoDa::HamlibListener::setFinished
void setFinished()
Definition:
soda_hamlib_listener.hpp:54
GUISoDa::HamlibHandler
Definition:
soda_hamlib_handler.hpp:43
GUISoDa::HamlibListener::current_command
QString current_command
Definition:
soda_hamlib_listener.hpp:59
Generated on Sun Sep 24 2017 12:16:38 for SoDaRadio-5.0.3-master:8901fb5 by
1.8.13