Subversion Repositories Code-Repo

Rev

Rev 364 | Details | Compare with Previous | 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);
364 Kevin 21
        void LocalConnected(bool);
354 Kevin 22
 
23
    signals:
24
        // Outbound to SerialHelper
362 Kevin 25
        void QueryParameters(void);
26
        void Connect(QString port, QString speed, QString dataBits,
27
                     QString stopBits, QString parity, QString flowControl);
28
        void Disconnect(void);
29
        void TransmitByteArray(QByteArray data);
354 Kevin 30
 
31
        // Outbound to MainWindow
362 Kevin 32
        void ReceivedByte(QByteArray data);
364 Kevin 33
        void Connected(bool);
354 Kevin 34
        void UpdateStatus(QString string);
35
 
36
    private:
37
        SerialHelper *serialHelper;
38
        QThread *serialThread;
39
 
362 Kevin 40
        QPushButton *btnConnect;
41
        QPushButton *btnRefresh;
42
        QLabel *labelPort;
43
        QLabel *labelSpeed;
44
        QLabel *labelDataBits;
45
        QLabel *labelStopBits;
46
        QLabel *labelParity;
47
        QLabel *labelFlowControl;
48
        QComboBox *cboxPort;
49
        QComboBox *cboxSpeed;
50
        QComboBox *cboxDataBits;
51
        QComboBox *cboxStopBits;
52
        QComboBox *cboxParity;
53
        QComboBox *cboxFlowControl;
354 Kevin 54
};
55
 
56
#endif // SERIALWIDGET_H