/***************************************************************************
 * tabchord.h: implementation of TabChord class
 *
 * This file is part of KGuitar, a KDE tabulature editor
 *
 * copyright (C) 2002-2003 the KGuitar 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 TABCHORD_H
#define TABCHORD_H

#include <QMap>
#include <QObject>
#include <QString>

class TabChord : public QObject
{
	Q_OBJECT
public:
	enum ExtentionChord {
		noneExtention,
		nine,
		eleven,
		thirteen
	};
	
	enum AugmentedDiminished {
		noneAugmentedDiminished,
		augmented,
		diminished
	};
	
	TabChord();
	virtual ~TabChord();
	
	virtual void clone(const TabChord* chord);
	
	virtual void setName(const QString& s);
	virtual QString name() const;
	
	virtual void setSharp(bool b);
	virtual bool isSharp() const;
	
	virtual void setRoot(uchar c);
	virtual uchar root() const;
	
	virtual void setType(uchar c);
	virtual uchar type() const;
	
	virtual void setNineElevenThirteen(ExtentionChord c);
	virtual ExtentionChord nineElevenThirteen() const;
	
	virtual void setBass(uchar c);
	virtual uchar bass() const;
	
	virtual void setAugmentedDiminished(AugmentedDiminished a);
	virtual AugmentedDiminished augmentedDiminished() const;
	
	virtual void setAddedNote(uchar c);
	virtual uchar addedNote() const;
	
	virtual void setTonalityFive(uchar c);
	virtual uchar tonalityFive() const;
	
	virtual void setTonalityNine(uchar c);
	virtual uchar tonalityNine() const;
	
	virtual void setTonalityEleven(uchar c);
	virtual uchar tonalityEleven() const;
	
	virtual void setBaseFret(long l);
	virtual long baseFret() const;
	
	virtual void setFret(uchar c, long l);
	virtual long fret(uchar c) const;
	
	virtual void setNumBarres(uchar c);
	virtual uchar numBarres() const;
	
	virtual void setBarreFret(uchar c, uchar d);
	virtual uchar barreFret(uchar c) const;
	
	virtual void setBarreStart(uchar c, uchar d);
	virtual uchar barreStart(uchar c) const;
	
	virtual void setBarreEnd(uchar c, uchar d);
	virtual uchar barreEnd(uchar c) const;
	
	virtual void setFingering(uchar c, uchar d);
	virtual uchar fingering(uchar c) const;
	
	virtual void setShowDiagram(bool b);
	virtual bool isShowDiagram() const;
	
	virtual bool operator==(const TabChord& chord) const;
	virtual bool operator!=(const TabChord& chord) const;
	
signals:
	void chordChanged();
	
private:
	QString mName;
	bool mSharp;
	uchar mRoot;
	uchar mType;
	ExtentionChord mExtention;
	uchar mBass;
	AugmentedDiminished mAugmentedDiminished;
	uchar mAddedNote;
	uchar mBaseFret;
	uchar mFive;
	uchar mNine;
	uchar mEleven;
	long mBase;
	QMap<uchar,uchar> mFret;
	uchar mBarres;
	QMap<uchar,uchar> mBarreFret;
	QMap<uchar,uchar> mBarreStart;
	QMap<uchar,uchar> mBarreEnd;
	QMap<uchar,uchar> mFingering;
	bool mShow;
};

#endif
