/***************************************************************************
 * lilypong.h: implementation of Lilypond class
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2003-2007 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 LILYPOND_H
#define LILYPOND_H

#include <QFile>
#include <QTextStream>
#include <QVector>

#include "fileexport.h"

class TabBar;
class TabBarProperties;
class TabBeatEffects;
class TabMixTableChanges;
class TabChord;
class TabProperties;
class TabTrack;
class TrackMidiProperties;
class TabSong;
class TabTime;

class Lilypond : public FileExport
{
public:
	Lilypond();
	virtual ~Lilypond();
	
	bool saveFile(const QString& fileName, const TabSong& tabSong);
private:
	void writeTimes(uint nbStrings, const TabTime& tabTimes);
	void writeBars(uint nbStrings, const TabBar& tabBar);
	void writeTrack(const TabProperties& tabProperties, const TabTrack& tabTrack);
	void writeHeader(const TabProperties& tabProperties);
	
	// Used for the tempo
	//
	bool mWriteTempo;
	
	// Tuning of the current trakc
	//
	QVector<uchar> mTuning;
	
	QFile mFile;
	QTextStream mStream;
};

#endif
