Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
bliss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
494
Issues
494
List
Boards
Labels
Service Desk
Milestones
Jira
Jira
Merge Requests
135
Merge Requests
135
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bliss
bliss
Commits
d4399e77
Commit
d4399e77
authored
Feb 13, 2020
by
Valentin Valls
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Custom item name in the tree
parent
70f3b934
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
bliss/flint/model/plot_state_model.py
bliss/flint/model/plot_state_model.py
+12
-0
bliss/flint/widgets/_property_tree_helper.py
bliss/flint/widgets/_property_tree_helper.py
+5
-2
No files found.
bliss/flint/model/plot_state_model.py
View file @
d4399e77
...
...
@@ -127,6 +127,9 @@ class DerivativeItem(ComputedCurveItem, plot_model.IncrementalComputableMixIn):
EXTRA_POINTS
=
5
"""Extra points needed before and after a single point to compute a result"""
def
name
(
self
)
->
str
:
return
"Derivative"
def
__getstate__
(
self
):
state
:
Dict
[
str
,
Any
]
=
{}
state
.
update
(
plot_model
.
ChildItem
.
__getstate__
(
self
))
...
...
@@ -252,6 +255,9 @@ class GaussianFitItem(ComputedCurveItem, plot_model.ComputableMixIn):
yy
=
fit
.
transform
(
xx
)
return
GaussianFitData
(
xx
,
yy
,
fit
)
def
name
(
self
)
->
str
:
return
"Gaussian"
def
displayName
(
self
,
axisName
,
scan
:
scan_model
.
Scan
)
->
str
:
"""Helper to reach the axis display name"""
sourceItem
=
self
.
source
()
...
...
@@ -274,6 +280,9 @@ class MaxData(NamedTuple):
class
MaxCurveItem
(
CurveStatisticItem
,
plot_model
.
IncrementalComputableMixIn
):
"""Statistic identifying the maximum location of a curve."""
def
name
(
self
)
->
str
:
return
"Max"
def
isResultValid
(
self
,
result
):
return
result
is
not
None
...
...
@@ -348,6 +357,9 @@ class MinData(NamedTuple):
class
MinCurveItem
(
CurveStatisticItem
,
plot_model
.
IncrementalComputableMixIn
):
"""Statistic identifying the minimum location of a curve."""
def
name
(
self
)
->
str
:
return
"Min"
def
isResultValid
(
self
,
result
):
return
result
is
not
None
...
...
bliss/flint/widgets/_property_tree_helper.py
View file @
d4399e77
...
...
@@ -95,8 +95,11 @@ class ScanRowItem(StandardRowItem):
icon
=
icons
.
getQIcon
(
"flint:icons/item-channel"
)
self
.
setIcon
(
icon
)
itemClass
=
plotItem
.
__class__
text
=
"%s"
%
itemClass
.
__name__
if
hasattr
(
plotItem
,
"name"
):
text
=
plotItem
.
name
()
else
:
itemClass
=
plotItem
.
__class__
text
=
"%s"
%
itemClass
.
__name__
self
.
setText
(
text
)
...
...
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