/***************************************************************************
 * notespinbox.h: implementation of NoteValidator 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 NOTESPINBOX_H
#define NOTESPINBOX_H

#include <QValidator>
#include <QWidget>
#include <QString>
#include <QSpinBox>

#include "global.h"

/*!
		TODO
*/
class NoteValidator: public QValidator
{
    Q_OBJECT
public:
	NoteValidator(QWidget *parent) : QValidator(parent) {};
	virtual State validate(QString &input, int &pos) const;
};

class NoteSpinBox: public QSpinBox
{
    Q_OBJECT
public:
	NoteSpinBox(QWidget *parent);
	~NoteSpinBox();
	
private:
    NoteValidator *nv;

    virtual QString mapValueToText(int v);
    virtual int mapTextToValue(bool *ok);
};

#endif
