1
#ifndef SETUPPAGEHAMLIB_H
2
#define SETUPPAGEHAMLIB_H
4
/***************************************************************************
5
setuppagehamlib.h - description
8
copyright : (C) 2018 by Jaime Robles
9
email : jaime@robles.es
10
***************************************************************************/
12
/*****************************************************************************
13
* This file is part of KLog. *
15
* KLog is free software: you can redistribute it and/or modify *
16
* it under the terms of the GNU General Public License as published by *
17
* the Free Software Foundation, either version 3 of the License, or *
18
* (at your option) any later version. *
20
* KLog is distributed in the hope that it will be useful, *
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
23
* GNU General Public License for more details. *
25
* You should have received a copy of the GNU General Public License *
26
* along with KLog. If not, see <https://www.gnu.org/licenses/>. *
28
*****************************************************************************/
33
#include <QSerialPortInfo>
34
#include "hamlibclass.h"
35
#include "dataproxy_sqlite.h"
36
#include <hamlib/rig.h>
39
class SetupPageHamLib : public QWidget
43
explicit SetupPageHamLib(DataProxy_SQLite *dp, QWidget *parent = nullptr);
45
bool setRigType(const QString &_radio);
46
bool setSerialPort(const QString &_port);
47
bool setSerialSpeed(const QString &_speed );
48
void setActive(const QString &_active);
49
//void setRTS(const QString &_state);
50
//void setDTR(const QString &_state);
51
void setDataBits(const QString &_st);
52
void setFlowControl(const QString &_st);
53
void setParity(const QString &_st);
54
void setStopBits(const QString &_st);
55
//void setPollInterval(const QString &_st);
56
void setReadOnly(const QString &_m);
69
void fillSerialPortsComboBox();
70
//static int addRigToList(const struct rig_caps* caps, void* data);
71
QStringList getAvailableSerialPorts();
73
QString getDataBits();
74
QString getFlowControl();
76
QString getStopBits();
77
QString getPollInterval();
81
DataBits { Data5, Data6, Data7, Data8, UnknownDataBits }
82
FlowControl { NoFlowControl, HardwareControl, SoftwareControl, UnknownFlowControl }
83
Parity { NoParity, EvenParity, OddParity, SpaceParity, MarkParity, UnknownParity }
84
StopBits { OneStop, OneAndHalfStop, TwoStop, UnknownStopBits }
88
QPushButton *scanSerialPortButton;
89
QComboBox *rigTypeComboBox, *serialBaudsComboBox, *serialPortComboBox, *dataBitsComboBox,
90
*flowControlComboBox, *parityComboBox, *stopBitsComboBox;
91
//QSpinBox *serialBaudsSpinBox;
92
QLineEdit *serialPort;
93
QSpinBox *pollIntervalQSpinBox;
97
//RIG *my_rig; // handle to rig (instance)
99
//rig_model_t myrig_model;
101
QStringList strings, serialPorts;
102
QCheckBox *activateHamlibCheckBox, *readOnlyModeCheckBox; //, *RTSCheckBox, *DTRCheckBox;
105
//int defaultPortSpeed;
108
#endif // SETUPPAGEHAMLIB_H