1 Star 0 Fork 1

zhoutk / Linux_QT_serialTools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mainwindow.h 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include <QDebug>
#include <QTextCodec>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void read_data_rb();
void pushButton_clean_count_cb();
void pushButton_clean_input_cb();
void pushButton_clean_recv_buff_cb();
void pushButton_send_data_cb();
void pushButton_open_uart_cb();
public:
const QString state_red_SheetStyle = "min-width: 16px; min-height: 16px;max-width:16px; max-height: 16px;border-radius: 8px; border:1px solid black;background:red";
const QString state_green_SheetStyle = "min-width: 16px; min-height: 16px;max-width:16px; max-height: 16px;border-radius: 8px; border:1px solid black;background:green";
const QString state_grey_SheetStyle = "min-width: 16px; min-height: 16px;max-width:16px; max-height: 16px;border-radius: 8px; border:1px solid black;background:#C0C0C0";
const QString state_yellow_SheetStyle = "min-width: 16px; min-height: 16px;max-width:16px; max-height: 16px;border-radius: 8px; border:1px solid black;background:yellow";
int pushButton_open_state;
int sendByte_count = 0;
int recvByte_count = 0;
private:
Ui::MainWindow *ui;
QSerialPort *serial;
};
#endif // MAINWINDOW_H
C++
1
https://gitee.com/zhoutk/linux_qt_serial-tools.git
git@gitee.com:zhoutk/linux_qt_serial-tools.git
zhoutk
linux_qt_serial-tools
Linux_QT_serialTools
master

搜索帮助