Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
学嗨无涯
zoompipeline
提交
ce10ce13
zoompipeline
项目概览
学嗨无涯
/
zoompipeline
与 Fork 源项目一致
Fork自
colorEagleStdio / zoompipeline
通知
1
Star
0
Fork
0
代码
文件
提交
分支
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 搜索 >>
提交
ce10ce13
编写于
10月 25, 2014
作者:
丁劲犇
😸
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add Tray ICON features
上级
38244239
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
64 addition
and
32 deletion
+64
-32
ZoomPipeline_FuncSvr/zpmainframe.cpp
ZoomPipeline_FuncSvr/zpmainframe.cpp
+45
-0
ZoomPipeline_FuncSvr/zpmainframe.h
ZoomPipeline_FuncSvr/zpmainframe.h
+7
-0
ZoomPipeline_FuncSvr/zpmainframe.ui
ZoomPipeline_FuncSvr/zpmainframe.ui
+12
-32
未找到文件。
ZoomPipeline_FuncSvr/zpmainframe.cpp
浏览文件 @
ce10ce13
...
...
@@ -10,6 +10,7 @@
#include <QTcpSocket>
#include <QThread>
#include <QSslSocket>
#include <QSystemTrayIcon>
#include "smartlink/st_clientnode_basetrans.h"
#include "dialogaddressinput.h"
using
namespace
ZPNetwork
;
...
...
@@ -26,6 +27,7 @@ ZPMainFrame::ZPMainFrame(QWidget *parent)
:
QMainWindow
(
parent
)
,
ui
(
new
Ui
::
ZPMainFrame
)
,
m_pLogger
(
0
)
,
m_IconTray
(
0
)
{
m_currentConfigFile
=
QCoreApplication
::
applicationFilePath
()
+
".ini"
;
ui
->
setupUi
(
this
);
...
...
@@ -59,6 +61,13 @@ ZPMainFrame::ZPMainFrame(QWidget *parent)
m_nTimerCheck
=
startTimer
(
10000
);
initUI
();
LoadSettings
(
m_currentConfigFile
);
m_pTrayMenu
=
new
QMenu
(
this
);
m_pTrayMenu
->
addAction
(
ui
->
actionShow_Window
);
m_pTrayMenu
->
addAction
(
ui
->
actionExit
);
m_IconTray
=
new
QSystemTrayIcon
(
QIcon
(
":/icons/Resources/Backup drive.png"
),
this
);
m_IconTray
->
setContextMenu
(
m_pTrayMenu
);
m_IconTray
->
show
();
}
ZPMainFrame
::~
ZPMainFrame
()
...
...
@@ -107,6 +116,14 @@ void ZPMainFrame::changeEvent(QEvent *e)
case
QEvent
::
LanguageChange
:
ui
->
retranslateUi
(
this
);
break
;
case
QEvent
::
WindowStateChange
:
if
(
this
->
isMinimized
()
==
true
)
{
this
->
hide
();
this
->
m_IconTray
->
showMessage
(
tr
(
"Server still running"
),
tr
(
"If you want to terminate server, just using exit Toolbar button."
));
}
break
;
default:
break
;
}
...
...
@@ -925,3 +942,31 @@ void ZPMainFrame::LoadSettingsAndForkServer(const QString & configfile)
}
}
void
ZPMainFrame
::
on_actionShow_Window_triggered
()
{
this
->
showNormal
();
}
void
ZPMainFrame
::
closeEvent
(
QCloseEvent
*
e
)
{
if
(
this
->
isVisible
()
==
true
)
{
this
->
hide
();
this
->
m_IconTray
->
showMessage
(
tr
(
"Server still running"
),
tr
(
"If you want to terminate server, just using exit Toolbar button."
));
e
->
ignore
();
}
else
{
e
->
accept
();
this
->
m_IconTray
->
showMessage
(
tr
(
"Server is going to closed"
),
tr
(
"Waiting for all unfinished progress..."
));
}
}
void
ZPMainFrame
::
on_actionExit_triggered
()
{
this
->
hide
();
this
->
m_IconTray
->
setContextMenu
(
0
);
this
->
close
();
}
ZoomPipeline_FuncSvr/zpmainframe.h
浏览文件 @
ce10ce13
...
...
@@ -6,6 +6,8 @@
#include <QLabel>
#include <QSet>
#include <QMap>
#include <QMenu>
#include <QSystemTrayIcon>
#include "network/zp_net_threadpool.h"
#include "pipeline/zp_pipeline.h"
#include "smartlink/st_client_table.h"
...
...
@@ -29,6 +31,7 @@ public:
void
setLogger
(
STMsgLogger
::
st_logger
*
plogger
);
protected:
void
changeEvent
(
QEvent
*
e
);
void
closeEvent
(
QCloseEvent
*
e
);
QStandardItemModel
*
m_pMsgModelNetwork
;
QStandardItemModel
*
m_pMsgModelCluster
;
QStandardItemModel
*
m_pMsgModelDatabase
;
...
...
@@ -53,6 +56,8 @@ protected:
private:
Ui
::
ZPMainFrame
*
ui
;
QSystemTrayIcon
*
m_IconTray
;
QMenu
*
m_pTrayMenu
;
QLabel
*
m_pStatusLabel
;
ZPNetwork
::
zp_net_Engine
*
m_netEngine
;
ZPTaskEngine
::
zp_pipeline
*
m_taskEngine
;
...
...
@@ -80,6 +85,8 @@ public slots:
void
on_action_Start_Stop_triggered
(
bool
);
void
on_action_About_triggered
();
void
on_actionReload_config_file_triggered
();
void
on_actionShow_Window_triggered
();
void
on_actionExit_triggered
();
void
on_pushButton_addListener_clicked
();
void
on_pushButton_delListener_clicked
();
void
on_pushButton_listerner_apply_clicked
();
...
...
ZoomPipeline_FuncSvr/zpmainframe.ui
浏览文件 @
ce10ce13
...
...
@@ -1121,28 +1121,24 @@
<string>
Reload Config file
</string>
</property>
</action>
<action
name=
"actionShow_Window"
>
<property
name=
"icon"
>
<iconset
resource=
"resource.qrc"
>
<normaloff>
:/icons/Resources/Color, Bondi.png
</normaloff>
:/icons/Resources/Color, Bondi.png
</iconset>
</property>
<property
name=
"text"
>
<string>
Show
&
Window
</string>
</property>
<property
name=
"toolTip"
>
<string>
Show main window
</string>
</property>
</action>
</widget>
<layoutdefault
spacing=
"6"
margin=
"11"
/>
<resources>
<include
location=
"resource.qrc"
/>
</resources>
<connections>
<connection>
<sender>
dial_plain_trans_threads
</sender>
<signal>
valueChanged(int)
</signal>
<receiver>
progressBar_plain_threads
</receiver>
<slot>
setValue(int)
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
266
</x>
<y>
145
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
421
</x>
<y>
144
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
dial_ssl_trans_threads
</sender>
<signal>
valueChanged(int)
</signal>
...
...
@@ -1175,22 +1171,6 @@
</hint>
</hints>
</connection>
<connection>
<sender>
actionExit
</sender>
<signal>
triggered()
</signal>
<receiver>
ZPMainFrame
</receiver>
<slot>
close()
</slot>
<hints>
<hint
type=
"sourcelabel"
>
<x>
-1
</x>
<y>
-1
</y>
</hint>
<hint
type=
"destinationlabel"
>
<x>
277
</x>
<y>
206
</y>
</hint>
</hints>
</connection>
<connection>
<sender>
horizontalSlider_heartbeating
</sender>
<signal>
valueChanged(int)
</signal>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录