Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review 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
mantidproject
mantid
Commits
427a16e2
Commit
427a16e2
authored
6 years ago
by
Peterson, Peter
Browse files
Options
Downloads
Patches
Plain Diff
Add function to load ui files
This is a duplicate of the one in mantidqt and should go away.
parent
83948d31
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
MantidPlot/mantidplot.py
+16
-0
16 additions, 0 deletions
MantidPlot/mantidplot.py
with
16 additions
and
0 deletions
MantidPlot/mantidplot.py
+
16
−
0
View file @
427a16e2
...
...
@@ -13,8 +13,24 @@
from
__future__
import
(
absolute_import
,
division
,
print_function
)
import
os.path
as
osp
import
pymantidplot
from
pymantidplot
import
*
# and the old qtiplot stuff
import
pymantidplot.qtiplot
def
load_ui
(
caller_filename
,
ui_relfilename
,
baseinstance
=
None
):
'''
This is copied from mantidqt.utils.qt and should be deprecated as
soon as possible.
'''
from
qtpy.uic
import
loadUi
,
loadUiType
# noqa
filepath
=
osp
.
join
(
osp
.
dirname
(
caller_filename
),
ui_relfilename
)
if
not
osp
.
exists
(
filepath
):
raise
ImportError
(
'
File
"
{}
"
does not exist
'
.
format
(
filepath
))
if
not
osp
.
isfile
(
filepath
):
raise
ImportError
(
'
File
"
{}
"
is not a file
'
.
format
(
filepath
))
if
baseinstance
is
not
None
:
return
loadUi
(
filepath
,
baseinstance
=
baseinstance
)
else
:
return
loadUiType
(
filepath
)
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