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.

Constructor & Destructor Documentation

◆ CDInfo() [1/2]

KCDDB::CDInfo::CDInfo ( )

Definition at line 245 of file cdinfo.cpp.

◆ ~CDInfo()

KCDDB::CDInfo::~CDInfo ( )
virtual

Definition at line 258 of file cdinfo.cpp.

◆ CDInfo() [2/2]

KCDDB::CDInfo::CDInfo ( const CDInfo & clone)

Definition at line 251 of file cdinfo.cpp.

Member Function Documentation

◆ checkTrack()

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

Checks to make sure that trackNumber exists.

Definition at line 521 of file cdinfo.cpp.

◆ clear()

void KCDDB::CDInfo::clear ( )

Clear all information, setting this to invalid internal.

Definition at line 531 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 507 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 503 of file cdinfo.cpp.

◆ isValid()

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

Definition at line 538 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 271 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 277 of file cdinfo.cpp.

◆ numberOfTracks()

int KCDDB::CDInfo::numberOfTracks ( ) const

Returns number of tracks on CD.

Definition at line 570 of file cdinfo.cpp.

◆ operator!=()

bool KCDDB::CDInfo::operator!= ( const CDInfo & other) const

Definition at line 581 of file cdinfo.cpp.

◆ operator=()

CDInfo & KCDDB::CDInfo::operator= ( const CDInfo & clone)

Definition at line 263 of file cdinfo.cpp.

◆ operator==()

bool KCDDB::CDInfo::operator== ( const CDInfo & other) const

Definition at line 575 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 attributes 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 511 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 515 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 410 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 551 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 558 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-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:19:58 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.