/**
 * Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
 * All rights reserved.
 *
 * For the applicable distribution terms see the license.txt -file, included in
 * the distribution.
 */

#ifndef ITEMSTATUSIMAGEPROVIDER_H
#define ITEMSTATUSIMAGEPROVIDER_H

#include <QDeclarativeImageProvider>
#include <QImage>

class ProductCatalogModel;

/*!
  \class ItemstatusImageProvider
  \brief provides product state image to QML list
*/
class ItemstatusImageProvider : public QDeclarativeImageProvider

{
public:
    /*!
      Constructor
    */
    ItemstatusImageProvider(ProductCatalogModel& model);

    /*!
      base class abstract method implementation
    */
    QImage requestImage (const QString &id, QSize *size, const QSize &requestedSize);

private:
    ProductCatalogModel    *m_model; //product list model
};

#endif // ITEMSTATUSIMAGEPROVIDER_H
