KPkPass
pass.cpp
31static const char *const passTypes[] = {"boardingPass", "coupon", "eventTicket", "generic", "storeCard"};
150 const auto valueBegin = indexOfUnquoted(catalog, QLatin1Char('"'), keyEnd + 2) + 1; // there's at least also the '='
204 qCWarning(Log) << "JSON syntax workarounds didn't help either:" << error.errorString() << error.offset;
279 return QDateTime::fromString(d->passObj.value(QLatin1StringView("expirationDate")).toString(), Qt::ISODate);
306 return QDateTime::fromString(d->passObj.value(QLatin1StringView("relevantDate")).toString(), Qt::ISODate);
354 && (QStringView(entry).mid(baseName.size()).startsWith(QLatin1Char('@')) || QStringView(entry).mid(baseName.size()).startsWith(QLatin1Char('.')))
405 file = d->zip->directory()->file(baseName + QLatin1Char('@') + QString::number(dpr) + QLatin1StringView("x.png"));
476 url.setPath(url.path() + QLatin1StringView("/v1/passes/") + passTypeIdentifier() + QLatin1Char('/') + serialNumber());
500static const char *const fieldNames[] = {"auxiliaryFields", "backFields", "headerFields", "primaryFields", "secondaryFields"};
virtual QIODevice * createDevice() const
QImage image(const QString &baseName, unsigned int devicePixelRatio=1) const
Returns an image asset of this pass.
Definition pass.cpp:392
int maximumDistance() const
Distance in meters to any of the pass locations before this pass becomes relevant.
Definition pass.cpp:299
Q_INVOKABLE QImage icon(unsigned int devicePixelRatio=1) const
Returns the pass icon.
Definition pass.cpp:430
Q_INVOKABLE QImage logo(unsigned int devicePixelRatio=1) const
Returns the pass logo.
Definition pass.cpp:435
bool hasImage(const QString &baseName) const
Returns true if an image asset with the given base name exists.
Definition pass.cpp:349
static Pass * fromData(const QByteArray &data, QObject *parent=nullptr)
Create a appropriate sub-class based on the pkpass file type.
Definition pass.cpp:550
static Pass * fromFile(const QString &fileName, QObject *parent=nullptr)
Create a appropriate sub-class based on the pkpass file type.
Definition pass.cpp:558
Q_INVOKABLE QImage thumbnail(unsigned int devicePixelRatio=1) const
Returns the thumbnail image if present.
Definition pass.cpp:455
Q_INVOKABLE QImage strip(unsigned int devicePixelRatio=1) const
Returns the strip image if present.
Definition pass.cpp:440
Q_INVOKABLE QImage background(unsigned int devicePixelRatio=1) const
Returns the background image if present.
Definition pass.cpp:445
Q_INVOKABLE QImage footer(unsigned int devicePixelRatio=1) const
Returns the footer image if present.
Definition pass.cpp:450
Q_SCRIPTABLE Q_NOREPLY void start()
char * toString(const EngineQuery &query)
void error(QWidget *parent, const QString &text, const QString &title, const KGuiItem &buttonOk, Options options=Notify)
KIOCORE_EXPORT QString dir(const QString &fileClass)
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
QImage fromData(QByteArrayView data, const char *format)
bool isNull() const const
void setDevicePixelRatio(qreal scaleFactor)
ReadOnly
QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error)
QJsonObject object() const const
QJsonValue value(QLatin1StringView key) const const
NoError
QJsonObject toObject() const const
bool isEmpty() const const
void push_back(parameter_type value)
void reserve(qsizetype size)
T value(qsizetype i) const const
QStringList uiLanguages() const const
QObject * parent() const const
const QChar at(qsizetype position) const const
QString fromUtf8(QByteArrayView str)
bool isEmpty() const const
qsizetype length() const const
QString mid(qsizetype position, qsizetype n) const const
QString number(double n, char format, int precision)
void push_back(QChar ch)
void reserve(qsizetype size)
qsizetype size() const const
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
Utf16BE
QStringView mid(qsizetype start, qsizetype length) const const
QChar at(qsizetype n) const const
qsizetype size() const const
QList< QStringView > split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
bool startsWith(QChar ch) const const
CaseInsensitive
ISODate
bool isValid() const const
QString path(ComponentFormattingOptions options) const const
void setPath(const QString &path, ParsingMode mode)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.