1 /* -*- c++ -*- */
2 /*
3  * Gqrx SDR: Software defined radio receiver powered by GNU Radio and Qt
4  *           https://gqrx.dk/
5  *
6  * Copyright 2020 Oliver Grossmann.
7  *
8  * Gqrx is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3, or (at your option)
11  * any later version.
12  *
13  * Gqrx 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 Gqrx; see the file COPYING.  If not, write to
20  * the Free Software Foundation, Inc., 51 Franklin Street,
21  * Boston, MA 02110-1301, USA.
22  */
23 #ifndef DXC_OPTIONS_H
24 #define DXC_OPTIONS_H
25 
26 
27 #include <QCloseEvent>
28 #include <QShowEvent>
29 #include <QTcpSocket>
30 #include <QSettings>
31 
32 #include <QDialog>
33 
34 namespace Ui {
35 class DXCOptions;
36 }
37 
38 class DXCOptions : public QDialog
39 {
40     Q_OBJECT
41 
42 public:
43     explicit DXCOptions(QWidget *parent = 0);
44     ~DXCOptions();
45 
46     void closeEvent(QCloseEvent *event);
47     void showEvent(QShowEvent * event);
48     void saveSettings(QSettings *settings);
49     void readSettings(QSettings *settings);
50 
51 private slots:
52 
53     void on_pushButton_DXCConnect_clicked();
54     void on_pushButton_DXCDisconnect_clicked();
55     void connected();
56     void disconnected();
57     void readyToRead();
58 
59 private:
60     Ui::DXCOptions *ui;
61     QTcpSocket *m_socket;
62 };
63 
64 #endif // DXC_OPTIONS_H
65