/* -*- mode: c++; indent-tabs-mode: nil; -*-
 *
 * This file is part of the Mango recipe management distribution.
 * Copyright (c) 2000-2003, Roland Jesse
 * All rights reserved.
 *
 * For license and copyright information see the file COPYRIGHT or 
 * <http://www.opensource.org/licenses/bsd-license.html>.
 *
 * $Id: RecipeImageData.h,v 1.1 2003/06/19 17:54:18 rjesse Exp $
 */
 
#ifndef RECIPE_IMAGE_DATA_H
#define RECIPE_IMAGE_DATA_H

#include <qpixmap.h>

/*!
  \internal data structure to store image data.
  Each image for a recipe is associated with a label. Images might not be
  available directly but only via an (online) URI.
*/
class RecipeImageData {
   public:
      //! Specifies whether the image is available directly or via an URI.
      enum Type {
         INVALID = 0,
         EMBEDDED = 1,
         URI = 2
      };

      RecipeImageData();
      RecipeImageData( const QString&);
      
      QString label() const;
      QString uri() const;
      QPixmap pixmap() const;
      QString pictureAsBase64() const;

      void setLabel( const QString&);
      void setUri( const QString&);
      void setPixmap( const QPixmap&);

   private:
      Type m_type;
      QString m_label;
      QString m_uri;
      QPixmap m_pixmap;
};
#endif // RECIPE_IMAGE_DATA_H
