Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zheng Yile
codiaclient
Commits
2979647e
Commit
2979647e
authored
Jun 27, 2021
by
Zheng Yile
Browse files
Modify codiaclientgui/utils.py, mainFunctions.py
parent
5c5762d8
Changes
2
Hide whitespace changes
Inline
Side-by-side
codiaclientgui/utils.py
View file @
2979647e
...
...
@@ -314,6 +314,7 @@ class _NewProgressBar(QProgressBar):
super
(
_NewProgressBar
,
self
).
hide
()
for
x
in
self
.
Anime
:
self
.
Anime
[
x
].
stop
()
super
(
_NewProgressBar
,
self
).
setValue
(
0
)
self
.
Anime
[
'progress'
].
setDuration
(
1500
)
def
__init__
(
self
,
*
args
,
**
kargs
):
super
(
_NewProgressBar
,
self
).
__init__
(
*
args
,
**
kargs
)
...
...
mainFunctions.py
View file @
2979647e
...
...
@@ -458,11 +458,34 @@ def HistoryReturn():
uiMain
.
frameQuestion
.
show
()
# def _sub_get_data(eid, pid, cnt):
# if not cnt:
# return get_data(eid=eid, pid=pid)
# else:
# MAXCNT = 5
# progressSub = 90 / (cnt // MAXCNT + 1)
# nowProgress = 0
# res = []
# before = None
# while cnt > 0:
# sub = get_data(eid=eid, pid=pid, before=before, cnt=min(MAXCNT, cnt))
# if not sub: return False
# before = sub[0]['id']
# res += reversed(sub)
# cnt -= MAXCNT
# nowProgress += progressSub
# print(nowProgress)
# uiMain.progressBarHistory.setValue(nowProgress)
# res.reverse()
# return res
def
GetHistory
(
eid
,
pid
,
cnt
,
InfoRecv
=
lambda
:
None
,
ErrorRecv
=
lambda
:
None
):
global
threadGetHistory
# extremely essential!
threadGetHistory
=
MyThread
(
RunMethod
=
lambda
:
get_data
(
eid
=
eid
,
pid
=
pid
,
cnt
=
cnt
))
threadGetHistory
.
infoSignal
[
list
].
connect
(
InfoRecv
)
threadGetHistory
.
errorSignal
.
connect
(
ErrorRecv
)
uiMain
.
progressBarHistory
.
Anime
[
'progress'
].
setDuration
(
1500
*
(
cnt
//
100
+
1
))
uiMain
.
progressBarHistory
.
setValue
(
90
)
threadGetHistory
.
start
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment