Search for usage in LXR

#include <mecard.h>

Public Member Functions

 MeCard (MeCard &&other) noexcept
 ~MeCard ()
QString header () const
QStringView headerView () const
MeCardoperator= (MeCard &&other) noexcept
QVariantMap toVariantMap () const
QString value (QStringView key) const
QStringList values (QStringView key) const

Static Public Member Functions

static std::optional< MeCardparse (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

Definition at line 29 of file mecard.h.

Constructor & Destructor Documentation

◆ MeCard()

MeCard::MeCard ( MeCard && other)

Move constructor.

Definition at line 35 of file mecard.cpp.

◆ ~MeCard()

MeCard::~MeCard ( )


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=()

MeCard & MeCard::operator= ( MeCard && other)

Move assignment.

Definition at line 41 of file mecard.cpp.

◆ parse()

std::optional< MeCard > MeCard::parse ( const QString & data)

Parse the given string.

dataThe string to parse
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.

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:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:54:32 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.