diff -r e686773b3f54 -r 0ba2181d7c28 logsui/logsengine/inc/logsthumbnailmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/logsui/logsengine/inc/logsthumbnailmanager.h Fri Mar 19 09:27:18 2010 +0200 @@ -0,0 +1,71 @@ +/* +* 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 LOGSTHUMBNAILMANAGER_H +#define LOGSTHUMBNAILMANAGER_H + +#include +#include +#include +#include +#include +#include +#include + +class ThumbnailManager; + +class LogsThumbIconManager : public QObject +{ + Q_OBJECT + +public: + + explicit LogsThumbIconManager(QObject *parent=0); + virtual ~LogsThumbIconManager(); + + QIcon& contactIcon(const QString &avatarPath, int index); + void cancel(); + QIcon& defaultIcon(); + +signals: + void contactIconReady(int index); + +public slots: + void thumbnailReady(const QPixmap& pixmap, void *data, int id, int error); + void thumbnailLoad(); + void timerTimeout(); + +private: + ThumbnailManager *mThumbnailManager; + QCache mImageCache; + QMap mTnmReqMap; + + QQueue< QPair > mRequestQueue; + int mQueueCount; + QTimer* mTimer; + QIcon* mDefaultIcon; + +private: + + friend class UT_LogsMatchesModel; + friend class UT_LogsThumbnailManager; + +}; + +#endif // LOGSTHUMBNAILMANAGER_H +