#[repr(C)]pub struct QDateTime { /* private fields */ }
Expand description
Wrapper around QDateTime
class.
Implementations
sourceimpl QDateTime
impl QDateTime
sourcepub fn from_date(date: QDate) -> Self
pub fn from_date(date: QDate) -> Self
Wrapper around QDateTime(const QDateTime &other)
constructor.
sourcepub fn from_date_time_local_timezone(date: QDate, time: QTime) -> Self
pub fn from_date_time_local_timezone(date: QDate, time: QTime) -> Self
Wrapper around QDateTime(const QDate &date, const QTime &time, Qt::TimeSpec spec = Qt::LocalTime)
constructor.
Wrapper-specific
spec
is left as it is, thus it is always Qt::LocalTime
.
sourcepub fn get_date(&self) -> QDate
pub fn get_date(&self) -> QDate
Wrapper around QDateTime::date()
method.
sourcepub fn get_time(&self) -> QTime
pub fn get_time(&self) -> QTime
Wrapper around QDateTime::time()
method.
sourcepub fn get_date_time(&self) -> (QDate, QTime)
pub fn get_date_time(&self) -> (QDate, QTime)
Convenience function for obtaining both date and time components.
sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Wrapper around QDateTime::isValid()
method.
Trait Implementations
sourceimpl From<QDateTime> for QVariant
impl From<QDateTime> for QVariant
sourcefn from(a: QDateTime) -> QVariant
fn from(a: QDateTime) -> QVariant
Wrapper around QVariant(const QDateTime &)
constructor.
sourceimpl Ord for QDateTime
impl Ord for QDateTime
sourceimpl PartialOrd<QDateTime> for QDateTime
impl PartialOrd<QDateTime> for QDateTime
sourcefn lt(&self, other: &QDateTime) -> bool
fn lt(&self, other: &QDateTime) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
sourcefn gt(&self, other: &QDateTime) -> bool
fn gt(&self, other: &QDateTime) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
sourcefn le(&self, other: &QDateTime) -> bool
fn le(&self, other: &QDateTime) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for QDateTime
impl StructuralEq for QDateTime
Auto Trait Implementations
impl RefUnwindSafe for QDateTime
impl Send for QDateTime
impl Sync for QDateTime
impl Unpin for QDateTime
impl UnwindSafe for QDateTime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more