/***************************************************************************
 * tabtrill.h: implementation of TabTrill
 *
 * This file is part of KGuitar, a KDE tabulature editor
 *
 * copyright (C) 2003-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 "tabtrill.h"
#include "util/assert.h"

TabTrill::TabTrill()
: mFret(0),
  mPeriod(0)
{
}

TabTrill::~TabTrill()
{
}

void TabTrill::clone(const TabTrill* trill)
{
	PRECONDITION( trill != 0x0 );
	
	mFret = trill->mFret;
	mPeriod = trill->mPeriod;
}

void TabTrill::setFretTrill(char c)
{
	mFret = c;
}

char TabTrill::fretTrill() const
{
	return mFret;
}

void TabTrill::setPeriod(char c)
{
	mPeriod = c;
}

char TabTrill::period() const
{
	return mPeriod;
}

bool TabTrill::operator==(const TabTrill& trill) const
{
	return (mFret == trill.mFret && mPeriod == trill.mPeriod);
}

bool TabTrill::operator!=(const TabTrill& trill) const
{
	return !this->operator==(trill);
}
