/***************************************************************************
 * trackproperties.h: implementation of TrackProperties 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 TRACKPROPERTIES_H
#define TRACKPROPERTIES_H

#include <QColor>
#include <QObject>
#include <QVector>

#include "trackmode.h"
#include "trackmidiproperties.h"
#include "timesignature.h"

class TrackProperties : public QObject
{
	Q_OBJECT
public:
	TrackProperties();
	TrackProperties(TrackMode mode, const QString& name, uchar channel, unsigned int bank, uchar patch, uchar strings, uchar frets);
	//TrackProperties(const TrackProperties& properties);
	virtual ~TrackProperties();
	
	virtual void clone(const TrackProperties* properties);
	
	virtual void setMode(TrackMode mode);
	virtual TrackMode mode() const;
	
	virtual void setName(const QString &string);
	virtual QString name() const;
	
	virtual void setColor(const QColor& c);
	virtual QColor color() const;
	
	virtual void setNbStrings(uchar i);
	virtual uchar nbStrings() const;
	
	virtual void setNbFrets(uchar i);
	virtual uchar nbFrets() const;
	
	virtual void setTune(uchar i, uchar j);
	virtual uchar tune(uchar i) const;
	
	virtual void setCapo(uchar c);
	virtual uchar capo() const;
	
	virtual void setMidiProperties(TrackMidiProperties* midiProperties);
	virtual TrackMidiProperties* midiProperties() const;
	virtual bool hasMidiProperties() const;
	
	virtual void setPatch(uchar i);
	virtual uchar patch() const;
	
	virtual void setChannel(uchar i);
	virtual uchar channel() const;
	
	virtual void setChannelEffects(uchar i);
	virtual uchar channelEffects() const;
	
	virtual void setMidiPort(int i);
	virtual int midiPort() const;
	
	virtual void setBank(unsigned int i);
	virtual unsigned int bank() const;
	
	virtual void setVolume(uchar i);
	virtual uchar volume() const;
	
	virtual void setBalance(char i);
	virtual char balance() const;
	
	virtual void setChorus(uchar i);
	virtual uchar chorus() const;
	
	virtual void setReverb(uchar i);
	virtual uchar reverb() const;
	
	virtual void setPhaser(uchar i);
	virtual uchar phaser() const;
	
	virtual void setTremolo(uchar i);
	virtual uchar tremolo() 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 TrackProperties& trackProperties) const;
	virtual bool operator!=(const TrackProperties& trackProperties) const;
	
	virtual void connectObjects();
	
signals:
	void trackPropertyChanged();
	
private:
	TrackMode trackMode;
	QString nameProp;
	QColor colorTrack;
	uchar nbStringsProp;
	uchar nbFretsProp;
	uchar capoFret;
	QVector<uchar> tuneProp;
	TrackMidiProperties* mMidiProperties;
	TimeSignature* mTimeSignature;
};

#endif
