Skip to main content

QDateTime

Struct QDateTime 

Source
pub struct QDateTime { /* private fields */ }
Expand description

C++ class: QDateTime.

Implementations§

Source§

impl QDateTime

Source

pub unsafe fn add_days(&self, days: c_longlong) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::addDays(long long days) const.

Source

pub unsafe fn add_m_secs(&self, msecs: c_longlong) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::addMSecs(long long msecs) const.

Source

pub unsafe fn add_months(&self, months: c_int) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::addMonths(int months) const.

Source

pub unsafe fn add_secs(&self, secs: c_longlong) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::addSecs(long long secs) const.

Source

pub unsafe fn add_years(&self, years: c_int) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::addYears(int years) const.

Source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QDateTime>>, ) -> Ref<QDateTime>

Calls C++ function: QDateTime& QDateTime::operator=(const QDateTime& other).

Source

pub unsafe fn current_date_time() -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::currentDateTime().

Source

pub unsafe fn current_date_time_utc() -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::currentDateTimeUtc().

Source

pub unsafe fn current_m_secs_since_epoch() -> c_longlong

Calls C++ function: static long long QDateTime::currentMSecsSinceEpoch().

Source

pub unsafe fn current_secs_since_epoch() -> c_longlong

Calls C++ function: static long long QDateTime::currentSecsSinceEpoch().

Source

pub unsafe fn date(&self) -> CppBox<QDate>

Calls C++ function: QDate QDateTime::date() const.

Source

pub unsafe fn days_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong

Calls C++ function: long long QDateTime::daysTo(const QDateTime& arg1) const.

Source

pub unsafe fn from_m_secs_since_epoch_longlong( msecs: c_longlong, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromMSecsSinceEpoch(long long msecs).

Source

pub unsafe fn from_m_secs_since_epoch_longlong_time_spec_int( msecs: c_longlong, spec: TimeSpec, offset_from_utc: c_int, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromMSecsSinceEpoch(long long msecs, Qt::TimeSpec spec, int offsetFromUtc = …).

Source

pub unsafe fn from_m_secs_since_epoch_longlong_q_time_zone( msecs: c_longlong, time_zone: impl CastInto<Ref<QTimeZone>>, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromMSecsSinceEpoch(long long msecs, const QTimeZone& timeZone).

Source

pub unsafe fn from_m_secs_since_epoch_longlong_time_spec( msecs: c_longlong, spec: TimeSpec, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromMSecsSinceEpoch(long long msecs, Qt::TimeSpec spec).

Source

pub unsafe fn from_secs_since_epoch_longlong_time_spec_int( secs: c_longlong, spe: TimeSpec, offset_from_utc: c_int, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromSecsSinceEpoch(long long secs, Qt::TimeSpec spe = …, int offsetFromUtc = …).

Source

pub unsafe fn from_secs_since_epoch_longlong_q_time_zone( secs: c_longlong, time_zone: impl CastInto<Ref<QTimeZone>>, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromSecsSinceEpoch(long long secs, const QTimeZone& timeZone).

Source

pub unsafe fn from_secs_since_epoch_longlong_time_spec( secs: c_longlong, spe: TimeSpec, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromSecsSinceEpoch(long long secs, Qt::TimeSpec spe = …).

Source

pub unsafe fn from_secs_since_epoch_longlong( secs: c_longlong, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromSecsSinceEpoch(long long secs).

Source

pub unsafe fn from_string_q_string_date_format( s: impl CastInto<Ref<QString>>, f: DateFormat, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromString(const QString& s, Qt::DateFormat f = …).

Source

pub unsafe fn from_string_2_q_string( s: impl CastInto<Ref<QString>>, format: impl CastInto<Ref<QString>>, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromString(const QString& s, const QString& format).

Source

pub unsafe fn from_string_2_q_string_q_calendar( s: impl CastInto<Ref<QString>>, format: impl CastInto<Ref<QString>>, cal: impl CastInto<Ref<QCalendar>>, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromString(const QString& s, const QString& format, QCalendar cal).

Source

pub unsafe fn from_string_q_string( s: impl CastInto<Ref<QString>>, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromString(const QString& s).

Source

pub unsafe fn from_time_t_uint( secs_since1_jan1970_u_t_c: c_uint, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromTime_t(unsigned int secsSince1Jan1970UTC).

Source

pub unsafe fn from_time_t_uint_time_spec_int( secs_since1_jan1970_u_t_c: c_uint, spec: TimeSpec, offset_from_utc: c_int, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromTime_t(unsigned int secsSince1Jan1970UTC, Qt::TimeSpec spec, int offsetFromUtc = …).

Source

pub unsafe fn from_time_t_uint_q_time_zone( secs_since1_jan1970_u_t_c: c_uint, time_zone: impl CastInto<Ref<QTimeZone>>, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromTime_t(unsigned int secsSince1Jan1970UTC, const QTimeZone& timeZone).

Source

pub unsafe fn from_time_t_uint_time_spec( secs_since1_jan1970_u_t_c: c_uint, spec: TimeSpec, ) -> CppBox<QDateTime>

Calls C++ function: static QDateTime QDateTime::fromTime_t(unsigned int secsSince1Jan1970UTC, Qt::TimeSpec spec).

Source

pub unsafe fn is_daylight_time(&self) -> bool

Calls C++ function: bool QDateTime::isDaylightTime() const.

Source

pub unsafe fn is_null(&self) -> bool

Calls C++ function: bool QDateTime::isNull() const.

Source

pub unsafe fn is_valid(&self) -> bool

Calls C++ function: bool QDateTime::isValid() const.

Source

pub unsafe fn msecs_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong

Calls C++ function: long long QDateTime::msecsTo(const QDateTime& arg1) const.

Source

pub unsafe fn new() -> CppBox<QDateTime>

Calls C++ function: [constructor] void QDateTime::QDateTime().

Source

pub unsafe fn from_q_date(arg1: impl CastInto<Ref<QDate>>) -> CppBox<QDateTime>

Calls C++ function: [constructor] void QDateTime::QDateTime(const QDate& arg1).

Source

pub unsafe fn from_q_date_q_time_time_spec( arg1: impl CastInto<Ref<QDate>>, arg2: impl CastInto<Ref<QTime>>, spec: TimeSpec, ) -> CppBox<QDateTime>

Calls C++ function: [constructor] void QDateTime::QDateTime(const QDate& arg1, const QTime& arg2, Qt::TimeSpec spec = …).

Source

pub unsafe fn from_q_date_q_time_time_spec_int( date: impl CastInto<Ref<QDate>>, time: impl CastInto<Ref<QTime>>, spec: TimeSpec, offset_seconds: c_int, ) -> CppBox<QDateTime>

Calls C++ function: [constructor] void QDateTime::QDateTime(const QDate& date, const QTime& time, Qt::TimeSpec spec, int offsetSeconds).

Source

pub unsafe fn from_q_date_q_time_q_time_zone( date: impl CastInto<Ref<QDate>>, time: impl CastInto<Ref<QTime>>, time_zone: impl CastInto<Ref<QTimeZone>>, ) -> CppBox<QDateTime>

Calls C++ function: [constructor] void QDateTime::QDateTime(const QDate& date, const QTime& time, const QTimeZone& timeZone).

Source

pub unsafe fn from_q_date_q_time( arg1: impl CastInto<Ref<QDate>>, arg2: impl CastInto<Ref<QTime>>, ) -> CppBox<QDateTime>

Calls C++ function: [constructor] void QDateTime::QDateTime(const QDate& arg1, const QTime& arg2).

Source

pub unsafe fn new_copy( other: impl CastInto<Ref<QDateTime>>, ) -> CppBox<QDateTime>

Calls C++ function: [constructor] void QDateTime::QDateTime(const QDateTime& other).

Source

pub unsafe fn offset_from_utc(&self) -> c_int

Calls C++ function: int QDateTime::offsetFromUtc() const.

Source

pub unsafe fn secs_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong

Calls C++ function: long long QDateTime::secsTo(const QDateTime& arg1) const.

Source

pub unsafe fn set_date(&self, date: impl CastInto<Ref<QDate>>)

Calls C++ function: void QDateTime::setDate(const QDate& date).

Source

pub unsafe fn set_m_secs_since_epoch(&self, msecs: c_longlong)

Calls C++ function: void QDateTime::setMSecsSinceEpoch(long long msecs).

Source

pub unsafe fn set_offset_from_utc(&self, offset_seconds: c_int)

Calls C++ function: void QDateTime::setOffsetFromUtc(int offsetSeconds).

Source

pub unsafe fn set_secs_since_epoch(&self, secs: c_longlong)

Calls C++ function: void QDateTime::setSecsSinceEpoch(long long secs).

Source

pub unsafe fn set_time(&self, time: impl CastInto<Ref<QTime>>)

Calls C++ function: void QDateTime::setTime(const QTime& time).

Source

pub unsafe fn set_time_spec(&self, spec: TimeSpec)

Calls C++ function: void QDateTime::setTimeSpec(Qt::TimeSpec spec).

Source

pub unsafe fn set_time_t(&self, secs_since1_jan1970_u_t_c: c_uint)

Calls C++ function: void QDateTime::setTime_t(unsigned int secsSince1Jan1970UTC).

Source

pub unsafe fn set_time_zone(&self, to_zone: impl CastInto<Ref<QTimeZone>>)

Calls C++ function: void QDateTime::setTimeZone(const QTimeZone& toZone).

Source

pub unsafe fn set_utc_offset(&self, seconds: c_int)

Calls C++ function: void QDateTime::setUtcOffset(int seconds).

Source

pub unsafe fn swap(&self, other: impl CastInto<Ref<QDateTime>>)

Calls C++ function: void QDateTime::swap(QDateTime& other).

Source

pub unsafe fn time(&self) -> CppBox<QTime>

Calls C++ function: QTime QDateTime::time() const.

Source

pub unsafe fn time_spec(&self) -> TimeSpec

Calls C++ function: Qt::TimeSpec QDateTime::timeSpec() const.

Source

pub unsafe fn time_zone(&self) -> CppBox<QTimeZone>

Calls C++ function: QTimeZone QDateTime::timeZone() const.

Source

pub unsafe fn time_zone_abbreviation(&self) -> CppBox<QString>

Calls C++ function: QString QDateTime::timeZoneAbbreviation() const.

Source

pub unsafe fn to_local_time(&self) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::toLocalTime() const.

Source

pub unsafe fn to_m_secs_since_epoch(&self) -> c_longlong

Calls C++ function: long long QDateTime::toMSecsSinceEpoch() const.

Source

pub unsafe fn to_offset_from_utc( &self, offset_seconds: c_int, ) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::toOffsetFromUtc(int offsetSeconds) const.

Source

pub unsafe fn to_secs_since_epoch(&self) -> c_longlong

Calls C++ function: long long QDateTime::toSecsSinceEpoch() const.

Source

pub unsafe fn to_string_date_format( &self, format: DateFormat, ) -> CppBox<QString>

Calls C++ function: QString QDateTime::toString(Qt::DateFormat format = …) const.

Source

pub unsafe fn to_string_q_string( &self, format: impl CastInto<Ref<QString>>, ) -> CppBox<QString>

Calls C++ function: QString QDateTime::toString(const QString& format) const.

Source

pub unsafe fn to_string_q_string_q_calendar( &self, format: impl CastInto<Ref<QString>>, cal: impl CastInto<Ref<QCalendar>>, ) -> CppBox<QString>

Calls C++ function: QString QDateTime::toString(const QString& format, QCalendar cal) const.

Source

pub unsafe fn to_string_q_string_view( &self, format: impl CastInto<Ref<QStringView>>, ) -> CppBox<QString>

Calls C++ function: QString QDateTime::toString(QStringView format) const.

Source

pub unsafe fn to_string_q_string_view_q_calendar( &self, format: impl CastInto<Ref<QStringView>>, cal: impl CastInto<Ref<QCalendar>>, ) -> CppBox<QString>

Calls C++ function: QString QDateTime::toString(QStringView format, QCalendar cal) const.

Source

pub unsafe fn to_string(&self) -> CppBox<QString>

Calls C++ function: QString QDateTime::toString() const.

Source

pub unsafe fn to_time_spec(&self, spec: TimeSpec) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::toTimeSpec(Qt::TimeSpec spec) const.

Source

pub unsafe fn to_time_t(&self) -> c_uint

Calls C++ function: unsigned int QDateTime::toTime_t() const.

Source

pub unsafe fn to_time_zone( &self, to_zone: impl CastInto<Ref<QTimeZone>>, ) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::toTimeZone(const QTimeZone& toZone) const.

Source

pub unsafe fn to_u_t_c(&self) -> CppBox<QDateTime>

Calls C++ function: QDateTime QDateTime::toUTC() const.

Source

pub unsafe fn utc_offset(&self) -> c_int

Calls C++ function: int QDateTime::utcOffset() const.

Trait Implementations§

Source§

impl CppDeletable for QDateTime

Source§

unsafe fn delete(&self)

Calls C++ function: [destructor] void QDateTime::~QDateTime().

Source§

impl Ge<Ref<QDateTime>> for QDateTime

Source§

unsafe fn ge(&self, other: &Ref<QDateTime>) -> bool

Calls C++ function: bool QDateTime::operator>=(const QDateTime& other) const.

Source§

impl Gt<Ref<QDateTime>> for QDateTime

Source§

unsafe fn gt(&self, other: &Ref<QDateTime>) -> bool

Calls C++ function: bool QDateTime::operator>(const QDateTime& other) const.

Source§

impl Le<Ref<QDateTime>> for QDateTime

Source§

unsafe fn le(&self, other: &Ref<QDateTime>) -> bool

Calls C++ function: bool QDateTime::operator<=(const QDateTime& other) const.

Source§

impl Lt<Ref<QDateTime>> for QDateTime

Source§

unsafe fn lt(&self, other: &Ref<QDateTime>) -> bool

Calls C++ function: bool QDateTime::operator<(const QDateTime& other) const.

Source§

impl PartialEq<Ref<QDateTime>> for QDateTime

Source§

fn eq(&self, other: &Ref<QDateTime>) -> bool

Calls C++ function: bool QDateTime::operator==(const QDateTime& other) const.

1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

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, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. 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> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

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

Source§

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>,

Source§

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.