Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
354 Kevin 1
#ifndef SERIALWIDGET_H
2
#define SERIALWIDGET_H
3
 
4
#include "GlobalDefines.h"
5
#include "SerialHelper.h"
6
 
7
class SerialWidget : public QWidget
8
{
9
        Q_OBJECT
10
    public:
11
        SerialWidget(QWidget *parent = 0);
12
        ~SerialWidget();
13
 
14
    public slots:
15
        // Inbound from SerialHelper
362 Kevin 16
        void UpdateParameters(QStringList ports, QStringList speeds, QStringList dataBits,
17
                              QStringList stopBits, QStringList parity, QStringList flowControl);
354 Kevin 18
 
19
        // Local GUI processing
362 Kevin 20
        void ConnectToggleBtn(void);
21
        void LocalConnected(void);
22
        void LocalDisconnected(void);
354 Kevin 23
 
24
    signals:
25
        // Outbound to SerialHelper
362 Kevin 26
        void QueryParameters(void);
27
        void Connect(QString port, QString speed, QString dataBits,
28
                     QString stopBits, QString parity, QString flowControl);
29
        void Disconnect(void);
30
        void TransmitByteArray(QByteArray data);
354 Kevin 31
 
32
        // Outbound to MainWindow
362 Kevin 33
        void ReceivedByte(QByteArray data);
34
        void Connected(void);
35
        void Disconnected(void);
354 Kevin 36
        void UpdateStatus(QString string);
37
 
38
    private:
39
        SerialHelper *serialHelper;
40
        QThread *serialThread;
41
 
362 Kevin 42
        QPushButton *btnConnect;
43
        QPushButton *btnRefresh;
44
        QLabel *labelPort;
45
        QLabel *labelSpeed;
46
        QLabel *labelDataBits;
47
        QLabel *labelStopBits;
48
        QLabel *labelParity;
49
        QLabel *labelFlowControl;
50
        QComboBox *cboxPort;
51
        QComboBox *cboxSpeed;
52
        QComboBox *cboxDataBits;
53
        QComboBox *cboxStopBits;
54
        QComboBox *cboxParity;
55
        QComboBox *cboxFlowControl;
354 Kevin 56
};
57
 
58
#endif // SERIALWIDGET_H