/***************************************************************************
 * options.h: implementation of Options 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 OPTIONS_H
#define OPTIONS_H

#include <KConfigDialog>
#include <QList>
#include <tse3/Error.h>
#include <tse3/listen/Transport.h>
#include <tse3/Metronome.h>
#include <tse3/MidiScheduler.h>
#include <tse3/Part.h>
#include <tse3/PhraseEdit.h>
#include <tse3/Song.h>
#include <tse3/TempoTrack.h>
#include <tse3/Track.h>
#include <tse3/Transport.h>
#include <tse3/util/MidiScheduler.h>

class QFrame;
class QVBoxLayout;
class OptionsPage;

/**
	The Options class.  This class create the dialog box and the different
	options widget inside this dioalog box.
*/
class Options: public KConfigDialog {
	Q_OBJECT
public:
	/**
		Construct the dialog box and the different widgets.
		The constructor creates the widget and inits the parent (optionPage).
		@param midiFactory used to create the midi scheduler
		@param scheduler the midi scheduler
		@param config config is used to read and write the KTabEdit config file
		@param parent the widget parent
		@param name the widget name
		@param modal the dialog is or isn't modal
	*/
	Options(TSE3::MidiSchedulerFactory& midiFactory, TSE3::MidiScheduler** scheduler, KConfig* config, QWidget* parent);
	
	/**
		The destructor.
		It does nothing.
	*/
	~Options();
	
protected slots:
	/**
		Called when the user click on the Apply button.
		The timidity configuration is written on the KTabEdit config file.
	*/
	void applyBtnClicked();
	
	/**
		Called when the user click on the Default button.
		It does nothing.
	*/
	void defaultBtnClicked();
	
private:
	QList<QFrame*> mOptPage;
	QList<OptionsPage*> mOptWidget;
	QList<QVBoxLayout*> mLayout;
};

#endif
