/* -*- 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: RKExporter.h,v 1.4 2003/01/12 16:19:56 rjesse Exp $
 */
 
#ifndef RK_EXPORTER_H
#define RK_EXPORTER_H

#include "Exporter.h"
#include <qstringlist.h>

/*!
  This class exports recipes in Rezkonv format.
  As the format is very German centric, most (if not all) strings
  are *not* subject to i18n.
*/
class RKExporter : public Exporter {
      Q_OBJECT

   public:
      RKExporter( RecipeModel*); //!< Contructor.
      RKExporter( const Recipe&); //!< Constructor.
      inline ~RKExporter() {}

      QString getExtensions();
      void apply() throw (Error);
      
   protected:
      void createCookbookHeader();
      void createRecipes();
      void createRecipeHeader();
      void createRecipeBody();

   private:
      void buildStringList() throw( Error);
      void convertRecipe();
      void convertCookbook();
      QStringList ingredientList2StringList( const Recipe::IngredientList&) const;
      QStringList wrapText( const QString&, const int) const;
      
      //! List storing a string for each line of output.
      QStringList m_lines;
};
#endif // RK_EXPORTER_H
