Struct cxx_qt_lib::QTime
source · #[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.
Trait Implementations§
source§impl ExternType for QTime
impl ExternType for QTime
source§impl Ord for QTime
impl Ord for QTime
source§impl PartialEq for QTime
impl PartialEq for QTime
source§impl PartialOrd for QTime
impl PartialOrd for QTime
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more