QImage Metadata::getAlbumArt(void) { AlbumArtImages albumArt(this); QImage image; ImageType type; AlbumArtImage *albumart_image = NULL; if ((albumart_image = albumArt.getImage(IT_FRONTCOVER))) type = IT_FRONTCOVER; else if ((albumart_image = albumArt.getImage(IT_UNKNOWN))) type = IT_UNKNOWN; else if ((albumart_image = albumArt.getImage(IT_BACKCOVER))) type = IT_BACKCOVER; else if ((albumart_image = albumArt.getImage(IT_INLAY))) type = IT_INLAY; else if ((albumart_image = albumArt.getImage(IT_CD))) type = IT_CD; if (albumart_image) { if (albumart_image->embedded) image = QImage(MetaIOID3::getAlbumArt(m_filename, type)); else image = QImage(albumart_image->filename); } return image; }
QString Metadata::getAlbumArtFile(ImageType type) { AlbumArtImages albumArt(this); QImage image; AlbumArtImage *albumart_image = albumArt.getImage(type); if (albumart_image) return albumart_image->filename; return QString(""); }
QImage Metadata::getAlbumArt(ImageType type) { AlbumArtImages albumArt(this); QImage image; AlbumArtImage *albumart_image = albumArt.getImage(type); if (albumart_image) { if (albumart_image->embedded) image = QImage(MetaIOID3::getAlbumArt(m_filename, type)); else image = QImage(albumart_image->filename); } return image; }
QString Metadata::getAlbumArtFile(void) { AlbumArtImages albumArt(this); AlbumArtImage *albumart_image = NULL; if ((albumart_image = albumArt.getImage(IT_FRONTCOVER))) return albumart_image->filename; else if ((albumart_image = albumArt.getImage(IT_UNKNOWN))) return albumart_image->filename; else if ((albumart_image = albumArt.getImage(IT_BACKCOVER))) return albumart_image->filename; else if ((albumart_image = albumArt.getImage(IT_INLAY))) return albumart_image->filename; else if ((albumart_image = albumArt.getImage(IT_CD))) return albumart_image->filename; return QString(""); }
void KNLibHashPixmapList::loadImages() { QDir albumArt(m_folderPath); QStringList albumArtFiles=albumArt.entryList(QStringList("*.png")); int fileCount=albumArtFiles.size(); QString currentFile; QImage imageCache; while(fileCount--) { currentFile=albumArtFiles.takeFirst(); if(currentFile=="." || currentFile=="..") { continue; } imageCache=QImage(m_folderPath+currentFile); currentFile.resize(currentFile.size()-4); m_list[currentFile]=imageCache; } emit loadComplete(); }