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

◆ checkTrack()

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

Checks to make sure that trackNumber exists.

Definition at line 522 of file cdinfo.cpp.

◆ clear()

void KCDDB::CDInfo::clear ( )

Clear all information, setting this to invalid internal.

Definition at line 532 of file cdinfo.cpp.

◆ get() [1/2]

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 508 of file cdinfo.cpp.

◆ get() [2/2]

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

Helper function that calls type with the common name.

Definition at line 504 of file cdinfo.cpp.

◆ isValid()

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

Definition at line 539 of file cdinfo.cpp.

◆ load() [1/2]

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

Load CDInfo from a string that is CDDB compatible.

Returns
true if successful

Definition at line 272 of file cdinfo.cpp.

◆ load() [2/2]

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

Load CDInfo from a stringList that is CDDB compatible.

Returns
true if successful

Definition at line 278 of file cdinfo.cpp.

◆ numberOfTracks()

int KCDDB::CDInfo::numberOfTracks ( ) const

Returns number of tracks on CD.

Definition at line 571 of file cdinfo.cpp.

◆ set() [1/2]

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 512 of file cdinfo.cpp.

◆ set() [2/2]

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

Helper function that calls type with the common name.

Definition at line 516 of file cdinfo.cpp.

◆ toString()

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 411 of file cdinfo.cpp.

◆ track() [1/2]

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 552 of file cdinfo.cpp.

◆ track() [2/2]

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 559 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-2023 The KDE developers.
Generated on Thu Nov 30 2023 04:04:53 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.