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

source

pub fn add_msecs(&self, ms: i32) -> QTime

Returns a QTime object containing a time ms milliseconds later than the time of this object (or earlier if ms is negative).

source§

impl QTime

source

pub fn add_secs(&self, s: i32) -> QTime

Returns a QTime object containing a time s seconds later than the time of this object (or earlier if s is negative).

source§

impl QTime

source

pub fn hour(&self) -> i32

Returns the hour part (0 to 23) of the time.

source§

impl QTime

source

pub fn is_null(&self) -> bool

Returns true if the time is null (i.e., the QTime object was constructed using the default constructor); otherwise returns false. A null time is also an invalid time.

source§

impl QTime

source

pub fn is_valid(&self) -> bool

Returns true if the time is valid; otherwise returns false.

source§

impl QTime

source

pub fn minute(&self) -> i32

Returns the minute part (0 to 59) of the time.

source§

impl QTime

source

pub fn msec(&self) -> i32

Returns the millisecond part (0 to 999) of the time.

source§

impl QTime

source

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

source

pub fn second(&self) -> i32

Returns the second part (0 to 59) of the time.

source§

impl QTime

source

pub fn set_hms(&mut self, h: i32, m: i32, s: i32, ms: i32) -> bool

Sets the time to hour h, minute m, seconds s and milliseconds ms.

source§

impl QTime

source

pub fn format(&self, format: &QString) -> QString

Returns the time as a string. The format parameter determines the format of the result string.

source§

impl QTime

source

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

source

pub fn current_time() -> Self

Returns the current time as reported by the system clock.

source

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.

source

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.

source

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.

source

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.

source

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.

source

pub fn secs_to(&self, t: Self) -> i32

Returns the number of seconds from this time to t. If t is earlier than this time, the number of seconds returned is negative.

Trait Implementations§

source§

impl Clone for QTime

source§

fn clone(&self) -> QTime

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for QTime

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for QTime

source§

fn default() -> Self

Constructs a null time object.

source§

impl Display for QTime

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl ExternType for QTime

§

type Id = (Q, T, i, m, e)

A type-level representation of the type’s C++ namespace and type name. Read more
§

type Kind = Trivial

source§

impl Ord for QTime

source§

fn cmp(&self, other: &QTime) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for QTime

source§

fn eq(&self, other: &QTime) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for QTime

source§

fn partial_cmp(&self, other: &QTime) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl QListElement for QTime

§

type TypeId = (Q, L, i, s, t, __, Q, T, i, m, e)

source§

fn append(list: &mut QList<Self>, value: Self)

source§

fn append_clone(list: &mut QList<Self>, value: &Self)

source§

fn clear(list: &mut QList<Self>)

source§

fn clone(list: &QList<Self>) -> QList<Self>

source§

fn contains(list: &QList<Self>, value: &Self) -> bool

source§

fn default() -> QList<Self>

source§

fn drop(list: &mut QList<Self>)

source§

unsafe fn get_unchecked(list: &QList<Self>, pos: isize) -> &Self

Safety Read more
source§

fn index_of(list: &QList<Self>, value: &Self) -> isize

source§

fn insert(list: &mut QList<Self>, pos: isize, value: Self)

source§

fn insert_clone(list: &mut QList<Self>, pos: isize, value: &Self)

source§

fn len(list: &QList<Self>) -> isize

source§

fn remove(list: &mut QList<Self>, pos: isize)

source§

fn reserve(list: &mut QList<Self>, size: isize)

source§

impl QSetElement for QTime

§

type TypeId = (Q, S, e, t, __, Q, T, i, m, e)

source§

fn clear(set: &mut QSet<Self>)

source§

fn clone(set: &QSet<Self>) -> QSet<Self>

source§

fn contains(set: &QSet<Self>, value: &Self) -> bool

source§

fn default() -> QSet<Self>

source§

fn drop(set: &mut QSet<Self>)

source§

unsafe fn get_unchecked(set: &QSet<Self>, pos: isize) -> &Self

Safety Read more
source§

fn insert(set: &mut QSet<Self>, value: Self)

source§

fn insert_clone(set: &mut QSet<Self>, value: &Self)

source§

fn len(set: &QSet<Self>) -> isize

source§

fn remove(set: &mut QSet<Self>, value: &Self) -> bool

source§

impl QVariantValue for QTime

source§

impl QVectorElement for QTime

§

type TypeId = (Q, V, e, c, t, o, r, __, Q, T, i, m, e)

source§

fn append(vector: &mut QVector<Self>, value: Self)

source§

fn append_clone(vector: &mut QVector<Self>, value: &Self)

source§

fn clear(vector: &mut QVector<Self>)

source§

fn clone(vector: &QVector<Self>) -> QVector<Self>

source§

fn contains(vector: &QVector<Self>, value: &Self) -> bool

source§

fn default() -> QVector<Self>

source§

fn drop(vector: &mut QVector<Self>)

source§

unsafe fn get_unchecked(vector: &QVector<Self>, pos: isize) -> &Self

Safety Read more
source§

fn index_of(vector: &QVector<Self>, value: &Self) -> isize

source§

fn insert(vector: &mut QVector<Self>, pos: isize, value: Self)

source§

fn insert_clone(vector: &mut QVector<Self>, pos: isize, value: &Self)

source§

fn len(vector: &QVector<Self>) -> isize

source§

fn remove(vector: &mut QVector<Self>, pos: isize)

source§

fn reserve(vector: &mut QVector<Self>, size: isize)

source§

impl Eq for QTime

source§

impl StructuralPartialEq for QTime

Auto Trait Implementations§

§

impl Freeze for QTime

§

impl RefUnwindSafe for QTime

§

impl Send for QTime

§

impl Sync for QTime

§

impl Unpin for QTime

§

impl UnwindSafe for QTime

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.