Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
9f674f49
Commit
9f674f49
authored
May 19, 2022
by
Valentin Valls
Browse files
Create property for xaxis duration for consistency
parent
3863f5ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
bliss/flint/client/plots.py
View file @
9f674f49
...
...
@@ -576,7 +576,12 @@ class TimeCurvePlot(BasePlot):
"""
self
.
submit
(
"setXName"
,
name
)
def
select_x_duration
(
self
,
second
:
int
):
@
property
def
xaxis_duration
(
self
):
return
self
.
submit
(
"xDuration"
)
@
xaxis_duration
.
setter
def
xaxis_duration
(
self
,
second
:
int
):
"""
Select the x-axis duration in second
...
...
@@ -585,6 +590,15 @@ class TimeCurvePlot(BasePlot):
"""
self
.
submit
(
"setXDuration"
,
second
)
def
select_x_duration
(
self
,
second
:
int
):
"""
Select the x-axis duration in second
Arguments:
second: Amount of seconds displayed in the x-axis
"""
self
.
xaxis_duration
=
second
@
property
def
ttl
(
self
):
return
self
.
submit
(
"ttl"
)
...
...
bliss/flint/custom_plots/time_curve_plot.py
View file @
9f674f49
...
...
@@ -96,6 +96,9 @@ class TimeCurvePlot(qt.QWidget):
def
__xdurationChanged
(
self
,
duration
):
self
.
setXDuration
(
duration
)
def
xDuration
(
self
):
return
self
.
__xduration
def
setXDuration
(
self
,
duration
):
self
.
__xdurationAction
.
setDuration
(
duration
)
self
.
__xduration
=
duration
...
...
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