/***************************************************************************
 * optionstimidy.h: implementation of OptionsTimidity 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 OPTIONSTIMIDITY_H
#define OPTIONSTIMIDITY_H

#include <KConfig>
#include <QCheckBox>
#include <QComboBox>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QSpinBox>
#include <QVBoxLayout>
#include <QWidget>

#include "optionspage.h"

/**
	The OptionsTimidity class. This class creates a widget inside this
	widget the user can configure the timidity options.
*/
class OptionsTimidity: public OptionsPage {
	Q_OBJECT
public:
	/**
		Construct the timidity widget.
		The constructor creates the widget and inits the parent (optionPage). Here are some
		examples of the timidity options :
			output, reverb, noise, chorus, vlpf, ...
		@param config config is used to read and write the KTabEdit config file.
		@param parent the widget parent
		@param name the widget name
	*/
	OptionsTimidity(KConfig* config, QWidget* parent);
	
	/**
		Called when the user click on the Apply button.
		The timidity configuration is written on the KTabEdit config file.
	*/
	virtual void applyBtnClicked();
	
	/**
		Called when the user click on the Default button.
		It does nothing.
	*/
	virtual void defaultBtnClicked();
	
private slots:
	void search();
	
private:
	virtual void fillOptions();
	
	QLabel mTimidityPathLabel;
	QLineEdit mTimidityPath;
	QPushButton mTimidityButton;
	
	QLabel mBufferLabel;
	QSpinBox mBuffer;
	
	QLabel mFragmentLabel;
	QSpinBox mFragment;
	
	QLabel mOutputLabel;
	QComboBox mOutput;
	
	QLabel mChorusLabel;
	QComboBox mChorus;
	
	QLabel mDelayLabel;
	QComboBox mDelay;
	
	QLabel mReverbLabel;
	QComboBox mReverb;
	
	QLabel mVlpfLabel;
	QComboBox mVlpf;
	
	QLabel mNoiseLabel;
	QComboBox mNoise;
	
	QLabel mResampLabel;
	QComboBox mResamp;
	
	QLabel mFrequencyLabel;
	QSpinBox mFrequency;
	
	QLabel mRealtimeEnableLabel;
	QCheckBox mRealtimeEnable;
	
	QLabel mRealtimeLabel;
	QSpinBox mRealtime;
	
	QVBoxLayout mTimidityLayout;
	QVBoxLayout mBufferLayout;
	QVBoxLayout mFragmentLayout;
	QVBoxLayout mOutputLayout;
	QVBoxLayout mChorusLayout;
	QVBoxLayout mDelayLayout;
	QVBoxLayout mReverbLayout;
	QVBoxLayout mVlpfLayout;
	QVBoxLayout mNoiseLayout;
	QVBoxLayout mResampLayout;
	QVBoxLayout mFrequencyLayout;
	QVBoxLayout mRealtimeEnableLayout;
	QVBoxLayout mRealtimeLayout;
	
	QHBoxLayout mTimidityPathLayout;
};

#endif
