/***************************************************************************
 * tabbend.h: implementation of TabBend class
 *
 * This file is part of KGuitar, a KDE tabulature editor
 *
 * copyright (C) 2006- the KTabEdit development team <mrgwen@gmail.com>
 ***************************************************************************/

/***************************************************************************
 * 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.
 *
 * See the file COPYING for more information.
 ***************************************************************************/
 
#ifndef TABBEND_H
#define TABBEND_H

#include <QList>

#include "tabbendpoint.h"

class TabBend
{
public:
	enum BendType {
		NoneBend,
		Bend,
		BendRelease,
		BendReleaseBend,
		PreBend,
		PreBendRelease,
		Dip,
		Dive,
		ReleaseUp,
		InvertedDip,
		Return,
		ReleaseDown
	};
	
	TabBend();
	virtual ~TabBend();
	
	virtual void clone(const TabBend* bend);
	
	virtual void setBendType(TabBend::BendType b);
	virtual TabBend::BendType bendType() const;
	
	virtual void setBendValue(int i);
	virtual int bendValue() const;
	virtual QString bendValueToString() const;
	
	virtual int sizeOfBendPoints() const;
	virtual void addBendPoint(TabBendPoint* point);
	virtual void setBendPoint(uint i, TabBendPoint* point);
	virtual void removeBendPoint(uint i);
	virtual TabBendPoint* bendPoint(uint i) const;
	
	virtual bool operator==(const TabBend &) const;
	virtual bool operator!=(const TabBend &) const;
	
private:
	typedef QList<TabBendPoint*>::iterator iterator;
	typedef QList<TabBendPoint*>::const_iterator const_iterator;
	
	TabBend::BendType mType;
	int mValue;
	QList<TabBendPoint*> mPoints;
};

#endif
