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

#include <vector>

#include <QString>
#include <QFontMetrics>

#include "drawingitem.h"
#include "tablature/trackproperties.h"
#include "qcanvascm/qcanvastextcm.h"

class QCanvasEllipseCm;

class TrackTuningView : public DrawingItem
{
public:
	TrackTuningView(const TrackProperties* trackProperties, uint dpi);
	virtual ~TrackTuningView();
	
	virtual void hide();
	virtual void show();
	
	virtual QRectCm boundingRect() const;
	virtual Cm height() const;
	virtual Cm width() const;
	
	virtual void initObjects();
	
	virtual QPointCm drawTuningName(const QString& name);
	virtual void drawTuning(const Cm& heightPos);
	
	virtual QString tuningName() const;
private:
	const TrackProperties* mTrackProperties;
	QFont mFont;
	QFontMetrics mFontMetric;
	std::vector<QCanvasEllipseCm*> mEllipse[2];
	std::vector<QCanvasTextCm*>    mCanvasText[2];
	QCanvasTextCm mTuningDescription;
	bool mDraw;
};

#endif
