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

libkcddb

  • sources
  • kde-4.14
  • kdemultimedia
  • libkcddb
  • libkcddb
cdinfo.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002 Rik Hemsley (rikkus) <rik@kde.org>
3  Copyright (C) 2002-2005 Benjamin Meyer <ben-devel@meyerhome.net>
4  Copyright (C) 2002-2004 Nadeem Hasan <nhasan@nadmm.com>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KCDDB_CDINFO_H
23 #define KCDDB_CDINFO_H
24 
25 #include <QtCore/QStringList>
26 #include <QtCore/QVariant>
27 #include <libkcddb/kcddb_export.h>
28 
29 namespace KCDDB
30 {
34  enum Type
35  {
36  Title,
37  Comment,
38  Artist,
39  Genre,
40  Year,
44  Length,
46  Category
50  };
51 
55  class KCDDB_EXPORT TrackInfo
56  {
57  public:
58 
59  TrackInfo();
60  virtual ~TrackInfo();
61  TrackInfo(const TrackInfo& clone);
62  TrackInfo& operator=(const TrackInfo& clone);
63 
64  bool operator==(const TrackInfo&) const;
65  bool operator!=(const TrackInfo&) const;
66 
72  QVariant get(const QString &type) const;
76  QVariant get(Type type) const;
77 
85  void set(const QString &type, const QVariant &data);
89  void set(Type type, const QVariant &data);
90 
95  QString toString() const;
96 
100  void clear();
101 
102  private:
103  class TrackInfoPrivate *d;
104 
105  };
106 
107  typedef QList<TrackInfo> TrackInfoList;
108 
117  class KCDDB_EXPORT CDInfo
118  {
119  public:
120  CDInfo();
121  virtual ~CDInfo();
122 
123  CDInfo(const CDInfo& clone);
124  CDInfo& operator=(const CDInfo& clone);
125 
126  bool operator==(const CDInfo&) const;
127  bool operator!=(const CDInfo&) const;
128 
133  bool load(const QString &string);
138  bool load(const QStringList &stringList);
139 
144  void clear();
145 
149  bool isValid() const;
150 
155  QString toString(bool submit=false) const;
156 
162  QVariant get(const QString &type) const;
166  QVariant get(Type type) const;
167 
175  void set(const QString &type, const QVariant &data);
179  void set(Type type, const QVariant &data);
180 
185  TrackInfo & track( int trackNumber );
186 
191  TrackInfo track( int trackNumber ) const;
192 
196  int numberOfTracks() const;
197 
198  protected:
202  void checkTrack( int trackNumber );
203 
204  private:
205  class CDInfoPrivate * const d;
206  };
207 
208  typedef QList<CDInfo> CDInfoList;
209 }
210 
211 #endif // KCDDB_CDINFO_H
212 // vim:tabstop=2:shiftwidth=2:expandtab:cinoptions=(s,U1,m1
KCDDB::Title
The title of the track or CD.
Definition: cdinfo.h:36
KCDDB::Category
The freedb category of the entry.
Definition: cdinfo.h:46
KCDDB::Length
The length of a track or a full CD.
Definition: cdinfo.h:44
KCDDB::TrackInfoList
QList< TrackInfo > TrackInfoList
Definition: cdinfo.h:107
KCDDB::Genre
The genre of the track or CD.
Definition: cdinfo.h:39
KCDDB::Comment
A comment for the track or CD.
Definition: cdinfo.h:37
KCDDB::CDInfo
Information about a CD.
Definition: cdinfo.h:117
KCDDB::Type
Type
The most common types.
Definition: cdinfo.h:34
KCDDB::CDInfoList
QList< CDInfo > CDInfoList
Definition: cdinfo.h:208
QString
QList< TrackInfo >
KCDDB::Artist
The artist of the track or CD.
Definition: cdinfo.h:38
QStringList
KCDDB_EXPORT
#define KCDDB_EXPORT
Definition: kcddb_export.h:32
KCDDB::Year
The year the cd or track was produced By default, the year of the track is the same as for the whole ...
Definition: cdinfo.h:40
kcddb_export.h
KCDDB::TrackInfo
Information about a sepecific track in a cd.
Definition: cdinfo.h:55
QVariant
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