Inherits QObject.
|
def | __init__ |
|
def | days (self) |
|
def | hours (self) |
|
def | minutes (self) |
|
def | seconds (self) |
|
def | valid (self) |
|
def | isTotalDurationZero (self) |
|
def | setDuration |
|
def | getDisplayString (self, display_format=DurationFormat.Format.Short) |
|
def | __int__ (self) |
|
|
| durationChanged = pyqtSignal() |
|
| int |
|
| notify |
|
| bool |
|
| result |
|
A class representing a time duration.
This is primarily used as a value type to QML so we can report things
like "How long will this print take" without needing a bunch of logic
in the QML.
◆ __int__()
def UM.Qt.Duration.Duration.__int__ |
( |
|
self | ) |
|
Get an integer representation of this duration.
The integer contains the number of seconds in the duration. Convert it
back to a Duration instance by providing the number of seconds to the
constructor.
◆ getDisplayString()
def UM.Qt.Duration.Duration.getDisplayString |
( |
|
self, |
|
|
|
display_format = DurationFormat.Format.Short |
|
) |
| |
Get a string representation of this object that can be used to display
in interfaces.
This is not called toString() primarily because that conflicts with
JavaScript's toString().
:return: A human-readable string representation of this duration.
The documentation for this class was generated from the following file: