/***************************************************************************
 * tablyrics.h: implementation of TabLyrics
 *
 * 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 "tablyrics.h"
#include "util/assert.h"

#include <QString>

TabLyrics::TabLyrics()
: lyricsTrackProp(0),
  lyricsMeasureProp(5),
  lyricsProp(5)
{
}

TabLyrics::~TabLyrics()
{
}

void TabLyrics::clone(const TabLyrics* lyrics)
{
	PRECONDITION( lyrics != 0x0 );
	
	lyricsTrackProp = lyrics->lyricsTrackProp;
	lyricsMeasureProp = lyrics->lyricsMeasureProp;
	lyricsProp = lyrics->lyricsProp;
}

void TabLyrics::setLyricsTrack(int i)
{
	lyricsTrackProp = i;
}

int TabLyrics::lyricsTrack() const
{
	return lyricsTrackProp;
}

void TabLyrics::setLyricsMeasure(int i, int j)
{
	lyricsMeasureProp[i] = j;
}

int TabLyrics::lyricsMeasure(int i) const
{
	return lyricsMeasureProp[i];
}

void TabLyrics::setLyrics(int i, const QString& s)
{
	lyricsProp[i] = s;
}

QString TabLyrics::lyrics(int i) const
{
	return lyricsProp[i];
}

bool TabLyrics::operator==(const TabLyrics& tabLyrics) const
{
	return (lyricsTrackProp == tabLyrics.lyricsTrackProp && lyricsMeasureProp == tabLyrics.lyricsMeasureProp &&
			lyricsProp == tabLyrics.lyricsProp);
}

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