/***************************************************************************
 * tabfreteffect.h
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2007- 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 TABNOTEEFFECT_H
#define TABNOTEEFFECT_H

#include "tabfingering.h"
#include "tabbend.h"
#include "tabdynamic.h"
#include "tabgracenote.h"
#include "tabtrill.h"
#include "tabslide.h"
#include "tabharmonic.h"

class TabException;
class TabHarmonic;
class TabSlide;

class TabNoteEffect
{
public:
	TabNoteEffect();
	virtual ~TabNoteEffect();
	
	virtual void clone(const TabNoteEffect* effect);
	
	virtual void setAccentuated(bool b);
	virtual bool isAccentuated() const;
	
	virtual void setGhostNote(bool b);
	virtual bool isGhostNote() const;
	
	virtual void setTieNote(bool b);
	virtual bool isTieNote() const;
	
	virtual void setHammerOnPullOff(bool b);
	virtual bool isHammerOnPullOff() const;
	
	virtual void setLetRing(bool b);
	virtual bool isLetRing() const;
	
	virtual bool hasDynamic() const;
	virtual void setDynamic(Dynamic d);
	virtual Dynamic dynamic() const;
	
	virtual bool hasFingeringLeft() const;
	virtual void setFingeringLeft(TabFingering f);
	virtual TabFingering fingeringLeft() const;
	
	virtual bool hasFingeringRight() const;
	virtual void setFingeringRight(TabFingering f);
	virtual TabFingering fingeringRight() const;
	
	virtual void setLeftHandVibrato(bool b);
	virtual bool isLeftHandVibrato() const;
	
	virtual void setPalmMute(bool b);
	virtual bool isPalmMute() const;
	
	virtual void setStaccato(bool b);
	virtual bool isStaccato() const;
	
	virtual void setSlide(Slide s);
	virtual Slide slide() const;
	
	virtual bool hasTremoloPicking() const;
	virtual void setTremoloPicking(char c);
	virtual char tremoloPicking() const;
	
	virtual bool hasHarmonic() const;
	virtual void setHarmonic(Harmonic h);
	virtual Harmonic harmonic() const;
	
	virtual void setGraceNote(TabGraceNote* graceNote);
	virtual TabGraceNote* graceNote() const;
	virtual bool hasGraceNote() const;
	
	virtual void setGraceNoteDuration(int i);
	virtual int graceNoteDuration() const;
	
	virtual void setGraceNoteDynamic(Dynamic d);
	virtual Dynamic graceNoteDynamic() const;
	
	virtual void setGraceNoteFret(int i);
	virtual int graceNoteFret() const;
	
	virtual void setGraceNoteTransition(GraceNoteTransition g);
	virtual GraceNoteTransition graceNoteTransition() const;
	
	virtual void setBend(TabBend* bend);
	virtual TabBend* bend() const;
	virtual bool hasBend() const;
	
	virtual void setBendType(TabBend::BendType b);
	virtual TabBend::BendType bendType() const;
	
	virtual void setBendValue(int i);
	virtual int bendValue() const;
	virtual QString bendValueToString() const;
	
	virtual int sizeOfBendPoints() const;
	virtual void addBendPoint(TabBendPoint* point);
	virtual void setBendPoint(uint i, TabBendPoint* point);
	virtual void removeBendPoint(uint i);
	virtual TabBendPoint* bendPoint(uint i) const;
	
	virtual void setTrill(TabTrill* trill);
	virtual TabTrill* trill() const;
	virtual bool hasTrill() const;
	
	virtual void setFretTrill(char c);
	virtual char fretTrill() const;
	
	virtual void setPeriod(char c);
	virtual char period() const;
	
	virtual bool operator==(const TabNoteEffect& effect) const;
	virtual bool operator!=(const TabNoteEffect& effect) const;
	
private:
	bool mAccentuated;
	bool mGhostNote;
	bool mTieNote;
	bool mHammerOnPullOff;
	bool mLetRing;
	Dynamic mDynamic;
	TabFingering mFingeringLeft;
	TabFingering mFingeringRight;
	char mTremolo;
	Slide mSlide;
	bool mLeftHandVibrato;
	bool mPalmMute;
	bool mStaccato;
	Harmonic mHarmonic;
	
	TabGraceNote* mGraceNote;
	TabBend* mBend;
	TabTrill* mTrill;
};

#endif
