1 Star 0 Fork 3

majun/基于Qt上位机

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mainwindow.h 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
王澳刚 提交于 3年前 . Build hub
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
/*------------------user----------------*/
//debug
#include <QDebug>
#include <QFileDialog>
//port
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
//camera
#include <QCamera>
#include <QCameraViewfinder>
#include <QCameraImageCapture>
#include <QCameraInfo>
//web
#include<QWebEngineView>
/*--------------------------------------*/
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 btn_open_port(bool);
void btn_close_port(bool);
void btn_send_data(bool);
void receive_data();
void loadFinished(bool a);
private:
Ui::MainWindow *ui;
/*-------------function-----------------*/
void port_init();
void camera_init();
/*-------------variable-----------------*/
//串口类 类的对象
QSerialPort global_port;//实例化串口类一个对象
QCamera *camera;
QCameraViewfinder *viewfinder;
QCameraImageCapture *imageCapture;
};
#endif // MAINWINDOW_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/majun_real/upper-computer-based-on-qt.git
git@gitee.com:majun_real/upper-computer-based-on-qt.git
majun_real
upper-computer-based-on-qt
基于Qt上位机
master

搜索帮助