libkcddb
#include <cdinfo.h>
Public Member Functions | |
CDInfo () | |
CDInfo (const CDInfo &clone) | |
virtual | ~CDInfo () |
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 |
CDInfo & | operator= (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 |
TrackInfo & | track (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();
Constructor & Destructor Documentation
KCDDB::CDInfo::CDInfo | ( | ) |
Definition at line 256 of file cdinfo.cpp.
|
virtual |
Definition at line 269 of file cdinfo.cpp.
KCDDB::CDInfo::CDInfo | ( | const CDInfo & | clone | ) |
Definition at line 262 of file cdinfo.cpp.
Member Function Documentation
|
protected |
Checks to make sure that trackNumber exists.
Definition at line 532 of file cdinfo.cpp.
void KCDDB::CDInfo::clear | ( | ) |
Clear all information, setting this to invalid internal.
Definition at line 542 of file cdinfo.cpp.
Get data for type that has been assigned to this disc.
type
is case insensitive. For example get("title")
Definition at line 518 of file cdinfo.cpp.
Helper function that calls type with the common name.
Definition at line 514 of file cdinfo.cpp.
bool KCDDB::CDInfo::isValid | ( | ) | const |
- Returns
- true if the cd information is valid
Definition at line 549 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 282 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 288 of file cdinfo.cpp.
int KCDDB::CDInfo::numberOfTracks | ( | ) | const |
Returns number of tracks on CD.
Definition at line 581 of file cdinfo.cpp.
bool KCDDB::CDInfo::operator!= | ( | const CDInfo & | other | ) | const |
Definition at line 592 of file cdinfo.cpp.
Definition at line 274 of file cdinfo.cpp.
bool KCDDB::CDInfo::operator== | ( | const CDInfo & | other | ) | const |
Definition at line 586 of file cdinfo.cpp.
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 522 of file cdinfo.cpp.
Helper function that calls type with the common name.
Definition at line 526 of file cdinfo.cpp.
QString KCDDB::CDInfo::toString | ( | bool | submit = false | ) | const |
- Parameters
-
submit If submit is true only returns CDDB compatible information
- Returns
- a string containing all of the CD's information.
Definition at line 421 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 562 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 569 of file cdinfo.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:28:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.