QXmpp Version: 1.10.0
Public Member Functions | Static Public Member Functions | List of all members
QXmppTuneItem Class Reference
Inheritance diagram for QXmppTuneItem:
Inheritance graph
[legend]
Collaboration diagram for QXmppTuneItem:
Collaboration graph
[legend]

Public Member Functions

 QXmppTuneItem ()
 
 QXmppTuneItem (const QXmppTuneItem &other)
 Copy-constructor.
 
 QXmppTuneItem (QXmppTuneItem &&)
 Move-constructor.
 
QXmppTuneItemoperator= (const QXmppTuneItem &other)
 Assignment operator.
 
QXmppTuneItemoperator= (QXmppTuneItem &&)
 Move-assignment operator.
 
QString artist () const
 
void setArtist (QString artist)
 
std::optional< quint16 > length () const
 
void setLength (std::optional< quint16 > length)
 
QTime lengthAsTime () const
 
void setLength (const QTime &time)
 
std::optional< std::chrono::seconds > lengthAsDuration () const
 
void setLength (std::optional< std::chrono::seconds > time)
 
std::optional< quint8 > rating () const
 
void setRating (std::optional< quint8 > rating)
 
QString source () const
 
void setSource (QString source)
 
QString title () const
 
void setTitle (QString title)
 
QString track () const
 
void setTrack (QString track)
 
QUrl uri () const
 
void setUri (QUrl uri)
 
- Public Member Functions inherited from QXmppPubSubBaseItem
 QXmppPubSubBaseItem (const QString &id={}, const QString &publisher={})
 
 QXmppPubSubBaseItem (const QXmppPubSubBaseItem &) noexcept
 Default copy-constructor.
 
 QXmppPubSubBaseItem (QXmppPubSubBaseItem &&) noexcept
 Default move-constructor.
 
QXmppPubSubBaseItemoperator= (const QXmppPubSubBaseItem &) noexcept
 Default assignment operator.
 
QXmppPubSubBaseItemoperator= (QXmppPubSubBaseItem &&) noexcept
 Default move-assignment operator.
 
QString id () const
 
void setId (const QString &id)
 
QString publisher () const
 
void setPublisher (const QString &publisher)
 

Static Public Member Functions

static bool isItem (const QDomElement &itemElement)
 
- Static Public Member Functions inherited from QXmppPubSubBaseItem
static bool isItem (const QDomElement &element)
 

Additional Inherited Members

- Protected Member Functions inherited from QXmppPubSubBaseItem
virtual void parsePayload (const QDomElement &payloadElement)
 
virtual void serializePayload (QXmlStreamWriter *writer) const
 
- Static Protected Member Functions inherited from QXmppPubSubBaseItem
template<typename PayloadChecker >
static bool isItem (const QDomElement &element, PayloadChecker isPayloadValid)
 

Detailed Description

This class represents a PubSub item for XEP-0118: User Tune.

Since
QXmpp 1.5

Constructor & Destructor Documentation

◆ QXmppTuneItem()

QXmppTuneItem::QXmppTuneItem ( )

Default constructor

Member Function Documentation

◆ 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: