portlistener.h

来自「qt下 第三方串口类 最新版本 1.2」· C头文件 代码 · 共 59 行

H
59
字号
/**
 * @file PortListener.h
 * @brief Port Listener.
 * @see PortListener
 */

#ifndef PORTLISTENER_H_
#define PORTLISTENER_H_

#include <QObject>

class QextSerialPort;


/**
 * Port Listener.
 */
class PortListener : public QObject
{
	Q_OBJECT
	
	QextSerialPort * port;


	public:
		/**
		 * Constructor.
		 *  @param parent parent object.
		 */
		PortListener(QextSerialPort * port, QObject * parent = 0);
	
	public slots:
		/**
		 * Receive data from serial port.
		 */
		void receive();
		
		/**
		 * Report written bytes.
		 * 	@param bytes number of written bytes.
		 */
		void reportWritten(qint64 bytes);
		
		/**
		 * Report port closing.
		 */
		void reportClose();
		
		/**
		 * Report DSR line.
		 * 	@param status line status.
		 */
		void reportDsr(bool status);

};


#endif /*PORTLISTENER_H_*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?