资源简介
之前写的关于qt实现串口助手博客,有人需要源码,由于当初是为项目需要些,里面有很多不必要的控制,现在重新整理了一份较为纯净的代码,和大家交流学习注意目录不要有中文路径名,尽量在顶层目录下编译,,源博客地址:http://blog.csdn.net/mao19931004/article/details/51852573
代码片段和文件信息
#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 2017-01-13 15:25 Serial\
目录 0 2017-01-13 15:26 Serial\exe\
目录 0 2017-01-13 15:26 Serial\exe\Win32\
目录 0 2017-01-13 15:26 Serial\exe\Win32\imageformats\
文件 82432 2015-10-13 03:28 Serial\exe\Win32\imageformats\qddsd.dll
文件 64512 2015-10-13 03:24 Serial\exe\Win32\imageformats\qgifd.dll
文件 87552 2015-10-13 03:28 Serial\exe\Win32\imageformats\qicnsd.dll
文件 61440 2015-10-13 03:24 Serial\exe\Win32\imageformats\qicod.dll
文件 821760 2015-10-13 03:28 Serial\exe\Win32\imageformats\qjp2d.dll
文件 389632 2015-10-13 03:24 Serial\exe\Win32\imageformats\qjpegd.dll
文件 476672 2015-10-13 03:28 Serial\exe\Win32\imageformats\qmngd.dll
文件 51712 2015-10-13 03:26 Serial\exe\Win32\imageformats\qsvgd.dll
文件 51200 2015-10-13 03:28 Serial\exe\Win32\imageformats\qtgad.dll
文件 600576 2015-10-13 03:28 Serial\exe\Win32\imageformats\qtiffd.dll
文件 49152 2015-10-13 03:28 Serial\exe\Win32\imageformats\qwbmpd.dll
文件 596480 2015-10-13 03:28 Serial\exe\Win32\imageformats\qwebpd.dll
文件 743248 2010-03-18 09:15 Serial\exe\Win32\msvcp100d.dll
文件 1498960 2010-03-18 09:15 Serial\exe\Win32\msvcr100d.dll
目录 0 2017-01-13 15:26 Serial\exe\Win32\platforms\
文件 26112 2015-10-13 03:24 Serial\exe\Win32\platforms\qminimal.dll
文件 67584 2015-10-13 03:24 Serial\exe\Win32\platforms\qminimald.dll
文件 2166784 2015-10-13 03:24 Serial\exe\Win32\platforms\qminimald.pdb
文件 529408 2015-10-13 03:24 Serial\exe\Win32\platforms\qoffscreen.dll
文件 939008 2015-10-13 03:24 Serial\exe\Win32\platforms\qoffscreend.dll
文件 4247552 2015-10-13 03:24 Serial\exe\Win32\platforms\qoffscreend.pdb
文件 991744 2015-10-13 03:25 Serial\exe\Win32\platforms\qwindows.dll
文件 1907712 2015-10-13 03:25 Serial\exe\Win32\platforms\qwindowsd.dll
文件 8826880 2015-10-13 03:25 Serial\exe\Win32\platforms\qwindowsd.pdb
文件 9023488 2016-06-18 16:28 Serial\exe\Win32\Qt5Cored.dll
文件 9954304 2015-10-13 03:19 Serial\exe\Win32\Qt5Guid.dll
文件 117248 2015-10-13 03:29 Serial\exe\Win32\Qt5SerialPortd.dll
............此处省略63个文件信息
- 上一篇:LuaStudio_9.30 破解版
- 下一篇:iOS 全埋点技术白皮书.pdf
评论
共有 条评论