#[repr(C)]pub struct QTime { /* private fields */ }
Expand description
The QTime class provides clock time functions.
Implementations§
Source§impl QTime
impl QTime
Sourcepub fn msecs_since_start_of_day(&self) -> i32
pub fn msecs_since_start_of_day(&self) -> i32
Returns the number of msecs since the start of the day, i.e. since 00:00:00.
Source§impl QTime
impl QTime
Sourcepub fn format_enum(&self, format: DateFormat) -> QString
pub fn format_enum(&self, format: DateFormat) -> QString
Returns the time as a string. The format parameter determines the format of the string.
Source§impl QTime
impl QTime
Sourcepub fn current_time() -> Self
pub fn current_time() -> Self
Returns the current time as reported by the system clock.
Sourcepub fn from_msecs_since_start_of_day(msecs: i32) -> Self
pub fn from_msecs_since_start_of_day(msecs: i32) -> Self
Returns a new QTime instance with the time set to the number of msecs since the start of the day, i.e. since 00:00:00.
Sourcepub fn from_string(string: &QString, format: &QString) -> Self
pub fn from_string(string: &QString, format: &QString) -> Self
Returns the QTime represented by the string, using the format given, or an invalid time if the string cannot be parsed.
Sourcepub fn from_string_enum(string: &QString, format: DateFormat) -> Self
pub fn from_string_enum(string: &QString, format: DateFormat) -> Self
Returns the time represented in the string as a QTime using the format given, or an invalid time if this is not possible.
Sourcepub fn msecs_to(&self, t: Self) -> i32
pub fn msecs_to(&self, t: Self) -> i32
Returns the number of milliseconds from this time to t. If t is earlier than this time, the number of milliseconds returned is negative.
Sourcepub fn new(h: i32, m: i32, s: i32, ms: i32) -> Self
pub fn new(h: i32, m: i32, s: i32, ms: i32) -> Self
Constructs a time with hour h, minute m, seconds s and milliseconds ms.