Commit 9f674f49 authored by Valentin Valls's avatar Valentin Valls
Browse files

Create property for xaxis duration for consistency

parent 3863f5ab
......@@ -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")
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment