• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdemultimedia API Reference
  • KDE Home
  • Contact Us
 

libkcddb

  • KCDDB
  • CDInfo
Public Member Functions | Protected Member Functions | List of all members
KCDDB::CDInfo Class Reference

#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();

Definition at line 117 of file cdinfo.h.

Constructor & Destructor Documentation

KCDDB::CDInfo::CDInfo ( )

Definition at line 256 of file cdinfo.cpp.

KCDDB::CDInfo::~CDInfo ( )
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

void KCDDB::CDInfo::checkTrack ( int  trackNumber)
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.

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

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

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.

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

Definition at line 274 of file cdinfo.cpp.

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

Definition at line 586 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 522 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 526 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 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:
  • cdinfo.h
  • cdinfo.cpp
This file is part of the KDE documentation.
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.

libkcddb

Skip menu "libkcddb"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdemultimedia API Reference

Skip menu "kdemultimedia API Reference"
  • libkcddb
  • libkcompactdisc

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal