2012-01-29 04:06:07 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Simple x264 Launcher
|
|
|
|
// Copyright (C) 2004-2012 LoRd_MuldeR <MuldeR2@GMX.de>
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License along
|
|
|
|
// with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
//
|
|
|
|
// http://www.gnu.org/licenses/gpl-2.0.txt
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "uic_win_addJob.h"
|
|
|
|
|
2012-01-29 19:14:46 +01:00
|
|
|
class OptionsModel;
|
|
|
|
|
2012-01-29 15:57:23 +01:00
|
|
|
class AddJobDialog : public QDialog, private Ui::AddJobDialog
|
2012-01-29 04:06:07 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2012-01-29 19:14:46 +01:00
|
|
|
AddJobDialog(QWidget *parent, OptionsModel *options);
|
2012-01-29 04:06:07 +01:00
|
|
|
~AddJobDialog(void);
|
|
|
|
|
2012-01-29 21:31:09 +01:00
|
|
|
QString sourceFile(void);
|
|
|
|
QString outputFile(void);
|
2012-01-29 15:57:23 +01:00
|
|
|
QString preset(void) { return cbxPreset->itemText(cbxPreset->currentIndex()); }
|
|
|
|
QString tuning(void) { return cbxTuning->itemText(cbxTuning->currentIndex()); }
|
|
|
|
QString profile(void) { return cbxProfile->itemText(cbxProfile->currentIndex()); }
|
|
|
|
QString params(void) { return cbxCustomParams->currentText().simplified(); }
|
|
|
|
bool runImmediately(void) { return checkBoxRun->isChecked(); }
|
|
|
|
void setRunImmediately(bool run) { checkBoxRun->setChecked(run); }
|
|
|
|
|
2012-01-29 04:06:07 +01:00
|
|
|
protected:
|
2012-01-29 19:14:46 +01:00
|
|
|
OptionsModel *m_options;
|
|
|
|
|
2012-01-29 04:06:07 +01:00
|
|
|
virtual void AddJobDialog::showEvent(QShowEvent *event);
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void modeIndexChanged(int index);
|
2012-01-29 15:57:23 +01:00
|
|
|
void browseButtonClicked(void);
|
|
|
|
|
|
|
|
virtual void accept(void);
|
2012-01-29 19:14:46 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
void restoreOptions(OptionsModel *options);
|
|
|
|
void saveOptions(OptionsModel *options);
|
|
|
|
void updateComboBox(QComboBox *cbox, const QString &text);
|
2012-01-29 04:06:07 +01:00
|
|
|
};
|