资源简介

串口调试助手的源代码,应用VS2015+Qt5.7.0编译通过,生成exe配合qt的dll资源可正常使用

资源截图

代码片段和文件信息

#include “cameraserialport.h“
#include“ui_CameraSerialPort.h“
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
CameraSerialPort::CameraSerialPort(QWidget *parent)
: QWidget(parent)
{
serialPortAssitant.setupUi(this);
initSerialSetCombox();
initWidget();

connect(serialPortAssitant.serialPortcomboBoxSIGNAL(activated(int))thisSLOT(InitSerialPort(int)));
connect(serialPortAssitant.BaudRatecomboBoxSIGNAL(activated(int))thisSLOT(setBaudRateByIndex(int)));

connect(serialPortAssitant.check_RepeatSIGNAL(stateChanged(int))thisSLOT(onCheckRepeatCheck(int)));
connect(serialPortAssitant.ShowSendSIGNAL(stateChanged(int))thisSLOT(onCheckShowSendMsg(int)));
connect(serialPortAssitant.ShowTimeSIGNAL(stateChanged(int))thisSLOT(onCheckShowTime(int)));
connect(serialPortAssitant.CalSendWriteInfoSIGNAL(stateChanged(int))thisSLOT(onCheckCalInfo(int)));
connect(serialPortAssitant.HexRadio_ReceiveSIGNAL(toggled(bool))thisSLOT(onCheckSendByHex(bool)));
connect(serialPortAssitant.HexRadioSIGNAL(toggled(bool))thisSLOT(onCheckReciveByHex(bool)));

connect(repeatSendSIGNAL(timeout())thisSLOT(onRepeatTimer()));

connect(serialPortAssitant.sendBtnSIGNAL(clicked())thisSLOT(sendData()));
connect(serialPortAssitant.clearSIGNAL(clicked())thisSLOT(onClearToolBtn()));
connect(serialPortAssitant.disconnectSIGNAL(clicked())thisSLOT(onDisconnectBtn()));
connect(serialPortAssitant.RefreshBtnSIGNAL(clicked())thisSLOT(onRefreshBtn()));

connect(thisSIGNAL(setPtrSel())thisSLOT(onSetPtrSel()));
}

CameraSerialPort::~CameraSerialPort()
{

}

void CameraSerialPort::initWidget()
{
//设置标题
setWindowIcon(QIcon(“:/frameGrabber/ico/USB.png“));
setWindowtitle(“SerialToSTM“);
setFixedSize(this->size());

//初始打开时,光标在输入行上
serialPortAssitant.sendLine->setFocus();
serialPortAssitant.ReciveWidget->setOverwriteMode(false);

//设置spinBox的上下限制
serialPortAssitant.spinBox->setMinimum(0);
serialPortAssitant.spinBox->setMaximum(10000);
serialPortAssitant.spinBox->setValue(150);
serialPortAssitant.spinBox->setSingleStep(10);

//绑定快捷键
QShortcut *sendkey=new QShortcut(QKeySequence(Qt::Key_Return)this);
connect(sendkeySIGNAL(activated())serialPortAssitant.sendBtnSLOT(click()));

//初始化控件
serialPortAssitant.sendBtn->setText(QString::fromLocal8Bit(“打开“));
serialPortAssitant.disconnect->setToolTip(QString::fromLocal8Bit(“断开链接“));
serialPortAssitant.disconnect->setstyleSheet(“background:transparent“);
serialPortAssitant.clear->setToolTip(QString::fromLocal8Bit(“清除当前数据“));
serialPortAssitant.clear->setstyleSheet(“background:transparent“);
serialPortAssitant.RefreshBtn->setToolTip(QString::fromLocal8Bit(“刷新串口列表“));
serialPortAssitant.RefreshBtn->setstyleSheet(“backg

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-04-19 12:39  SerialToSTM\
     目录           0  2018-04-19 12:39  SerialToSTM\.vs\
     目录           0  2018-04-19 12:39  SerialToSTM\.vs\SerialToSTM\
     目录           0  2018-04-19 12:39  SerialToSTM\.vs\SerialToSTM\v14\
     文件       40960  2018-04-19 13:34  SerialToSTM\.vs\SerialToSTM\v14\.suo
     目录           0  2018-04-19 12:57  SerialToSTM\SerialToSTM\
     文件       13344  2018-04-19 12:53  SerialToSTM\SerialToSTM\CameraSerialPort.ui
     目录           0  2018-04-19 12:47  SerialToSTM\SerialToSTM\Debug\
     文件      297202  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\CL.read.1.tlog
     文件        6226  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\CL.write.1.tlog
     文件       64104  2017-01-13 10:39  SerialToSTM\SerialToSTM\Debug\ParseParcket.obj
     文件         381  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\SerialToSTM.exe.intermediate.manifest
     文件          42  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\SerialToSTM.lastbuildstate
     文件         959  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.log
     目录           0  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\
     文件       10678  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\CL.command.1.tlog
     文件      146204  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\CL.read.1.tlog
     文件        4210  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\CL.write.1.tlog
     文件         199  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\SerialToSTM.lastbuildstate
     文件        4252  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\custombuild.command.1.tlog
     文件         758  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\custombuild.read.1.tlog
     文件        1206  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\custombuild.write.1.tlog
     文件        2384  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\link.command.1.tlog
     文件        4620  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\link.read.1.tlog
     文件        1216  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\SerialToSTM.tlog\link.write.1.tlog
     文件      493333  2018-04-19 12:50  SerialToSTM\SerialToSTM\Debug\cameraserialport.obj
     文件       22646  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\cl.command.1.tlog
     文件        8074  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\custombuild.command.1.tlog
     文件        1226  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\custombuild.read.1.tlog
     文件        1834  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\custombuild.write.1.tlog
     文件        4378  2017-01-13 17:33  SerialToSTM\SerialToSTM\Debug\link.command.1.tlog
............此处省略72个文件信息

评论

共有 条评论