Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xsocs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
22
Issues
22
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kmap
xsocs
Commits
13d0b38d
Commit
13d0b38d
authored
Jan 26, 2017
by
Damien Naudet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactored QSpaceView.
parent
f1d5166c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
347 additions
and
297 deletions
+347
-297
kmap/gui/XsocsGui.py
kmap/gui/XsocsGui.py
+10
-22
kmap/gui/process/FitWidget.py
kmap/gui/process/FitWidget.py
+268
-157
kmap/gui/view/QspaceView.py
kmap/gui/view/QspaceView.py
+67
-116
kmap/gui/widgets/XsocsPlot2D.py
kmap/gui/widgets/XsocsPlot2D.py
+2
-2
No files found.
kmap/gui/XsocsGui.py
View file @
13d0b38d
...
...
@@ -226,33 +226,21 @@ class XsocsGui(Qt.QMainWindow):
size
.
height
()
*
0.6
,
Qt
.
Qt
.
IgnoreAspectRatio
)
view
.
resize
(
size
)
view
.
sig
ProcessApplied
.
connect
(
self
.
__qspaceRoiApplied
)
view
.
sig
FitDone
.
connect
(
self
.
__slotFitDone
)
view
.
show
()
if
bringToFront
:
view
.
raise_
()
return
view
def
__
qspaceRoiApplied
(
self
,
node
,
roi
):
def
__
slotFitDone
(
self
,
node
,
fitFile
):
item
=
h5NodeToProjectItem
(
node
)
xsocsFile
=
os
.
path
.
basename
(
self
.
__project
.
xsocsFile
)
xsocsPrefix
=
xsocsFile
.
rpartition
(
'.'
)[
0
]
template
=
'{0}_fit_{{0:>04}}.h5'
.
format
(
xsocsPrefix
)
output_f
=
nextFileName
(
self
.
__project
.
workdir
,
template
)
fitWidget
=
FitWidget
(
item
.
qspaceFile
,
output_f
,
roi
,
parent
=
self
.
sender
())
fitWidget
.
exec_
()
if
fitWidget
.
status
==
FitWidget
.
StatusCompleted
:
fitFile
=
fitWidget
.
fitFile
fitGroup
=
item
.
fitGroup
()
fitItem
=
fitGroup
.
addFitFile
(
fitFile
)
self
.
model
().
refresh
()
index
=
self
.
tree
.
pathToIndex
(
fitItem
.
path
)
if
index
.
isValid
():
self
.
tree
.
setCurrentIndex
(
index
)
self
.
__showFit
(
index
.
data
(
ModelRoles
.
InternalDataRole
))
fitWidget
.
deleteLater
()
fitGroup
=
item
.
fitGroup
()
fitItem
=
fitGroup
.
addFitFile
(
fitFile
)
self
.
model
().
refresh
()
index
=
self
.
tree
.
pathToIndex
(
fitItem
.
path
)
if
index
.
isValid
():
self
.
tree
.
setCurrentIndex
(
index
)
self
.
__showFit
(
index
.
data
(
ModelRoles
.
InternalDataRole
))
def
__showFit
(
self
,
node
):
view
=
self
.
__fitViews
.
get
(
node
)
...
...
@@ -318,7 +306,7 @@ class XsocsGui(Qt.QMainWindow):
model
.
appendGroup
(
rootNode
)
self
.
__project
=
project
self
.
__showIntensity
()
#
self.__showIntensity()
return
True
...
...
kmap/gui/process/FitWidget.py
View file @
13d0b38d
This diff is collapsed.
Click to expand it.
kmap/gui/view/QspaceView.py
View file @
13d0b38d
This diff is collapsed.
Click to expand it.
kmap/gui/widgets/XsocsPlot2D.py
View file @
13d0b38d
...
...
@@ -49,7 +49,7 @@ from ..widgets.Containers import GroupBox
from
..widgets.RangeSlider
import
RangeSlider
from
..widgets.PointWidget
import
PointWidget
from
...gui.icons
import
getQIcon
as
getKmapIcon
from
..widgets.Input
import
StyledLineEdit
,
Styled
Label
from
..widgets.Input
import
StyledLineEdit
,
FixedSize
Label
_defaultNColors
=
256
...
...
@@ -600,7 +600,7 @@ class XsocsPlot2D(PlotWindow):
except
AttributeError
:
action
=
self
.
copyAction
action
.
setIconVisibleInMenu
(
True
)
menu
.
addAction
(
action
)
menu
.
addAction
(
action
)
# grid action
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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