/***************************************************************************
 * tabbendpoint.h: implementation of TabBendPoint
 *
 * 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.
 ***************************************************************************/
 
#include "tabbendpoint.h"

TabBendPoint::TabBendPoint()
: mPosition(0),
  mValue(0),
  mVibrato(NoneVibrato)
{
}

TabBendPoint::~TabBendPoint()
{
}

void TabBendPoint::clone(const TabBendPoint* point)
{
	mPosition = point->mPosition;
	mValue = point->mValue;
	mVibrato = point->mVibrato;
}

void TabBendPoint::setPosition(int i)
{
	mPosition = i;
	
	emit bendPointChanged();
}

int TabBendPoint::position() const
{
	return mPosition;
}

void TabBendPoint::setHeight(int i)
{
	mValue = i;
	
	emit bendPointChanged();
}

int TabBendPoint::height() const
{
	return mValue;
}

void TabBendPoint::setVibrato(TabVibrato t)
{
	mVibrato = t;
	
	emit bendPointChanged();
}

TabVibrato TabBendPoint::tabVibrato() const
{
	return mVibrato;
}

bool TabBendPoint::operator==(const TabBendPoint &point) const
{
	return (this->mPosition == point.mPosition && this->mValue == point.mValue && this->mVibrato == point.mVibrato);
}

bool TabBendPoint::operator!=(const TabBendPoint &point) const
{
	return !(*this == point);
}

#include "tabbendpoint.moc"
