/***************************************************************************
 * settabfret.h: implementation of SetTabFret class
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2003-2006 the KTabEdit development team <mrgwen@gmail.com>
 * 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 SETTABFRET_H
#define SETTABFRET_H

#include <QWidget>
#include <QResizeEvent>
#include <QComboBox>
#include <QSpinBox>

#include "global.h"
#include "settab.h"

class RadiusTuner;

/*!
	TODO
*/
class SetTabFret
: public QWidget,
  public SetTab
{
    Q_OBJECT
public:
	/*!
		TODO
	*/
	SetTabFret(QWidget *parent);
	
	/*!
		TODO
	*/
	void setString(int n);
	
	/*!
		TODO
	*/
	void setFrets(int n);
	
	/*!
		TODO
	*/
	void setTune(uchar x, uchar n);
	
	/*!
		TODO
	*/
	uchar strings() const;
	
	/*!
		TODO
	*/
	uchar frets() const;
	
	/*!
		TODO
	*/
	uchar tune(uchar x) const;
	
public slots:
	/*!
		TODO
	*/
	void setLibTuning(int n);
	
	/*!
		TODO
	*/
	void stringChanged(int n);
	
	/*!
		TODO
	*/
	void tuneChanged();
	
private:
    virtual void resizeEvent(QResizeEvent *e);
    void reposTuners();

    QComboBox *lib;
    QSpinBox *st,*fr;
    RadiusTuner *tuner[MAX_STRINGS];
    int oldst;
};

#endif
