Pages
API Documentation
On this page

Prison::MeCard Class

Barcode Rendering. More...

  • Header: #include <Prison/MeCard>
  • CMake: find_package(KF6 REQUIRED COMPONENTS Prison)
    target_link_libraries(mytarget PRIVATE KF6::Prison)

List of all members, including inherited members

Public Functions

Static Public Members

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

Member Function Documentation

Get the MeCard header.

If you just want to identify the card, use headerView() instead.

QStringView MeCard::headerView() const

Get the MeCard header as a string view.

Useful for identifying the type of card.

[static] std::optional<Prison::MeCard> MeCard::parse(const QString &data)

Parse the given string

data The string to parse

Returns a MeCard, if parsing was successful, a nullopt otherwise.

QVariantMap MeCard::toVariantMap() const

Get the parsed data as QVariantMap.

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.

QStringList MeCard::values(QStringView key) const

Get the list of values for a given key.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.