/***************************************************************************
 *   Copyright (C) 2004 by Hans Oischinger                                 *
 *   hans.oischinger@kdemail.net                                           *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA.             *
 ***************************************************************************/
#ifndef STOPELEMENT_H
#define STOPELEMENT_H

#include "elementnode.h"

class AnimatedNumber;
class AnimatedColor;
/**
Defines Gradient stops
 
@author Hans Oischinger
*/
class StopElement : public ElementNode
{
  Q_OBJECT
public:
  StopElement();
  StopElement( const StopElement& );
  ~StopElement();

  StopElement &operator=(const StopElement&);
  virtual ElementNode* clone();

  virtual Attribute* getAttrByName( const QString& name );
  virtual Element::Hit hits( const QPoint & ) { return Element::NOHIT; }
  virtual QRect bbox( KCBBoxFlags flags = BBOX_DEFAULT ) const;
  virtual void accept( Visitor& visitor );

  AnimatedNumber &getOffset() const { return *m_offset; }
  AnimatedColor &getStopColor() const { return *m_stopColor; }
  AnimatedNumber &getStopOpacity() const { return *m_stopOpacity; }

protected:
  void init();

private:
  AnimatedNumber *m_offset;
  AnimatedColor *m_stopColor;
  AnimatedNumber *m_stopOpacity;
};

#endif
