/*****************************************************************************
 *
 *  preferencesdialog.h -- Set application preferences.
 *
 *  Copyright (C) 2010 Starbuck <starbuck@labdv.com>
 *  All rights reserved.
 *
 *  This file is part of the Gui4 module of the DVDx 4 application.
 *
 *  GNU Lesser General Public License Usage
 *  This file may be used under the terms of the GNU Lesser General
 *  Public License version 2.1 as published by the Free Software
 *  Foundation and appearing in the file LICENSE.LGPL included in the
 *  packaging of this file.  Please review the following information to
 *  ensure the GNU Lesser General Public License version 2.1 requirements
 *  will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
 *
 *  GNU General Public License Usage
 *  Alternatively, this file may be used under the terms of the GNU
 *  General Public License version 3.0 as published by the Free Software
 *  Foundation and appearing in the file LICENSE.GPL included in the
 *  packaging of this file.  Please review the following information to
 *  ensure the GNU General Public License version 3.0 requirements will be
 *  met: http://www.gnu.org/copyleft/gpl.html.
 *
 *****************************************************************************/

#ifndef PREFERENCESDIALOG_H
#define PREFERENCESDIALOG_H

#include "mainwindow.h"
#include <QDialog>
#include <QLineEdit>
#include <QDialogButtonBox>

class PreferencesDialog : public QDialog
{
	Q_OBJECT

public:
	PreferencesDialog(MainWindow::Preferences *preferences, QWidget *parent = 0);

private slots:
	void accept();
	void resetPreferences();
	void resetTimingPreferences();

private:
	void setControlValues();

private:
	MainWindow::Preferences *preferences;
	MainWindow *mainWindow;

	QTabWidget *tabWidget;
	QWidget *mainTab;
	QWidget *timingTab;
	QVBoxLayout *verticalLayout;

	QCheckBox *dvdIgnoreShortTitles;
	QLineEdit *dvdTitleMinLengthEdit;

	QLineEdit *numTestFramesEdit;
	QLineEdit *numTestChapterEdit;
	QLineEdit *numTestPositionEdit;

	QLineEdit *numFramesToValidEdit;
	QLineEdit *numSizeToValidEdit;

	QLineEdit *outputNameEdit;
	QCheckBox *forceOutputName;

	QLineEdit *encLatencyStartEdit;
	QLineEdit *encLatencyFinishedEdit;
	QLineEdit *encLatencyKillEdit;

	QLineEdit *playLatencyStartEdit;
	QLineEdit *playLatencyFinishedEdit;
	QLineEdit *playLatencyKillEdit;
	QLineEdit *playPollTicksEdit;

	QDialogButtonBox *buttonBox;
};

#endif
