Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
colorEagleStdio
zoompipeline
提交
cc11f83d
zoompipeline
项目概览
colorEagleStdio
/
zoompipeline
通知
181
Star
12
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
zoompipeline
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
cc11f83d
编写于
1月 15, 2014
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add server message display logs
上级
06dfac3e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
29 addition
and
8 deletion
+29
-8
QTcpClientTest/qtcpclienttest.cpp
QTcpClientTest/qtcpclienttest.cpp
+1
-1
ZoomPipeline_FuncSvr/zpmainframe.cpp
ZoomPipeline_FuncSvr/zpmainframe.cpp
+19
-5
ZoomPipeline_FuncSvr/zpmainframe.h
ZoomPipeline_FuncSvr/zpmainframe.h
+2
-0
ZoomPipeline_FuncSvr/zpmainframe.ui
ZoomPipeline_FuncSvr/zpmainframe.ui
+7
-2
未找到文件。
QTcpClientTest/qtcpclienttest.cpp
浏览文件 @
cc11f83d
...
...
@@ -75,7 +75,7 @@ void QTcpClientTest::on_client_disconnected()
pSock
->
deleteLater
();
}
}
void
QTcpClientTest
::
displayError
(
QAbstractSocket
::
SocketError
err
)
void
QTcpClientTest
::
displayError
(
QAbstractSocket
::
SocketError
/*err*/
)
{
QGHTcpClient
*
sock
=
qobject_cast
<
QGHTcpClient
*>
(
sender
());
if
(
sock
)
...
...
ZoomPipeline_FuncSvr/zpmainframe.cpp
浏览文件 @
cc11f83d
#include "zpmainframe.h"
#include "ui_zpmainframe.h"
#include <
functional
>
#include <
QDateTime
>
using
namespace
ZPNetwork
;
using
namespace
ZPTaskEngine
;
ZPMainFrame
::
ZPMainFrame
(
QWidget
*
parent
)
:
...
...
@@ -32,6 +32,9 @@ ZPMainFrame::ZPMainFrame(QWidget *parent) :
m_nTimerId
=
startTimer
(
500
);
m_pMsgModel
=
new
QStandardItemModel
(
this
);
ui
->
listView_msg
->
setModel
(
m_pMsgModel
);
}
ZPMainFrame
::~
ZPMainFrame
()
...
...
@@ -46,7 +49,6 @@ ZPMainFrame::~ZPMainFrame()
{
QCoreApplication
::
processEvents
();
QThread
::
currentThread
()
->
msleep
(
200
);
//_sleep(100);
}
delete
ui
;
...
...
@@ -64,14 +66,26 @@ void ZPMainFrame::changeEvent(QEvent *e)
}
}
//These Message is nessery.-------------------------------------
void
ZPMainFrame
::
on_evt_Message
(
const
QString
&
)
void
ZPMainFrame
::
on_evt_Message
(
const
QString
&
strMsg
)
{
QDateTime
dtm
=
QDateTime
::
currentDateTime
();
QString
msg
=
dtm
.
toString
(
"yyyy-MM-dd HH:mm:ss.zzz"
)
+
" "
+
strMsg
;
int
nrows
=
m_pMsgModel
->
rowCount
();
m_pMsgModel
->
insertRow
(
0
,
new
QStandardItem
(
msg
));
while
(
nrows
--
>
16384
)
m_pMsgModel
->
removeRow
(
m_pMsgModel
->
rowCount
()
-
1
);
}
//The socket error message
void
ZPMainFrame
::
on_evt_SocketError
(
QObject
*
/*senderSock*/
,
QAbstractSocket
::
SocketError
/* socketError*/
)
void
ZPMainFrame
::
on_evt_SocketError
(
QObject
*
senderSock
,
QAbstractSocket
::
SocketError
socketError
)
{
QDateTime
dtm
=
QDateTime
::
currentDateTime
();
QString
msg
=
dtm
.
toString
(
"yyyy-MM-dd HH:mm:ss.zzz"
)
+
" "
+
QString
(
"SockError %1 with code %2"
)
.
arg
((
quint64
)
senderSock
).
arg
((
quint32
)
socketError
);
int
nrows
=
m_pMsgModel
->
rowCount
();
m_pMsgModel
->
insertRow
(
0
,
new
QStandardItem
(
msg
));
while
(
nrows
--
>
16384
)
m_pMsgModel
->
removeRow
(
m_pMsgModel
->
rowCount
()
-
1
);
}
...
...
ZoomPipeline_FuncSvr/zpmainframe.h
浏览文件 @
cc11f83d
...
...
@@ -2,6 +2,7 @@
#define ZPMAINFRAME_H
#include <QMainWindow>
#include <QStandardItemModel>
#include "network/zp_net_threadpool.h"
#include "pipeline/zp_pipeline.h"
#include "smartlink/st_client_table.h"
...
...
@@ -20,6 +21,7 @@ public:
protected:
void
changeEvent
(
QEvent
*
e
);
void
timerEvent
(
QTimerEvent
*
);
QStandardItemModel
*
m_pMsgModel
;
private:
Ui
::
ZPMainFrame
*
ui
;
ZPNetwork
::
zp_net_ThreadPool
*
m_netEngine
;
...
...
ZoomPipeline_FuncSvr/zpmainframe.ui
浏览文件 @
cc11f83d
...
...
@@ -26,7 +26,7 @@
<normaloff>
:/icons/Resources/Alienware (27).png
</normaloff>
:/icons/Resources/Alienware (27).png
</iconset>
</attribute>
<attribute
name=
"title"
>
<string>
Network
</string>
<string>
Summary
</string>
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
...
...
@@ -40,8 +40,13 @@
<normaloff>
:/icons/Resources/Backup drive.png
</normaloff>
:/icons/Resources/Backup drive.png
</iconset>
</attribute>
<attribute
name=
"title"
>
<string>
Task
</string>
<string>
Messages
</string>
</attribute>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_2"
>
<item>
<widget
class=
"QListView"
name=
"listView_msg"
/>
</item>
</layout>
</widget>
</widget>
</item>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录