File: hamlibserialconfigwidget.h

package info (click to toggle)
klog 2.4.3-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 12,344 kB
  • sloc: cpp: 51,720; makefile: 15
file content (45 lines) | stat: -rw-r--r-- 1,275 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef KLOG_SETUPPAGES_HAMLIBSERIALCONFIGWIDGET_H
#define KLOG_SETUPPAGES_HAMLIBSERIALCONFIGWIDGET_H

#include <QtWidgets>
#include <QSerialPortInfo>
#include "../klogdefinitions.h"
#include "../utilities.h"

class HamLibSerialConfigWidget : public QWidget
{
    Q_OBJECT

public:
    explicit HamLibSerialConfigWidget(QWidget *parent = nullptr);
    void createUI();
    //void setRigList(const QStringList &_rigs);
    int getDataBits();
    void setDataBits (const int _b);
    QString getFlowControl();
    void setFlowControl(const QString &_st);
    void setParity(const QString &_st);
    QString getParity();
    void setStopBits(const QString &_st);
    QString getStopBits();
    bool setSerialBauds(const int _speed );
    bool setSerialPort(const QString &_port);

    QString getSerialPort();
    int getSerialBauds();

private slots:
    void slotScanPorts();

private:
    QStringList getAvailableSerialPorts();
    void fillSerialPortsComboBox();

    QPushButton *scanSerialPortButton;
    QComboBox *serialBaudsComboBox, *serialPortComboBox, *dataBitsComboBox, *flowControlComboBox, *parityComboBox, *stopBitsComboBox;
    //QLineEdit *dataFromRigLineEdit;
    //QLineEdit *serialPort;
    QStringList serialPorts;
};

#endif // HAMLIBSERIALCONFIGWIDGET_H