Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QTimePattern Class Reference

A description of a serialization format for a time. More...

#include <qttemporalpattern_p.h>

Collaboration diagram for QTimePattern:

Public Member Functions

bool isValid () const noexcept
void setLocale (const QLocale &loc)
const QLocalelocale () const noexcept
 Returns the current locale in use by this pattern.
Q_CORE_EXPORT QtTemporalPattern::ParseResult< QTimeparse (QStringView text, QTime defaults={}) const
 Parse and return the time represented by text.
Q_CORE_EXPORT QString serialize (const QTime &time) const
 Serialize the given time to a string representation.

Static Public Member Functions

static Q_CORE_EXPORT QTimePattern fromQtFormat (QStringView format)
 Construct a QTimePattern described by the given format string.
static QTimePattern forLocale (const QLocale &locale, QLocale::FormatType format=QLocale::LongFormat)
 Construct a QTimePattern appropriate to the given locale.

Detailed Description

A description of a serialization format for a time.

Since
6.12

Definition at line 243 of file qttemporalpattern_p.h.

Member Function Documentation

◆ forLocale()

QTimePattern QTimePattern::forLocale ( const QLocale & locale,
QLocale::FormatType format = QLocale::LongFormat )
inlinestatic

Construct a QTimePattern appropriate to the given locale.

The format can be used to select how compact or expansive the pattern is.

See also
fromQtFormat

Definition at line 269 of file qttemporalpattern_p.h.

◆ fromQtFormat()

QTimePattern QTimePattern::fromQtFormat ( QStringView format)
static

Construct a QTimePattern described by the given format string.

See also
forLocale()

Definition at line 1020 of file qttemporalpattern.cpp.

◆ isValid()

bool QTimePattern::isValid ( ) const
inlinenoexcept

{is-valid} {time}

Definition at line 256 of file qttemporalpattern_p.h.

References QtTemporalPattern::Clear.

◆ locale()

const QLocale & QTimePattern::locale ( ) const
inlinenoexcept

Returns the current locale in use by this pattern.

See also
setLocale()

Definition at line 261 of file qttemporalpattern_p.h.

◆ parse()

QtTemporalPattern::ParseResult< QTime > QTimePattern::parse ( QStringView text,
QTime defaults = {} ) const

Parse and return the time represented by text.

parser-defaults

Definition at line 990 of file qttemporalpattern.cpp.

◆ serialize()

QString QTimePattern::serialize ( const QTime & time) const

Serialize the given time to a string representation.

Definition at line 1008 of file qttemporalpattern.cpp.

◆ setLocale()

void QTimePattern::setLocale ( const QLocale & loc)
inline

set-locale

Definition at line 260 of file qttemporalpattern_p.h.


The documentation for this class was generated from the following files: