Prison::MeCard
#include <mecard.h>
Public Member Functions | |
MeCard (MeCard &&other) noexcept | |
~MeCard () | |
QString | header () const |
QStringView | headerView () const |
MeCard & | operator= (MeCard &&other) noexcept |
QVariantMap | toVariantMap () const |
QString | value (QStringView key) const |
QStringList | values (QStringView key) const |
Static Public Member Functions | |
static std::optional< MeCard > | parse (const QString &data) |
Detailed Description
Parser for the MeCard format.
This was originally used for a more compact vCard representation, but today is mostly relevant for Wifi configuration QR codes.
- See also
- https://en.wikipedia.org/wiki/MeCard_(QR_code)
- https://github.com/zxing/zxing/wiki/Barcode-Contents#wi-fi-network-config-android-ios-11
- Since
- 5.101
Constructor & Destructor Documentation
◆ MeCard()
|
noexcept |
Move constructor.
Definition at line 35 of file mecard.cpp.
◆ ~MeCard()
|
default |
Destructor.
Member Function Documentation
◆ header()
QString MeCard::header | ( | ) | const |
Get the MeCard header.
If you just want to identify the card, use headerView() instead.
Definition at line 109 of file mecard.cpp.
◆ headerView()
QStringView MeCard::headerView | ( | ) | const |
Get the MeCard header as a string view.
Useful for identifying the type of card.
Definition at line 114 of file mecard.cpp.
◆ operator=()
Move assignment.
Definition at line 41 of file mecard.cpp.
◆ parse()
Parse the given string.
- Parameters
-
data The string to parse
- Returns
- A MeCard, if parsing was successful, a nullopt otherwise.
Definition at line 49 of file mecard.cpp.
◆ toVariantMap()
QVariantMap MeCard::toVariantMap | ( | ) | const |
Get the parsed data as QVariantMap.
Definition at line 137 of file mecard.cpp.
◆ value()
QString MeCard::value | ( | QStringView | key | ) | const |
Get the value for a given key.
Convenience method for getting the first value if only one value is expected.
Definition at line 119 of file mecard.cpp.
◆ values()
QStringList MeCard::values | ( | QStringView | key | ) | const |
Get the list of values for a given key.
- Returns
- The list of values for the given key
Definition at line 128 of file mecard.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:12:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.