Commit 11bd502f authored by Volker Krause's avatar Volker Krause
Browse files

Add support for Code 39 ticket tokens

parent 11844b5c
......@@ -22,6 +22,8 @@ Token::TokenType Token::tokenType(QStringView token)
return DataMatrix;
} else if (token.startsWith(QLatin1String("pdf417"), Qt::CaseInsensitive)) {
return PDF417;
} else if (token.startsWith(QLatin1String("code39:"), Qt::CaseInsensitive)) {
return Code39;
} else if (token.startsWith(QLatin1String("http"), Qt::CaseInsensitive)) {
return Url;
}
......@@ -44,6 +46,9 @@ QVariant Token::tokenData(const QString &token)
return token.mid(7);
} else if (token.startsWith(QLatin1String("pdf417bin:"), Qt::CaseInsensitive)) {
return QByteArray::fromBase64(QStringView(token).mid(10).toLatin1());
} else if (token.startsWith(QLatin1String("code39:"), Qt::CaseInsensitive)) {
return token.mid(7);
}
return token;
}
......@@ -33,6 +33,7 @@ public:
Code128, ///< Code 128 barcode
DataMatrix, ///< A DataMatrix barcode
PDF417, ///< A PDF417 barcode
Code39, ///< A Code 39 barcode
};
Q_ENUM(TokenType)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment