Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
94f3cef3
Commit
94f3cef3
authored
14 years ago
by
Tobias Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
support for downloading multiple files in gui remote file loader
parent
2a54a282
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/gui/pymod/scene/file_loader.py
+12
-11
12 additions, 11 deletions
modules/gui/pymod/scene/file_loader.py
with
12 additions
and
11 deletions
modules/gui/pymod/scene/file_loader.py
+
12
−
11
View file @
94f3cef3
...
...
@@ -21,6 +21,7 @@ from ost import gui
from
ost
import
info
import
ost
import
sip
import
re
from
PyQt4
import
QtCore
,
QtGui
,
QtNetwork
from
ost.gui
import
FileLoader
...
...
@@ -36,17 +37,17 @@ class BaseRemoteLoader(gui.RemoteSiteLoader):
def
LoadById
(
self
,
id
,
selection
=
""
):
self
.
ById
(
id
,
selection
)
def
ById
(
self
,
id
,
selection
=
""
):
f
ile_name
=
self
.
GetFileName
(
id
)
file
=
QtCore
.
QFile
(
f
ile
_n
ame
)
if
(
file
.
size
()
==
0
):
url
=
QtCore
.
QUrl
(
self
.
GetUrl
(
id
))
request
=
Qt
Netw
or
k
.
Q
NetworkRequest
(
url
)
reply
=
self
.
networkmanager_
.
get
(
r
equest
)
self
.
downloads_
[
reply
]
=
[
id
,
selection
]
return
reply
else
:
gui
.
FileLoader
.
LoadObject
(
str
(
file_name
),
str
(
selection
))
def
ById
(
self
,
id
s
,
selection
=
""
):
f
or
id
in
re
.
findall
(
'
\w+
'
,
ids
):
file
_name
=
self
.
GetF
ile
N
ame
(
id
)
file
=
QtCore
.
QFile
(
file_name
)
if
(
file
.
size
()
==
0
):
url
=
Qt
C
or
e
.
Q
Url
(
self
.
GetUrl
(
id
)
)
request
=
QtNetwork
.
QNetworkR
equest
(
url
)
reply
=
self
.
networkmanager_
.
get
(
request
)
self
.
downloads_
[
reply
]
=
[
id
,
selection
]
else
:
gui
.
FileLoader
.
LoadObject
(
str
(
file_name
),
str
(
selection
))
return
None
def
IsImg
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment