diff -r 26a1709b9fec -r 14979e23cb5e mpdata/inc/mpcollectionalbumartmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mpdata/inc/mpcollectionalbumartmanager.h Tue Aug 31 15:12:29 2010 +0300 @@ -0,0 +1,73 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Music Player collection album art manager. +* +*/ + + +#ifndef MPCOLLECTIONALBUMARTMANAGER_H +#define MPCOLLECTIONALBUMARTMANAGER_H + +#include +#include +#include + +#include + +#include "mpcommondefs.h" + +class MpMpxCollectionData; +class ThumbnailManager; + +class MpCollectionAlbumArtManager : public QObject +{ + Q_OBJECT + +public: + + explicit MpCollectionAlbumArtManager( MpMpxCollectionData *data, QObject *parent=0 ); + virtual ~MpCollectionAlbumArtManager(); + + const HbIcon albumArt( int index ); + void cacheFirstScreen(); + void cancel(); + void setThumbnailSize( MpCommon::MpThumbType type ); + void enableDefaultArt( bool enabled ); + +signals: + + void albumArtReady( int index ); + +public slots: + + void thumbnailReady( QPixmap pixmap, void *data, int id, int error ); + +private: + + MpMpxCollectionData *mCollectionData; + ThumbnailManager *mThumbnailManager; + QCache mImageCache; + bool mCachingInProgress; + + HbIcon mDefaultIcon; + + QList mRequestQueue; + bool mPendingRequest; + int mRequestId; + bool mDefaultArtEnabled; + +}; + +#endif // MPCOLLECTIONALBUMARTMANAGER_H +