|
static bool | isItem (const QDomElement &itemElement) |
|
static bool | isItem (const QDomElement &element) |
|
|
virtual void | parsePayload (const QDomElement &payloadElement) |
|
virtual void | serializePayload (QXmlStreamWriter *writer) const |
|
template<typename PayloadChecker > |
static bool | isItem (const QDomElement &element, PayloadChecker isPayloadValid) |
|
This class represents a PubSub item for XEP-0118: User Tune.
- Since
- QXmpp 1.5
◆ QXmppTuneItem()
QXmppTuneItem::QXmppTuneItem |
( |
| ) |
|
◆ artist()
QString QXmppTuneItem::artist |
( |
| ) |
const |
Returns the artist of the piece or song.
◆ isItem()
bool QXmppTuneItem::isItem |
( |
const QDomElement & |
itemElement | ) |
|
|
static |
Returns true, if the element is a valid XEP-0118: User Tune PubSub item.
◆ length()
std::optional< quint16 > QXmppTuneItem::length |
( |
| ) |
const |
Returns the length of the piece in seconds (0 means unknown).
◆ lengthAsDuration()
QXmppTuneItem::lengthAsDuration |
( |
| ) |
const |
|
inline |
Returns the length as std::chrono::seconds.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ lengthAsTime()
QXmppTuneItem::lengthAsTime |
( |
| ) |
const |
|
inline |
Returns the length as QTime.
◆ rating()
std::optional< quint8 > QXmppTuneItem::rating |
( |
| ) |
const |
Returns the user's rating of the song or piece (from 1 to 10), 0 means invalid or unknown.
◆ setArtist()
void QXmppTuneItem::setArtist |
( |
QString |
artist | ) |
|
Sets the artist of the piece or song.
◆ setLength() [1/3]
QXmppTuneItem::setLength |
( |
const QTime & |
time | ) |
|
|
inline |
Sets the length from QTime.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ setLength() [2/3]
void QXmppTuneItem::setLength |
( |
std::optional< quint16 > |
length | ) |
|
Sets the length of the piece in seconds (0 means unknown).
◆ setLength() [3/3]
QXmppTuneItem::setLength |
( |
std::optional< std::chrono::seconds > |
time | ) |
|
|
inline |
Sets the length from std::chrono::seconds. Useful if you want to use the chrono literals.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
◆ setRating()
void QXmppTuneItem::setRating |
( |
std::optional< quint8 > |
rating | ) |
|
Sets the user's rating of the song or piece (from 1 to 10), 0 means invalid or unknown.
◆ setSource()
void QXmppTuneItem::setSource |
( |
QString |
source | ) |
|
Sets the album, other collection or other source (e.g. website) of the piece.
◆ setTitle()
void QXmppTuneItem::setTitle |
( |
QString |
title | ) |
|
Sets the title of the piece.
◆ setTrack()
void QXmppTuneItem::setTrack |
( |
QString |
track | ) |
|
Sets the track number or other identifier in the collection or source.
◆ setUri()
void QXmppTuneItem::setUri |
( |
QUrl |
uri | ) |
|
Sets an URI or URL pointing to information about the song, collection or artist.
◆ source()
QString QXmppTuneItem::source |
( |
| ) |
const |
Returns the album, other collection or other source (e.g. website) of the piece.
◆ title()
QString QXmppTuneItem::title |
( |
| ) |
const |
Returns the title of the piece.
◆ track()
QString QXmppTuneItem::track |
( |
| ) |
const |
Returns the track number or other identifier in the collection or source.
◆ uri()
QUrl QXmppTuneItem::uri |
( |
| ) |
const |
Returns an URI or URL pointing to information about the song, collection or artist.
The documentation for this class was generated from the following files: