Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
代码海贼团船长
ZTTY
提交
5e9c47d4
Z
ZTTY
项目概览
代码海贼团船长
/
ZTTY
通知
45
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Z
ZTTY
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5e9c47d4
编写于
11月 10, 2022
作者:
代码海贼团船长
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
单挑发送功能基本完成,除了hexsend界面的输入验证
上级
9831a5df
变更
16
展开全部
隐藏空白更改
内联
并排
Showing
16 changed file
with
1074 addition
and
759 deletion
+1074
-759
CMakeLists.txt
CMakeLists.txt
+1
-1
LICENSE
LICENSE
+1
-1
control/data/zpagedata.cpp
control/data/zpagedata.cpp
+33
-0
control/data/zpagedata.h
control/data/zpagedata.h
+24
-0
control/data/zsettings.cpp
control/data/zsettings.cpp
+26
-0
control/data/zsettings.h
control/data/zsettings.h
+8
-0
control/serialport/zserialport.cpp
control/serialport/zserialport.cpp
+5
-0
control/zcontrol.cpp
control/zcontrol.cpp
+4
-0
control/zcontrol.h
control/zcontrol.h
+5
-0
ui/home.cpp
ui/home.cpp
+30
-2
ui/home.h
ui/home.h
+10
-2
ui/multiplesend.cpp
ui/multiplesend.cpp
+122
-1
ui/multiplesend.h
ui/multiplesend.h
+24
-4
ui/multiplesend.ui
ui/multiplesend.ui
+740
-740
ui/singlesend.cpp
ui/singlesend.cpp
+40
-7
ui/singlesend.h
ui/singlesend.h
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
5e9c47d4
...
...
@@ -23,7 +23,7 @@ add_executable(ZTTY main.cpp
control/serialport/zserialport.cpp control/serialport/zserialport.h
control/zcontrol.cpp control/zcontrol.h
control/data/zsettings.cpp control/data/zsettings.h
ui/home.cpp ui/home.h ui/home.ui
)
ui/home.cpp ui/home.h ui/home.ui
control/data/zpagedata.cpp control/data/zpagedata.h
)
target_link_libraries
(
ZTTY
Qt5::Core
...
...
LICENSE
浏览文件 @
5e9c47d4
...
...
@@ -369,7 +369,7 @@ that material) supplement the terms of this License with terms:
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the
origin
of that material, or
c) Prohibiting misrepresentation of the
qPoint
of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
...
...
control/data/zpagedata.cpp
0 → 100644
浏览文件 @
5e9c47d4
//
// Created by 11518 on 2022/11/10.
//
#include <QFile>
#include <QDataStream>
#include "zpagedata.h"
bool
ZPageData
::
savePageData
(
const
QVector
<
Page
>
&
pageDatas
,
int
currentPage
,
const
QString
&
fileName
)
{
QFile
file
(
fileName
);
if
(
!
file
.
open
(
QIODevice
::
WriteOnly
))
{
return
false
;
}
QDataStream
out
(
&
file
);
out
<<
pageDatas
<<
currentPage
;
file
.
close
();
return
true
;
}
bool
ZPageData
::
openPageData
(
QVector
<
Page
>
&
pageDatas
,
int
&
currentPage
,
const
QString
&
fileName
)
{
QFile
file
(
fileName
);
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
))
{
return
false
;
}
QDataStream
in
(
&
file
);
in
>>
pageDatas
>>
currentPage
;
file
.
close
();
return
true
;
}
control/data/zpagedata.h
0 → 100644
浏览文件 @
5e9c47d4
//
// Created by 11518 on 2022/11/10.
//
#ifndef ZTTY_ZPAGEDATA_H
#define ZTTY_ZPAGEDATA_H
#include <QByteArray>
#include <QPair>
#include <QVector>
typedef
QVector
<
QPair
<
bool
,
QByteArray
>>
Page
;
class
ZPageData
{
public:
//! 保存文件到本地
bool
savePageData
(
const
QVector
<
Page
>
&
pageDatas
,
int
currentPage
,
const
QString
&
fileName
=
"data.dat"
);
//! 读取文件从本地
bool
openPageData
(
QVector
<
Page
>
&
pageDatas
,
int
&
currentPage
,
const
QString
&
fileName
=
"data.dat"
);
private:
};
#endif //ZTTY_ZPAGEDATA_H
control/data/zsettings.cpp
浏览文件 @
5e9c47d4
...
...
@@ -140,3 +140,29 @@ void ZSettings::setHexFormalRec(bool checked) {
this
->
setValue
(
"REC_HEX"
,
checked
);
this
->
endGroup
();
}
int
ZSettings
::
getSumPage
()
const
{
int
index
=
this
->
value
(
"MULTIPLE/PAGE"
).
toInt
();
if
(
index
==
0
)
{
index
=
1
;
}
return
index
;
}
void
ZSettings
::
setSumPage
(
int
index
)
{
this
->
beginGroup
(
"MULTIPLE"
);
this
->
setValue
(
"PAGE"
,
index
);
this
->
endGroup
();
}
int
ZSettings
::
getCurrentPage
()
const
{
int
index
=
this
->
value
(
"MULTIPLE/CURRENT"
).
toInt
();
return
index
;
}
void
ZSettings
::
setCurrentPage
(
int
index
)
{
this
->
beginGroup
(
"MULTIPLE"
);
this
->
setValue
(
"CURRENT"
,
index
);
this
->
endGroup
();
}
control/data/zsettings.h
浏览文件 @
5e9c47d4
...
...
@@ -63,6 +63,14 @@ public:
bool
getRts
()
const
;
//! 设置Rts功能开关
void
setRts
(
bool
icChecked
);
//! 获取多条发送有多少页
int
getSumPage
()
const
;
//! 设置多条发送有多少页
void
setSumPage
(
int
index
);
//! 获取多条发送有多少页
int
getCurrentPage
()
const
;
//! 设置多条发送有多少页
void
setCurrentPage
(
int
index
);
//! 析构函数
virtual
~
ZSettings
();
};
...
...
control/serialport/zserialport.cpp
浏览文件 @
5e9c47d4
...
...
@@ -13,6 +13,7 @@ ZSerialPort::ZSerialPort(QObject *parent) :
m_TimerIdSerialPort
=
startTimer
(
1500
);
// qDebug()<<this->readBufferSize();
this
->
setReadBufferSize
(
256
);
}
ZSerialPort
::~
ZSerialPort
()
{
...
...
@@ -87,6 +88,10 @@ QStringList ZSerialPort::getDataList() const {
bool
ZSerialPort
::
openTty
(
const
QString
&
tty
,
int
baud
,
QString
stopBit
,
QString
dataBit
,
QString
parityBit
)
{
if
(
tty
.
isEmpty
())
{
return
false
;
}
this
->
setPortName
(
tty
);
this
->
setBaudRate
(
baud
);
QMetaEnum
metaEnum
=
QMetaEnum
::
fromType
<
QSerialPort
::
StopBits
>
();
...
...
control/zcontrol.cpp
浏览文件 @
5e9c47d4
...
...
@@ -26,3 +26,7 @@ ZSerialPort *ZControl::getMpSerialPort() const {
ZSettings
*
ZControl
::
getMpSettings
()
const
{
return
mpSettings
;
}
ZPageData
*
ZControl
::
getMpPageData
()
const
{
return
mpPageData
;
}
control/zcontrol.h
浏览文件 @
5e9c47d4
...
...
@@ -9,6 +9,7 @@
#include <QDebug>
#include "serialport/zserialport.h"
#include "data/zsettings.h"
#include "data/zpagedata.h"
class
ZControl
:
public
QObject
{
Q_OBJECT
...
...
@@ -19,6 +20,10 @@ private:
ZControl
();
ZSerialPort
*
mpSerialPort
;
ZSettings
*
mpSettings
;
ZPageData
*
mpPageData
;
public:
ZPageData
*
getMpPageData
()
const
;
public:
ZSettings
*
getMpSettings
()
const
;
...
...
ui/home.cpp
浏览文件 @
5e9c47d4
...
...
@@ -13,7 +13,12 @@
#include "ui_Home.h"
Home
::
Home
(
QWidget
*
parent
)
:
QWidget
(
parent
),
ui
(
new
Ui
::
Home
),
mpZControl
(
ZControl
::
instance
()),
m_SendNumber
(
0
),
m_RecNumber
(
0
)
{
Home
::
Home
(
QWidget
*
parent
)
:
QWidget
(
parent
),
ui
(
new
Ui
::
Home
),
mpZControl
(
ZControl
::
instance
()),
m_SendNumber
(
0
),
m_RecNumber
(
0
),
mpRubberBand
(
new
QRubberBand
(
QRubberBand
::
Rectangle
,
this
)){
ui
->
setupUi
(
this
);
m_TimerId
=
startTimer
(
1000
);
...
...
@@ -28,6 +33,7 @@ Home::Home(QWidget *parent) : QWidget(parent), ui(new Ui::Home),mpZControl(ZCont
mpMultipleSend
=
new
MultipleSend
();
ui
->
tabWidget
->
addTab
(
mpMultipleSend
,
tr
(
"多条发送"
));
//connect(mpMultipleSend,SIGNAL(signalSerialWrite(QByteArray,bool,bool)),this,SLOT(slotSerialWrite(QByteArray, bool,bool)));
ui
->
cbBox_Tty
->
addItems
(
mpZControl
->
getMpSerialPort
()
->
getTtyList
());
connect
(
ui
->
cbBox_Tty
,
SIGNAL
(
currentTextChanged
(
const
QString
&
)),
this
,
SLOT
(
slotTtyNameTextChanged
(
const
QString
&
)));
...
...
@@ -83,6 +89,8 @@ Home::Home(QWidget *parent) : QWidget(parent), ui(new Ui::Home),mpZControl(ZCont
});
ui
->
ckBox_HexShow
->
setChecked
(
mpZControl
->
getMpSettings
()
->
getHexFormalRec
());
connect
(
ui
->
ckBox_HexShow
,
SIGNAL
(
stateChanged
(
int
)),
this
,
SLOT
(
slotHexShowStateChanged
(
int
)));
}
Home
::~
Home
()
{
...
...
@@ -100,15 +108,17 @@ void Home::timerEvent(QTimerEvent *event) {
}
void
Home
::
slotPBnTtySetClicked
()
{
if
(
mpZControl
->
getMpSerialPort
()
->
isOpen
()){
mpZControl
->
getMpSerialPort
()
->
close
();
ui
->
pBn_TtySet
->
setText
(
tr
(
"打开串口"
));
qDebug
()
<<
mpZControl
->
getMpSerialPort
()
->
isBreakEnabled
();
return
;
}
bool
info
=
mpZControl
->
getMpSerialPort
()
->
openTty
(
ui
->
cbBox_Tty
->
currentText
(),
ui
->
cbBox_Baud
->
currentText
().
toInt
(),
ui
->
cbBox_Stop
->
currentText
(),
ui
->
cbBox_Data
->
currentText
(),
ui
->
cbBox_Parity
->
currentText
());
// mpZControl->getMpSerialPort()->setBreakEnabled(true);
if
(
!
info
){
QMessageBox
::
warning
(
this
,
tr
(
"提示"
),
tr
(
"串口打开失败。"
));
}
else
{
...
...
@@ -257,3 +267,21 @@ void Home::slotHexShowStateChanged(int state) {
}
}
void
Home
::
mousePressEvent
(
QMouseEvent
*
event
)
{
m_Start
=
event
->
pos
();
mpRubberBand
->
setGeometry
(
QRect
(
m_Start
,
QSize
()));
mpRubberBand
->
show
();
QWidget
::
mousePressEvent
(
event
);
}
void
Home
::
mouseReleaseEvent
(
QMouseEvent
*
event
)
{
if
(
mpRubberBand
)
mpRubberBand
->
hide
();
QWidget
::
mouseReleaseEvent
(
event
);
}
void
Home
::
mouseMoveEvent
(
QMouseEvent
*
event
)
{
if
(
mpRubberBand
)
mpRubberBand
->
setGeometry
(
QRect
(
m_Start
,
event
->
pos
()).
normalized
());
QWidget
::
mouseMoveEvent
(
event
);
}
\ No newline at end of file
ui/home.h
浏览文件 @
5e9c47d4
...
...
@@ -6,6 +6,8 @@
#define ZCOM_HOME_H
#include <QWidget>
#include <QMouseEvent>
#include <QRubberBand>
#include "singlesend.h"
#include "multiplesend.h"
#include "../control/zcontrol.h"
...
...
@@ -20,7 +22,10 @@ Q_OBJECT
protected:
//! 重写定时器
void
timerEvent
(
QTimerEvent
*
event
)
override
;
//! 重写鼠标事件
void
mousePressEvent
(
QMouseEvent
*
event
)
override
;
void
mouseReleaseEvent
(
QMouseEvent
*
event
)
override
;
void
mouseMoveEvent
(
QMouseEvent
*
event
)
override
;
public:
explicit
Home
(
QWidget
*
parent
=
nullptr
);
~
Home
()
override
;
...
...
@@ -56,7 +61,10 @@ private:
ZControl
*
mpZControl
;
//总控界面
uint64_t
m_SendNumber
;
//发送计数
uint64_t
m_RecNumber
;
//接收计数
QByteArray
m_RecShow
;
QByteArray
m_RecShow
;
//接收展示
QRubberBand
*
mpRubberBand
;
//橡皮筋
QPoint
m_Start
;
//橡皮筋起点
};
...
...
ui/multiplesend.cpp
浏览文件 @
5e9c47d4
...
...
@@ -9,10 +9,131 @@
MultipleSend
::
MultipleSend
(
QWidget
*
parent
)
:
QWidget
(
parent
),
ui
(
new
Ui
::
MultipleSend
)
{
QWidget
(
parent
),
ui
(
new
Ui
::
MultipleSend
)
,
mpControl
(
ZControl
::
instance
()){
if
(
mpControl
->
getMpPageData
()
->
openPageData
(
m_PageDatas
,
m_CurrentPageIndex
)){
m_SumPage
=
m_PageDatas
.
size
();
}
else
{
m_SumPage
=
1
;
m_CurrentPageIndex
=
0
;
m_PageDatas
=
{
Page
(
10
)};
}
ui
->
setupUi
(
this
);
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
mpCkBoxList
<<
this
->
findChild
<
QCheckBox
*>
(
QString
(
"cBox_%0"
).
arg
(
i
));
}
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
mpSendEditList
<<
this
->
findChild
<
QLineEdit
*>
(
QString
(
"lEdit_%0"
).
arg
(
i
));
}
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
mpPbnList
<<
this
->
findChild
<
QPushButton
*>
(
QString
(
"pBn_%0"
).
arg
(
i
));
}
setCurrentPageData
();
connect
(
ui
->
pBn_HomePage
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotFirstPage
()));
connect
(
ui
->
pBn_AddPage
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotAddPage
()));
connect
(
ui
->
pBn_LastPage
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotLastPage
()));
connect
(
ui
->
pBn_NextPage
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotNextPage
()));
connect
(
ui
->
pBn_PrePage
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotPrePage
()));
connect
(
ui
->
pBn_Jump
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotJumpPage
()));
connect
(
ui
->
pBn_DelPage
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
slotRemovePage
()));
}
MultipleSend
::~
MultipleSend
()
{
if
(
!
mpControl
->
getMpPageData
()
->
savePageData
(
m_PageDatas
,
m_CurrentPageIndex
)){
std
::
remove
(
"data.dat"
);
}
delete
ui
;
}
void
MultipleSend
::
slotFirstPage
()
{
m_CurrentPageIndex
=
0
;
setCurrentPageData
();
}
void
MultipleSend
::
slotLastPage
()
{
m_CurrentPageIndex
=
m_SumPage
-
1
;
setCurrentPageData
();
}
void
MultipleSend
::
slotNextPage
()
{
if
(
m_CurrentPageIndex
==
m_SumPage
-
1
)
{
return
;
}
m_CurrentPageIndex
++
;
setCurrentPageData
();
}
void
MultipleSend
::
slotPrePage
()
{
if
(
m_CurrentPageIndex
==
0
)
{
return
;
}
m_CurrentPageIndex
--
;
setCurrentPageData
();
}
void
MultipleSend
::
slotRemovePage
()
{
if
(
m_SumPage
==
1
)
{
return
;
}
m_PageDatas
.
remove
(
m_CurrentPageIndex
);
m_SumPage
--
;
if
(
m_SumPage
==
m_CurrentPageIndex
)
{
m_CurrentPageIndex
--
;
}
setCurrentPageData
();
}
void
MultipleSend
::
slotAddPage
()
{
m_SumPage
++
;
m_PageDatas
.
append
(
Page
(
10
));
m_CurrentPageIndex
++
;
setCurrentPageData
();
}
void
MultipleSend
::
slotJumpPage
()
{
m_CurrentPageIndex
=
ui
->
spin_Page
->
value
()
-
1
;
setCurrentPageData
();
}
void
MultipleSend
::
setCurrentPageData
()
{
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
disconnect
(
mpCkBoxList
[
i
],
nullptr
,
nullptr
,
nullptr
);
disconnect
(
mpSendEditList
[
i
],
nullptr
,
nullptr
,
nullptr
);
disconnect
(
mpPbnList
[
i
],
nullptr
,
nullptr
,
nullptr
);
}
Page
&
page
=
m_PageDatas
[
m_CurrentPageIndex
];
//qDebug()<<page <<m_CurrentPageIndex;
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
connect
(
mpCkBoxList
[
i
],
&
QCheckBox
::
clicked
,
[
=
,
&
page
](
bool
checked
)
{
page
[
i
].
first
=
checked
;
});
connect
(
mpSendEditList
[
i
],
&
QLineEdit
::
textChanged
,
[
=
,
&
page
](
const
QString
&
text
)
{
page
[
i
].
second
=
text
.
toLocal8Bit
();
});
connect
(
mpPbnList
[
i
],
&
QPushButton
::
clicked
,
[
=
,
&
page
]()
{
emit
signalMultipleSerialWrite
(
page
[
i
].
second
,
ui
->
ckBox_SendEnter
->
isChecked
());
});
}
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
mpCkBoxList
[
i
]
->
setChecked
(
page
[
i
].
first
);
mpSendEditList
[
i
]
->
setText
(
page
[
i
].
second
.
trimmed
());
}
ui
->
spin_Page
->
setMaximum
(
m_SumPage
);
ui
->
label_PageNumber
->
setText
(
QString
(
"页码:%1/%2"
).
arg
(
m_CurrentPageIndex
+
1
).
arg
(
m_SumPage
));
}
ui/multiplesend.h
浏览文件 @
5e9c47d4
...
...
@@ -6,22 +6,42 @@
#define ZTTY_MULTIPLESEND_H
#include <QWidget>
#include <QCheckBox>
#include <QLineEdit>
#include <QPushButton>
#include "control/zcontrol.h"
QT_BEGIN_NAMESPACE
namespace
Ui
{
class
MultipleSend
;
}
QT_END_NAMESPACE
class
MultipleSend
:
public
QWidget
{
Q_OBJECT
signals:
void
signalMultipleSerialWrite
(
QByteArray
array
,
bool
isEnter
);
public:
explicit
MultipleSend
(
QWidget
*
parent
=
nullptr
);
~
MultipleSend
()
override
;
private
slots
:
void
slotFirstPage
();
void
slotLastPage
();
void
slotNextPage
();
void
slotPrePage
();
void
slotRemovePage
();
void
slotAddPage
();
void
slotJumpPage
();
private:
Ui
::
MultipleSend
*
ui
;
QVector
<
QCheckBox
*>
mpCkBoxList
;
QVector
<
QLineEdit
*>
mpSendEditList
;
QVector
<
QPushButton
*>
mpPbnList
;
ZControl
*
mpControl
;
QVector
<
Page
>
m_PageDatas
;
int
m_CurrentPageIndex
;
int
m_SumPage
;
void
setCurrentPageData
();
};
...
...
ui/multiplesend.ui
浏览文件 @
5e9c47d4
此差异已折叠。
点击以展开。
ui/singlesend.cpp
浏览文件 @
5e9c47d4
...
...
@@ -17,6 +17,8 @@ SingleSend::SingleSend(QWidget *parent) :
connect
(
ui
->
pBn_Clear
,
&
QPushButton
::
clicked
,[
=
](){
ui
->
tEdit_Send
->
clear
();
ui
->
progressBar
->
setValue
(
0
);
ui
->
lineEdit_FileName
->
clear
();
emit
signalClearSendInfo
();
});
...
...
@@ -46,21 +48,52 @@ SingleSend::SingleSend(QWidget *parent) :
});
connect
(
ui
->
pBn_SendFile
,
&
QPushButton
::
clicked
,[
=
](){
if
(
!
mpControl
->
getMpSerialPort
()
->
isOpen
()
||
mpControl
->
getMpSerialPort
()
->
error
()
!=
QSerialPort
::
SerialPortError
::
NoError
)
{
QMessageBox
::
warning
(
this
,
tr
(
"提示"
),
tr
(
"串口没有打开。"
));
return
;
}
QFile
file
(
ui
->
lineEdit_FileName
->
text
());
if
(
!
file
.
open
(
QIODevice
::
ReadOnly
))
{
QMessageBox
::
warning
(
this
,
tr
(
"提示"
),
tr
(
"文件打开失败。"
));
return
;
}
m_IsSendFile
=
true
;
m_FileArray
=
file
.
readAll
();
file
.
close
();
//QtConcurrent::run([this](){
// QTimer timer;
// timer.callOnTimeout(this, [=](){
emit
signalSerialWrite
(
m_FileArray
,
ui
->
ckBox_HexSend
->
isChecked
(),
ui
->
ckBox_SendEnter
->
isChecked
());
// });
// timer.start(1000);
// });
QtConcurrent
::
run
([
this
](){
int
step
=
4096
;
QList
<
QByteArray
>
byteArrayList
;
QByteArray
byteArray
;
int
size
=
m_FileArray
.
size
();
int
quotient
=
size
/
step
;
int
remainder
=
size
%
step
;
for
(
int
i
=
0
;
i
<
quotient
;
++
i
)
{
byteArrayList
<<
m_FileArray
.
mid
(
step
*
i
,
step
);
}
byteArrayList
<<
m_FileArray
.
mid
(
step
*
quotient
,
remainder
);
for
(
int
i
=
0
;
i
<
quotient
;
++
i
)
{
if
(
!
m_IsSendFile
)
{
break
;
}
emit
signalSerialWrite
(
byteArrayList
[
i
],
ui
->
ckBox_HexSend
->
isChecked
(),
0
);
ui
->
progressBar
->
setValue
(
100
*
i
/
quotient
);
QThread
::
msleep
(
ui
->
spin_Cycle
->
value
());
}
if
(
m_IsSendFile
){
emit
signalSerialWrite
(
byteArrayList
[
quotient
],
ui
->
ckBox_HexSend
->
isChecked
(),
ui
->
ckBox_SendEnter
->
isChecked
());
ui
->
progressBar
->
setValue
(
100
);
}
});
});
connect
(
ui
->
pBn_StopSendFile
,
&
QPushButton
::
clicked
,[
=
](){
bool
temp
=
m_IsSendFile
;
m_IsSendFile
=
false
;
if
(
temp
)
QMessageBox
::
warning
(
this
,
tr
(
"提示"
),
tr
(
"已停止发送文件。"
));
});
}
...
...
ui/singlesend.h
浏览文件 @
5e9c47d4
...
...
@@ -47,7 +47,7 @@ private:
QByteArray
m_CurrentArray
;
QByteArray
m_FileArray
;
int
m_TimerCycleSend
;
bool
m_IsSendFile
;
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录