/***************************************************************************
 * tabsong.h
 *
 * This file is part of KTabEdit, 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 TABSONG_H
#define TABSONG_H

#include <QChar>
#include <QList>

class SongKey;
class TabLyrics;
class TabProperties;
class TabTrack;

class TabSong
{
public:
	typedef QList<TabTrack*>::const_iterator const_iterator;
	typedef QList<TabTrack*>::iterator iterator;
	
	typedef QList<TabTrack*>::const_reference const_reference;
	typedef QList<TabTrack*>::reference reference;
	
	TabSong();
	TabSong(const QString& title, int tempo);
	virtual ~TabSong();
	
	virtual void clone(const TabSong* song);
	
	virtual void clear();
	
	virtual void push_back(TabTrack* tabTrack);
	virtual void push_front(TabTrack* tabTrack);
	
	virtual void removeFirst();
	virtual void removeLast();
	virtual void removeAll(TabTrack* tabTrack);
	
	virtual TabTrack* at(int i) const;
	
	virtual reference front();
	virtual const_reference front() const;
	
	virtual reference back();
	virtual const_reference back() const;
	
	virtual iterator begin();
	virtual const_iterator begin() const;
	
	virtual iterator end();
	virtual const_iterator end() const;
	
	virtual int size() const;
	
	virtual int positionOfTrack(const TabTrack* track) const;
	
	virtual uint maximumOfBars() const;
	
	virtual void setProperties(TabProperties* properties);
	virtual TabProperties* properties() const;
	virtual bool hasProperties() const;
	
	virtual bool isDrumTrack() const;
	virtual int drumTrack() const;
	virtual TabTrack* at(uint trackNumber) const;
	
	virtual void setTitle(const QString& s);
	virtual QString title() const;
	
	virtual void setSubTitle(const QString& s);
	virtual QString subTitle() const;
	
	virtual void setArtist(const QString& s);
	virtual QString artist() const;
	
	virtual void setAlbum(const QString& s);
	virtual QString album() const;
	
	virtual void setAuthor(const QString& s);
	virtual QString author() const;
	
	virtual void setCopyright(const QString& s);
	virtual QString copyright() const;
	
	virtual void setTranscriber(const QString& s);
	virtual QString transcriber() const;
	
	virtual void setInstructions(const QString& s);
	virtual QString instructions() const;
	
	virtual void setComments(const QString& s);
	virtual QString comments() const;
	
	virtual void setShuffle(bool i);
	virtual bool isShuffle() const;
	
	virtual void setTempo(unsigned int i);
	virtual unsigned int tempo() const;
	
	virtual void setOctave(int i);
	virtual int octave() const;
	
	virtual void setSongKey(SongKey* songKey);
	virtual SongKey* songKey() const;
	
	virtual void setKey(QChar c);
	virtual QChar key() const;
	virtual char asciiCodeOfKey() const;
	virtual QString nameOfKey() const;
	
	virtual void setMinor(bool i);
	virtual bool isMinor() const;
	
	virtual void setTabLyrics(TabLyrics* lyrics);
	virtual TabLyrics* tabLyrics() const;
	
	virtual void setLyricsTrack(int i);
	virtual int lyricsTrack() const;
	
	virtual void setLyricsMeasure(int i, int j);
	virtual int lyricsMeasure(int i) const;
	
	virtual void setLyrics(int i, const QString& s);
	virtual QString lyrics(int i) const;
	
	virtual void copyTracks(const TabSong* tabSong);
	virtual bool compareTracks(const TabSong& tabSong) const;
	
	virtual bool operator==(const TabSong& tabSong) const;
	virtual bool operator!=(const TabSong& tabSong) const;
	
private:
	TabProperties* mSongProperties;
	QList<TabTrack*> mTabTrack;
};

#endif
