KCDDB::CDInfo

Search for usage in LXR

#include <cdinfo.h>

Public Member Functions

 CDInfo (const CDInfo &clone)
 
void clear ()
 
QVariant get (const QString &type) const
 
QVariant get (Type type) const
 
bool isValid () const
 
bool load (const QString &string)
 
bool load (const QStringList &stringList)
 
int numberOfTracks () const
 
bool operator!= (const CDInfo &) const
 
CDInfooperator= (const CDInfo &clone)
 
bool operator== (const CDInfo &) const
 
void set (const QString &type, const QVariant &data)
 
void set (Type type, const QVariant &data)
 
QString toString (bool submit=false) const
 
TrackInfotrack (int trackNumber)
 
TrackInfo track (int trackNumber) const
 

Protected Member Functions

void checkTrack (int trackNumber)
 

Detailed Description

Information about a CD.

Typically CDInfo is obtained from the client such as: KCDDB::Client *cddb = new KCDDB::Client(); cddb->lookup(discSignature); CDInfo info = cddb->lookupResponse().first();

Definition at line 104 of file cdinfo.h.

Member Function Documentation

void KCDDB::CDInfo::checkTrack ( int  trackNumber)
protected

Checks to make sure that trackNumber exists.

Definition at line 525 of file cdinfo.cpp.

void KCDDB::CDInfo::clear ( )

Clear all information, setting this to invalid internal.

Definition at line 535 of file cdinfo.cpp.

QVariant KCDDB::CDInfo::get ( const QString type) const

Get data for type that has been assigned to this disc.

type is case insensitive. For example get("title")

Definition at line 511 of file cdinfo.cpp.

QVariant KCDDB::CDInfo::get ( Type  type) const

Helper function that calls type with the common name.

Definition at line 507 of file cdinfo.cpp.

bool KCDDB::CDInfo::isValid ( ) const
Returns
true if the cd information is valid

Definition at line 542 of file cdinfo.cpp.

bool KCDDB::CDInfo::load ( const QString string)

Load CDInfo from a string that is CDDB compatible.

Returns
true if successful

Definition at line 271 of file cdinfo.cpp.

bool KCDDB::CDInfo::load ( const QStringList stringList)

Load CDInfo from a stringList that is CDDB compatible.

Returns
true if successful

Definition at line 281 of file cdinfo.cpp.

int KCDDB::CDInfo::numberOfTracks ( ) const

Returns number of tracks on CD.

Definition at line 574 of file cdinfo.cpp.

void KCDDB::CDInfo::set ( const QString type,
const QVariant data 
)

Set any data from this disc.

type is case insensitive. For example set("title", "Rock this world") Useful for atributes that other apps want to add. Data will be stored in the local cddb cache, but not sent to the cddb server

Definition at line 515 of file cdinfo.cpp.

void KCDDB::CDInfo::set ( Type  type,
const QVariant data 
)

Helper function that calls type with the common name.

Definition at line 519 of file cdinfo.cpp.

QString KCDDB::CDInfo::toString ( bool  submit = false) const
Parameters
submitIf submit is true only returns CDDB compatible information
Returns
a string containing all of the CD's information.

Definition at line 414 of file cdinfo.cpp.

TrackInfo & KCDDB::CDInfo::track ( int  trackNumber)

Returns track with nr trackNumber and adds it to the track list if it doesn't exist (first track is 0)

Definition at line 555 of file cdinfo.cpp.

TrackInfo KCDDB::CDInfo::track ( int  trackNumber) const

Returns a const track with nr trackNumber or a new if it doesn't exist (first track is 0)

Definition at line 562 of file cdinfo.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Jan 17 2022 23:10:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.