/***********************************************************************
**
**   isohypse.h
**
**   This file is part of KFLog.
**
************************************************************************
**
**   Copyright (c):  2000 by Heiner Lamprecht, Florian Ehinger
**
**   This file is distributed under the terms of the General Public
**   Licence. See the file COPYING for more information.
**
**   $Id: isohypse.h,v 1.11 2004/03/13 20:15:27 andre Exp $
**
***********************************************************************/

#ifndef ISOHYPSE_H
#define ISOHYPSE_H

#include "lineelement.h"

/**
 * This class is used for isohypses.
 *
 * @author Heiner Lamprecht, Florian Ehinger
 */
class Isohypse : public LineElement
{
  public:
    /**
     * Creates a new isohypse.
     *
     * @param  pA  The pointarray containing the positions.
     * @param  elev  The elevation
     * @param  isValles "true", if the area is a valley
     */
    Isohypse(QPointArray pA, unsigned int elev, bool isValley, unsigned int secID);
    /**
     * Destructor
     */
    virtual ~Isohypse();
    /**
     * Draws the element into the given painter. Reimplemented from
     * BaseMapElement.
     *
     * @param  targetP  The painter to draw the element into.
     * @param  maskP  The maskpainter for targetP
     */
    virtual QRegion * drawRegion(QPainter* targetP, QPainter*, bool really_draw, bool isolines=false);
    /**
     * @return the elevation of the line
     */
    int getElevation() const { return elevation; };

    inline QRect getRect() const { return _rect; };
    /**
     * Checks if this isohypse would cover the given rectangle completely
     * @returns true if that is the case.
     */

  private:
    /**
     * The bounding rectangle
     */
    QRect _rect;
    /**
     * The elevation
     */
    int elevation;
    /**
     * "true", if element is a valley.
     */
    bool valley;
};

#endif
