Subversion Repositories Code-Repo

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
344 Kevin 1
#ifndef SERIALCONTROLLER_H
2
#define SERIALCONTROLLER_H
3
 
4
#include "GlobalDefines.h"
351 Kevin 5
#include "SerialHelper.h"
344 Kevin 6
 
351 Kevin 7
class SerialController : public QWidget
344 Kevin 8
{
9
        Q_OBJECT
10
    public:
351 Kevin 11
        SerialController(QWidget *parent = 0);
344 Kevin 12
        ~SerialController();
13
 
351 Kevin 14
    public slots:
15
        // Inbound from SerialHelper
16
        void Serial_UpdateParameters(QStringList ports, QStringList speeds, QStringList dataBits,
17
                                     QStringList stopBits, QStringList parity, QStringList flowControl);
344 Kevin 18
 
351 Kevin 19
        // Local GUI processing
20
        void Serial_ConnectToggleBtn(void);
21
        void Serial_LocalConnected(void);
22
        void Serial_LocalDisconnected(void);
23
 
24
    signals:
25
        // Outbound to SerialHelper
344 Kevin 26
        void Serial_QueryParameters(void);
348 Kevin 27
        void Serial_Connect(QString port, QString speed, QString dataBits,
28
                            QString stopBits, QString parity, QString flowControl);
344 Kevin 29
        void Serial_Disconnect(void);
30
        void Serial_TransmitString(QString string);
351 Kevin 31
        void Serial_TransmitByteArray(QByteArray buffer);
344 Kevin 32
 
351 Kevin 33
        // Outbound to MainWindow
34
        void Serial_ReceivedByte(char byte);
344 Kevin 35
        void Serial_Connected(void);
36
        void Serial_Disconnected(void);
351 Kevin 37
        void UpdateStatus(QString string);
344 Kevin 38
 
39
    private:
351 Kevin 40
        SerialHelper *serialHelper;
41
        QThread *serialThread;
344 Kevin 42
 
351 Kevin 43
        QPushButton *btnSerialConnect;
44
        QPushButton *btnSerialRefresh;
45
        QLabel *labelSerialPort;
46
        QLabel *labelSerialSpeed;
47
        QLabel *labelSerialDataBits;
48
        QLabel *labelSerialStopBits;
49
        QLabel *labelSerialParity;
50
        QLabel *labelSerialFlowControl;
51
        QComboBox *cboxSerialPort;
52
        QComboBox *cboxSerialSpeed;
53
        QComboBox *cboxSerialDataBits;
54
        QComboBox *cboxSerialStopBits;
55
        QComboBox *cboxSerialParity;
56
        QComboBox *cboxSerialFlowControl;
344 Kevin 57
};
58
 
59
#endif // SERIALCONTROLLER_H