[−]Struct qmetaobject::qttypes::QDateTime
Wrapper around Qt's QDateTime class
Methods
impl QDateTime
[src]
pub fn from_date(date: QDate) -> Self
[src]
Constructs a QDateTime from a QDate. Refer to the documentation for QDateTime's constructor using QDate.
pub fn from_date_time_local_timezone(date: QDate, time: QTime) -> Self
[src]
Constructs a QDateTime from a QDate and a QTime, using the current system timezone.
Equivalent to the C++ code QDateTime(date, time)
.
Refer to the documentation for QDateTime's constructor using QDate, QTime and Qt::TimeSpec.
pub fn get_date(&self) -> QDate
[src]
Gets the date component from a QDateTime. Refer to the documentation for QDateTime::date.
pub fn get_time(&self) -> QTime
[src]
Gets the time component from a QDateTime. Refer to the documentation for QDateTime::time.
pub fn get_date_time(&self) -> (QDate, QTime)
[src]
Convenience function for obtaining both date and time components.
pub fn is_valid(&self) -> bool
[src]
Refer to the Qt documentation for QDateTime::isValid.
Trait Implementations
impl QMetaType for QDateTime
[src]
fn register(_name: Option<&CStr>) -> i32
[src]
fn id() -> i32
[src]
fn to_qvariant(&self) -> QVariant
[src]
fn from_qvariant(variant: QVariant) -> Option<Self>
[src]
const CONVERSION_TO_STRING: Option<fn(_: &Self) -> QString>
[src]
const CONVERSION_FROM_STRING: Option<fn(_: &QString) -> Self>
[src]
impl Drop for QDateTime
fn drop(&mut self)
impl From<QDateTime> for QVariant
[src]
impl Clone for QDateTime
fn clone(&self) -> Self
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Default for QDateTime
fn default() -> Self
impl Eq for QDateTime
impl Ord for QDateTime
fn cmp(&self, other: &QDateTime) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<QDateTime> for QDateTime
impl PartialOrd<QDateTime> for QDateTime
fn lt(&self, other: &QDateTime) -> bool
fn gt(&self, other: &QDateTime) -> bool
fn le(&self, other: &QDateTime) -> bool
fn ge(&self, other: &QDateTime) -> bool
fn partial_cmp(&self, other: &QDateTime) -> Option<Ordering>
impl StructuralEq for QDateTime
Auto Trait Implementations
impl Send for QDateTime
impl Sync for QDateTime
impl Unpin for QDateTime
impl UnwindSafe for QDateTime
impl RefUnwindSafe for QDateTime
Blanket Implementations
impl<T> QMetaType for T where
T: QGadget + Clone + Default + 'static,
[src]
T: QGadget + Clone + Default + 'static,
fn register(Option<&CStr>) -> i32
[src]
fn id() -> i32
[src]
fn to_qvariant(&self) -> QVariant
[src]
fn from_qvariant(variant: QVariant) -> Option<Self>
[src]
const CONVERSION_TO_STRING: Option<fn(_: &Self) -> QString>
[src]
const CONVERSION_FROM_STRING: Option<fn(_: &QString) -> Self>
[src]
impl<T> PropertyType for T where
T: QMetaType,
[src]
T: QMetaType,
unsafe fn pass_to_qt(&mut Self, *mut c_void)
[src]
unsafe fn read_from_qt(*const c_void) -> T
[src]
fn register_type(&CStr) -> i32
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,