2010-11-17 19:35:50 +01:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// LameXP - Audio Encoder Front-End
|
|
|
|
// Copyright (C) 2004-2010 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 "../tmp/UIC_ProcessingDialog.h"
|
|
|
|
|
|
|
|
class QMovie;
|
2010-11-18 00:32:46 +01:00
|
|
|
class ProgressModel;
|
|
|
|
class ProcessThread;
|
2010-11-19 21:11:54 +01:00
|
|
|
class FileListModel;
|
|
|
|
class AudioFileModel;
|
2010-11-17 19:35:50 +01:00
|
|
|
|
|
|
|
class ProcessingDialog : public QDialog, private Ui::ProcessingDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2010-11-19 21:11:54 +01:00
|
|
|
ProcessingDialog(FileListModel *fileListModel = NULL);
|
2010-11-17 19:35:50 +01:00
|
|
|
~ProcessingDialog(void);
|
|
|
|
|
2010-11-18 00:32:46 +01:00
|
|
|
private slots:
|
|
|
|
void initEncoding(void);
|
|
|
|
void doneEncoding(void);
|
|
|
|
void abortEncoding(void);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *event);
|
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
bool eventFilter(QObject *obj, QEvent *event);
|
|
|
|
|
2010-11-17 19:35:50 +01:00
|
|
|
private:
|
2010-11-18 00:32:46 +01:00
|
|
|
void setCloseButtonEnabled(bool enabled);
|
2010-11-19 21:11:54 +01:00
|
|
|
void ProcessingDialog::startNextJob(void);
|
2010-11-18 00:32:46 +01:00
|
|
|
|
2010-11-19 21:11:54 +01:00
|
|
|
QList<AudioFileModel> m_pendingJobs;
|
|
|
|
QList<ProcessThread*> m_threadList;
|
2010-11-17 19:35:50 +01:00
|
|
|
QMovie *m_progressIndicator;
|
2010-11-18 00:32:46 +01:00
|
|
|
ProgressModel *m_progressModel;
|
2010-11-19 21:11:54 +01:00
|
|
|
unsigned int m_runningThreads;
|
|
|
|
bool m_userAborted;
|
2010-11-17 19:35:50 +01:00
|
|
|
};
|