pub struct QDateTime { /* private fields */ }Expand description
C++ class: QDateTime.
Implementations§
Source§impl QDateTime
impl QDateTime
Sourcepub unsafe fn add_days(&self, days: c_longlong) -> CppBox<QDateTime>
pub unsafe fn add_days(&self, days: c_longlong) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::addDays(long long days) const.
Sourcepub unsafe fn add_m_secs(&self, msecs: c_longlong) -> CppBox<QDateTime>
pub unsafe fn add_m_secs(&self, msecs: c_longlong) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::addMSecs(long long msecs) const.
Sourcepub unsafe fn add_months(&self, months: c_int) -> CppBox<QDateTime>
pub unsafe fn add_months(&self, months: c_int) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::addMonths(int months) const.
Sourcepub unsafe fn add_secs(&self, secs: c_longlong) -> CppBox<QDateTime>
pub unsafe fn add_secs(&self, secs: c_longlong) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::addSecs(long long secs) const.
Sourcepub unsafe fn add_years(&self, years: c_int) -> CppBox<QDateTime>
pub unsafe fn add_years(&self, years: c_int) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::addYears(int years) const.
Sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QDateTime>>,
) -> Ref<QDateTime>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QDateTime>>, ) -> Ref<QDateTime>
Calls C++ function: QDateTime& QDateTime::operator=(const QDateTime& other).
Sourcepub unsafe fn current_date_time() -> CppBox<QDateTime>
pub unsafe fn current_date_time() -> CppBox<QDateTime>
Calls C++ function: static QDateTime QDateTime::currentDateTime().
Sourcepub unsafe fn current_date_time_utc() -> CppBox<QDateTime>
pub unsafe fn current_date_time_utc() -> CppBox<QDateTime>
Calls C++ function: static QDateTime QDateTime::currentDateTimeUtc().
Sourcepub unsafe fn current_m_secs_since_epoch() -> c_longlong
pub unsafe fn current_m_secs_since_epoch() -> c_longlong
Calls C++ function: static long long QDateTime::currentMSecsSinceEpoch().
Sourcepub unsafe fn current_secs_since_epoch() -> c_longlong
pub unsafe fn current_secs_since_epoch() -> c_longlong
Calls C++ function: static long long QDateTime::currentSecsSinceEpoch().
Sourcepub unsafe fn days_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong
pub unsafe fn days_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong
Calls C++ function: long long QDateTime::daysTo(const QDateTime& arg1) const.
Sourcepub unsafe fn from_m_secs_since_epoch_longlong(
msecs: c_longlong,
) -> CppBox<QDateTime>
pub unsafe fn from_m_secs_since_epoch_longlong( msecs: c_longlong, ) -> CppBox<QDateTime>
Calls C++ function: static QDateTime QDateTime::fromMSecsSinceEpoch(long long msecs).
Sourcepub unsafe fn from_m_secs_since_epoch_longlong_time_spec_int(
msecs: c_longlong,
spec: TimeSpec,
offset_from_utc: c_int,
) -> CppBox<QDateTime>
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 = …).
Sourcepub unsafe fn from_m_secs_since_epoch_longlong_q_time_zone(
msecs: c_longlong,
time_zone: impl CastInto<Ref<QTimeZone>>,
) -> CppBox<QDateTime>
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).
Sourcepub unsafe fn from_m_secs_since_epoch_longlong_time_spec(
msecs: c_longlong,
spec: TimeSpec,
) -> CppBox<QDateTime>
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).
Sourcepub unsafe fn from_secs_since_epoch_longlong_time_spec_int(
secs: c_longlong,
spe: TimeSpec,
offset_from_utc: c_int,
) -> CppBox<QDateTime>
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 = …).
Sourcepub unsafe fn from_secs_since_epoch_longlong_q_time_zone(
secs: c_longlong,
time_zone: impl CastInto<Ref<QTimeZone>>,
) -> CppBox<QDateTime>
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).
Sourcepub unsafe fn from_secs_since_epoch_longlong_time_spec(
secs: c_longlong,
spe: TimeSpec,
) -> CppBox<QDateTime>
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 = …).
Sourcepub unsafe fn from_secs_since_epoch_longlong(
secs: c_longlong,
) -> CppBox<QDateTime>
pub unsafe fn from_secs_since_epoch_longlong( secs: c_longlong, ) -> CppBox<QDateTime>
Calls C++ function: static QDateTime QDateTime::fromSecsSinceEpoch(long long secs).
Sourcepub unsafe fn from_string_q_string_date_format(
s: impl CastInto<Ref<QString>>,
f: DateFormat,
) -> CppBox<QDateTime>
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 = …).
Sourcepub unsafe fn from_string_2_q_string(
s: impl CastInto<Ref<QString>>,
format: impl CastInto<Ref<QString>>,
) -> CppBox<QDateTime>
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).
Sourcepub 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>
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).
Sourcepub unsafe fn from_string_q_string(
s: impl CastInto<Ref<QString>>,
) -> CppBox<QDateTime>
pub unsafe fn from_string_q_string( s: impl CastInto<Ref<QString>>, ) -> CppBox<QDateTime>
Calls C++ function: static QDateTime QDateTime::fromString(const QString& s).
Sourcepub unsafe fn from_time_t_uint(
secs_since1_jan1970_u_t_c: c_uint,
) -> CppBox<QDateTime>
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).
Sourcepub 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>
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 = …).
Sourcepub 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>
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).
Sourcepub unsafe fn from_time_t_uint_time_spec(
secs_since1_jan1970_u_t_c: c_uint,
spec: TimeSpec,
) -> CppBox<QDateTime>
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).
Sourcepub unsafe fn is_daylight_time(&self) -> bool
pub unsafe fn is_daylight_time(&self) -> bool
Calls C++ function: bool QDateTime::isDaylightTime() const.
Sourcepub unsafe fn msecs_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong
pub unsafe fn msecs_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong
Calls C++ function: long long QDateTime::msecsTo(const QDateTime& arg1) const.
Sourcepub unsafe fn new() -> CppBox<QDateTime>
pub unsafe fn new() -> CppBox<QDateTime>
Calls C++ function: [constructor] void QDateTime::QDateTime().
Sourcepub unsafe fn from_q_date(arg1: impl CastInto<Ref<QDate>>) -> CppBox<QDateTime>
pub unsafe fn from_q_date(arg1: impl CastInto<Ref<QDate>>) -> CppBox<QDateTime>
Calls C++ function: [constructor] void QDateTime::QDateTime(const QDate& arg1).
Sourcepub unsafe fn from_q_date_q_time_time_spec(
arg1: impl CastInto<Ref<QDate>>,
arg2: impl CastInto<Ref<QTime>>,
spec: TimeSpec,
) -> CppBox<QDateTime>
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 = …).
Sourcepub 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>
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).
Sourcepub 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>
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).
Sourcepub unsafe fn from_q_date_q_time(
arg1: impl CastInto<Ref<QDate>>,
arg2: impl CastInto<Ref<QTime>>,
) -> CppBox<QDateTime>
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).
Sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QDateTime>>,
) -> CppBox<QDateTime>
pub unsafe fn new_copy( other: impl CastInto<Ref<QDateTime>>, ) -> CppBox<QDateTime>
Calls C++ function: [constructor] void QDateTime::QDateTime(const QDateTime& other).
Sourcepub unsafe fn offset_from_utc(&self) -> c_int
pub unsafe fn offset_from_utc(&self) -> c_int
Calls C++ function: int QDateTime::offsetFromUtc() const.
Sourcepub unsafe fn secs_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong
pub unsafe fn secs_to(&self, arg1: impl CastInto<Ref<QDateTime>>) -> c_longlong
Calls C++ function: long long QDateTime::secsTo(const QDateTime& arg1) const.
Sourcepub unsafe fn set_date(&self, date: impl CastInto<Ref<QDate>>)
pub unsafe fn set_date(&self, date: impl CastInto<Ref<QDate>>)
Calls C++ function: void QDateTime::setDate(const QDate& date).
Sourcepub unsafe fn set_m_secs_since_epoch(&self, msecs: c_longlong)
pub unsafe fn set_m_secs_since_epoch(&self, msecs: c_longlong)
Calls C++ function: void QDateTime::setMSecsSinceEpoch(long long msecs).
Sourcepub unsafe fn set_offset_from_utc(&self, offset_seconds: c_int)
pub unsafe fn set_offset_from_utc(&self, offset_seconds: c_int)
Calls C++ function: void QDateTime::setOffsetFromUtc(int offsetSeconds).
Sourcepub unsafe fn set_secs_since_epoch(&self, secs: c_longlong)
pub unsafe fn set_secs_since_epoch(&self, secs: c_longlong)
Calls C++ function: void QDateTime::setSecsSinceEpoch(long long secs).
Sourcepub unsafe fn set_time(&self, time: impl CastInto<Ref<QTime>>)
pub unsafe fn set_time(&self, time: impl CastInto<Ref<QTime>>)
Calls C++ function: void QDateTime::setTime(const QTime& time).
Sourcepub unsafe fn set_time_spec(&self, spec: TimeSpec)
pub unsafe fn set_time_spec(&self, spec: TimeSpec)
Calls C++ function: void QDateTime::setTimeSpec(Qt::TimeSpec spec).
Sourcepub unsafe fn set_time_t(&self, secs_since1_jan1970_u_t_c: c_uint)
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).
Sourcepub unsafe fn set_time_zone(&self, to_zone: impl CastInto<Ref<QTimeZone>>)
pub unsafe fn set_time_zone(&self, to_zone: impl CastInto<Ref<QTimeZone>>)
Calls C++ function: void QDateTime::setTimeZone(const QTimeZone& toZone).
Sourcepub unsafe fn set_utc_offset(&self, seconds: c_int)
pub unsafe fn set_utc_offset(&self, seconds: c_int)
Calls C++ function: void QDateTime::setUtcOffset(int seconds).
Sourcepub unsafe fn swap(&self, other: impl CastInto<Ref<QDateTime>>)
pub unsafe fn swap(&self, other: impl CastInto<Ref<QDateTime>>)
Calls C++ function: void QDateTime::swap(QDateTime& other).
Sourcepub unsafe fn time_spec(&self) -> TimeSpec
pub unsafe fn time_spec(&self) -> TimeSpec
Calls C++ function: Qt::TimeSpec QDateTime::timeSpec() const.
Sourcepub unsafe fn time_zone(&self) -> CppBox<QTimeZone>
pub unsafe fn time_zone(&self) -> CppBox<QTimeZone>
Calls C++ function: QTimeZone QDateTime::timeZone() const.
Sourcepub unsafe fn time_zone_abbreviation(&self) -> CppBox<QString>
pub unsafe fn time_zone_abbreviation(&self) -> CppBox<QString>
Calls C++ function: QString QDateTime::timeZoneAbbreviation() const.
Sourcepub unsafe fn to_local_time(&self) -> CppBox<QDateTime>
pub unsafe fn to_local_time(&self) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::toLocalTime() const.
Sourcepub unsafe fn to_m_secs_since_epoch(&self) -> c_longlong
pub unsafe fn to_m_secs_since_epoch(&self) -> c_longlong
Calls C++ function: long long QDateTime::toMSecsSinceEpoch() const.
Sourcepub unsafe fn to_offset_from_utc(
&self,
offset_seconds: c_int,
) -> CppBox<QDateTime>
pub unsafe fn to_offset_from_utc( &self, offset_seconds: c_int, ) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::toOffsetFromUtc(int offsetSeconds) const.
Sourcepub unsafe fn to_secs_since_epoch(&self) -> c_longlong
pub unsafe fn to_secs_since_epoch(&self) -> c_longlong
Calls C++ function: long long QDateTime::toSecsSinceEpoch() const.
Sourcepub unsafe fn to_string_date_format(
&self,
format: DateFormat,
) -> CppBox<QString>
pub unsafe fn to_string_date_format( &self, format: DateFormat, ) -> CppBox<QString>
Calls C++ function: QString QDateTime::toString(Qt::DateFormat format = …) const.
Sourcepub unsafe fn to_string_q_string(
&self,
format: impl CastInto<Ref<QString>>,
) -> CppBox<QString>
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.
Sourcepub unsafe fn to_string_q_string_q_calendar(
&self,
format: impl CastInto<Ref<QString>>,
cal: impl CastInto<Ref<QCalendar>>,
) -> CppBox<QString>
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.
Sourcepub unsafe fn to_string_q_string_view(
&self,
format: impl CastInto<Ref<QStringView>>,
) -> CppBox<QString>
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.
Sourcepub unsafe fn to_string_q_string_view_q_calendar(
&self,
format: impl CastInto<Ref<QStringView>>,
cal: impl CastInto<Ref<QCalendar>>,
) -> CppBox<QString>
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.
Sourcepub unsafe fn to_string(&self) -> CppBox<QString>
pub unsafe fn to_string(&self) -> CppBox<QString>
Calls C++ function: QString QDateTime::toString() const.
Sourcepub unsafe fn to_time_spec(&self, spec: TimeSpec) -> CppBox<QDateTime>
pub unsafe fn to_time_spec(&self, spec: TimeSpec) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::toTimeSpec(Qt::TimeSpec spec) const.
Sourcepub unsafe fn to_time_t(&self) -> c_uint
pub unsafe fn to_time_t(&self) -> c_uint
Calls C++ function: unsigned int QDateTime::toTime_t() const.
Sourcepub unsafe fn to_time_zone(
&self,
to_zone: impl CastInto<Ref<QTimeZone>>,
) -> CppBox<QDateTime>
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.
Sourcepub unsafe fn to_u_t_c(&self) -> CppBox<QDateTime>
pub unsafe fn to_u_t_c(&self) -> CppBox<QDateTime>
Calls C++ function: QDateTime QDateTime::toUTC() const.
Sourcepub unsafe fn utc_offset(&self) -> c_int
pub unsafe fn utc_offset(&self) -> c_int
Calls C++ function: int QDateTime::utcOffset() const.