File indexing completed on 2024-05-12 16:18:06
0001 /*************************************************************************** 0002 * Copyright (C) 2010 Ralf Engels <ralf-engels@gmx.de> * 0003 * * 0004 * This program is free software; you can redistribute it and/or modify * 0005 * it under the terms of the GNU General Public License as published by * 0006 * the Free Software Foundation; either version 2 of the License, or * 0007 * (at your option) any later version. * 0008 * * 0009 * This program is distributed in the hope that it will be useful, * 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0012 * GNU General Public License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License * 0015 * along with this program; if not, write to the * 0016 * Free Software Foundation, Inc., * 0017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * 0018 ***************************************************************************/ 0019 0020 #ifndef COLLECTIONSCANNER_ALBUM_H 0021 #define COLLECTIONSCANNER_ALBUM_H 0022 0023 #include "amarokshared_export.h" 0024 0025 #include <QList> 0026 #include <QString> 0027 #include <QStringList> 0028 #include <QXmlStreamReader> 0029 #include <QXmlStreamWriter> 0030 0031 namespace CollectionScanner 0032 { 0033 class Track; 0034 0035 /** This album class is used by the ScanResultProcessor to sort tracks into albums. 0036 @class Album 0037 @short Represents a scanned album and it's contents 0038 @author Ralf Engels <ralf-engels@gmx.de> 0039 */ 0040 class AMAROKSHARED_EXPORT Album 0041 { 0042 public: 0043 Album(); 0044 Album( const QString &name, const QString &artist ); 0045 0046 /** Adds a track to this album. 0047 The track must still be freed by the caller. 0048 */ 0049 void addTrack( Track *track ); 0050 0051 QString name() const; 0052 0053 /** Returns the artist of this album. */ 0054 QString artist() const; 0055 void setArtist( const QString &artist ); 0056 0057 /** Returns the picture best suited as cover for this album */ 0058 QString cover() const; 0059 0060 /** Returns all covers added via addCovers() */ 0061 QStringList covers() const; 0062 void setCovers( const QStringList &covers ); 0063 0064 QList<Track*> tracks() const; 0065 0066 bool isNoCompilation() const; 0067 0068 private: 0069 QString m_name; 0070 QString m_artist; 0071 QStringList m_covers; 0072 QList<Track*> m_tracks; 0073 }; 0074 0075 } 0076 0077 #endif // COLLECTIONSCANNER_ALBUM_H