/***************************************************************************
 * tabbarproperties.h: implementation of TabBar 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 TABBARPROPERTIES_H
#define TABBARPROPERTIES_H

#include <QColor>

#include "songkey.h"
#include "timesignature.h"

class TabBarProperties
{
public:
	TabBarProperties();
	virtual ~TabBarProperties();
	
	virtual void clone(const TabBarProperties* properties);
	
	virtual void setColor(const QColor& i);
	virtual QColor color() const;
	
	virtual void setMarker(const QString& s);
	virtual QString marker() const;
	
	virtual void setRepeatBar(bool b);
	virtual bool isRepeatBar() const;
	
	virtual void setCloseBar(bool b, QChar v);
	virtual bool isCloseBar() const;
	
	virtual void setAltBar(bool b);
	virtual bool isAltBar() const;
	
	virtual void setRepeatStart(bool b);
	virtual bool isRepeatStart() const;
	
	virtual void setRepetitions(int i);
	virtual int repetitions() const;
	
	virtual void setAlternateEndings(int i);
	virtual int isAlternateEndings() const;
	
	virtual void setDoubleBar(bool b);
	virtual bool isDoubleBar() const;
	
	virtual void setSongKey(SongKey* key);
	virtual SongKey* songKey() const;
	virtual bool hasSongKey() 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 setTimeSignature(TimeSignature* timeSignature);
	virtual TimeSignature* timeSignature() const;
	virtual bool hasTimeSignature() const;
	
	virtual void setNumerator(uchar c);
	virtual uchar numerator() const;
	
	virtual void setDenominator(uchar c);
	virtual uchar denominator() const;
	
	virtual uint timeLigatures() const;
	
	virtual bool operator==(const TabBarProperties& properties) const;
	virtual bool operator!=(const TabBarProperties& properties) const;
	
private:
	QColor markerColor;
	QString markerName;
	
	bool repeat;
	
	bool close;
	QChar volta;
	
	bool alt;
	
	bool repeatStartProp;
	int repetitionsProp;
	int alternateEndingsProp;
	bool doubleBarProp;
	
	SongKey* mKey;
	TimeSignature* mTimeSignature;
};

#endif
