22 #include <QDataStream>
37 TTKTime(
int day,
int hour,
int min,
int sec,
int msec) noexcept;
44 bool isNull()
const noexcept;
53 inline void setDay(
int day) noexcept { m_day = day; }
57 inline void setHour(
int hour) noexcept { m_hour = hour; }
65 inline void setSecond(
int sec) noexcept { m_second = sec; }
74 inline int day()
const noexcept {
return m_day; }
95 static TTKTime fromString(
const QString &time,
const QString &format) noexcept;
99 static QString
toString(qint64 time,
const QString &format) noexcept;
104 QString
toString(
const QString &format)
const noexcept;
122 void fromValue(
int day,
int hour,
int min,
int sec,
int msec = 0) noexcept;
126 void fromValue(qint64 value) noexcept;
130 qint64 toValue()
const noexcept;
135 static qint64 formatDuration(
const QString &time) noexcept;
139 static QString formatDuration(qint64 time) noexcept;
170 stream >> x[0] >> x[1] >> x[2] >> x[3] >> x[4];
171 other.
fromValue(x[0], x[1], x[2], x[3], x[4]);
179 void initialize() noexcept;
186 int m_minute, m_second, m_msecond;
200 static qint64 currentTimestamp() noexcept;
204 static QString format(
const QString &time,
const QString &format);
208 static QString format(qint64 time,
const QString &format);
#define TTK_MODULE_EXPORT
int minute() const noexcept
void setHour(int hour) noexcept
bool isValid(const QString &data)
void fromValue(int day, int hour, int min, int sec, int msec=0) noexcept
void setDay(int day) noexcept
void setSecond(int sec) noexcept
TTK_MODULE_EXPORT void initRandom()
int millionSecond() const noexcept
TTK_MODULE_EXPORT int random(int value=RAND_MAX)
The class of the ttk date time object.
int hour() const noexcept
The namespace of the process utils.
int second() const noexcept
#define TTK_DECLARE_MODULE(Class)
void setMinute(int min) noexcept
The class of the ttk time object.
TTK_MODULE_EXPORT QString toString(Record type)
void setMillionSecond(int msec) noexcept
constexpr const _Tp & min(const _Tp &a, const _Tp &b)
friend QDataStream & operator>>(QDataStream &stream, TTKTime &other) noexcept