資源簡介
之前寫的關于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
評論
共有 條評論