1 ///////////////////////////////////////////////////////////////////////////////
2 // Simple x264 Launcher
3 // Copyright (C) 2004-2012 LoRd_MuldeR <MuldeR2@GMX.de>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License along
16 // with this program; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // http://www.gnu.org/licenses/gpl-2.0.txt
20 ///////////////////////////////////////////////////////////////////////////////
25 #include "model_jobList.h"
26 #include "model_options.h"
27 #include "win_addJob.h"
31 #include <QCloseEvent>
32 #include <QMessageBox>
33 #include <QDesktopServices>
39 //#include <Shellapi.h>
41 const char *home_url = "http://mulder.brhack.net/";
43 #define SET_FONT_BOLD(WIDGET,BOLD) { QFont _font = WIDGET->font(); _font.setBold(BOLD); WIDGET->setFont(_font); }
44 #define SET_TEXT_COLOR(WIDGET,COLOR) { QPalette _palette = WIDGET->palette(); _palette.setColor(QPalette::WindowText, (COLOR)); _palette.setColor(QPalette::Text, (COLOR)); WIDGET->setPalette(_palette); }
46 ///////////////////////////////////////////////////////////////////////////////
47 // Constructor & Destructor
48 ///////////////////////////////////////////////////////////////////////////////
50 MainWindow::MainWindow(bool x64supported)
52 m_x64supported(x64supported),
53 m_appDir(QApplication::applicationDirPath()),
56 //Init the dialog, from the .ui file
58 setWindowFlags(windowFlags() & (~Qt::WindowMaximizeButtonHint));
61 qRegisterMetaType<QUuid>("QUuid");
62 qRegisterMetaType<EncodeThread::JobStatus>("EncodeThread::JobStatus");
65 setMinimumSize(size());
66 splitter->setSizes(QList<int>() << 16 << 196);
69 labelBuildDate->setText(tr("Built on %1 at %2").arg(x264_version_date().toString(Qt::ISODate), QString::fromLatin1(x264_version_time())));
70 labelBuildDate->installEventFilter(this);
71 setWindowTitle(QString("%1 (%2 Mode)").arg(windowTitle(), m_x64supported ? "64-Bit" : "32-Bit"));
72 if(x264_is_prerelease()) setWindowTitle(QString("%1 | PRE-RELEASE VERSION").arg(windowTitle()));
76 m_jobList = new JobListModel();
77 connect(m_jobList, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(jobChangedData(QModelIndex, QModelIndex)));
78 jobsView->setModel(m_jobList);
81 jobsView->horizontalHeader()->setSectionHidden(3, true);
82 jobsView->horizontalHeader()->setResizeMode(0, QHeaderView::Stretch);
83 jobsView->horizontalHeader()->setResizeMode(1, QHeaderView::Fixed);
84 jobsView->horizontalHeader()->setResizeMode(2, QHeaderView::Fixed);
85 jobsView->horizontalHeader()->resizeSection(1, 150);
86 jobsView->horizontalHeader()->resizeSection(2, 90);
87 jobsView->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents);
88 connect(jobsView->selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), this, SLOT(jobSelected(QModelIndex, QModelIndex)));
91 QAction *actionClipboard = new QAction(QIcon(":/buttons/page_paste.png"), tr("Copy to Clipboard"), logView);
92 actionClipboard->setEnabled(false);
93 logView->addAction(actionClipboard);
94 connect(actionClipboard, SIGNAL(triggered(bool)), this, SLOT(copyLogToClipboard(bool)));
95 jobsView->addActions(menuJob->actions());
98 connect(buttonAddJob, SIGNAL(clicked()), this, SLOT(addButtonPressed()));
99 connect(buttonStartJob, SIGNAL(clicked()), this, SLOT(startButtonPressed()));
100 connect(buttonAbortJob, SIGNAL(clicked()), this, SLOT(abortButtonPressed()));
101 connect(buttonPauseJob, SIGNAL(toggled(bool)), this, SLOT(pauseButtonPressed(bool)));
102 connect(actionJob_Delete, SIGNAL(triggered()), this, SLOT(deleteButtonPressed()));
103 connect(actionJob_Browse, SIGNAL(triggered()), this, SLOT(browseButtonPressed()));
106 connect(actionAbout, SIGNAL(triggered()), this, SLOT(showAbout()));
107 connect(actionWebMulder, SIGNAL(triggered()), this, SLOT(showWebLink()));
108 connect(actionWebX264, SIGNAL(triggered()), this, SLOT(showWebLink()));
109 connect(actionWebKomisar, SIGNAL(triggered()), this, SLOT(showWebLink()));
110 connect(actionWebJarod, SIGNAL(triggered()), this, SLOT(showWebLink()));
111 connect(actionWebWiki, SIGNAL(triggered()), this, SLOT(showWebLink()));
112 connect(actionWebBluRay, SIGNAL(triggered()), this, SLOT(showWebLink()));
114 //Create floating label
115 m_label = new QLabel(jobsView);
116 m_label->setText(tr("No job created yet. Please click the 'Add New Job' button!"));
117 m_label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
118 SET_TEXT_COLOR(m_label, Qt::darkGray);
119 SET_FONT_BOLD(m_label, true);
120 m_label->setVisible(true);
121 m_label->setContextMenuPolicy(Qt::ActionsContextMenu);
122 m_label->addActions(jobsView->actions());
123 connect(splitter, SIGNAL(splitterMoved(int, int)), this, SLOT(updateLabel()));
126 //Create options object
127 m_options = new OptionsModel();
130 MainWindow::~MainWindow(void)
132 X264_DELETE(m_jobList);
133 X264_DELETE(m_options);
134 X264_DELETE(m_label);
136 while(!m_toolsList.isEmpty())
138 QFile *temp = m_toolsList.takeFirst();
143 ///////////////////////////////////////////////////////////////////////////////
145 ///////////////////////////////////////////////////////////////////////////////
147 void MainWindow::addButtonPressed(const QString &filePath, bool *ok)
151 AddJobDialog *addDialog = new AddJobDialog(this, m_options);
152 addDialog->setRunImmediately(!havePendingJobs());
153 if(!filePath.isEmpty()) addDialog->setSourceFile(filePath);
154 int result = addDialog->exec();
156 if(result == QDialog::Accepted)
159 EncodeThread *thrd = new EncodeThread
161 addDialog->sourceFile(),
162 addDialog->outputFile(),
164 QString("%1/toolset").arg(m_appDir),
168 QModelIndex newIndex = m_jobList->insertJob(thrd);
170 if(newIndex.isValid())
172 if(addDialog->runImmediately())
174 jobsView->selectRow(newIndex.row());
175 QApplication::processEvents(QEventLoop::ExcludeUserInputEvents);
176 m_jobList->startJob(newIndex);
183 m_label->setVisible(m_jobList->rowCount(QModelIndex()) == 0);
184 X264_DELETE(addDialog);
187 void MainWindow::startButtonPressed(void)
189 m_jobList->startJob(jobsView->currentIndex());
192 void MainWindow::abortButtonPressed(void)
194 m_jobList->abortJob(jobsView->currentIndex());
197 void MainWindow::deleteButtonPressed(void)
199 m_jobList->deleteJob(jobsView->currentIndex());
200 m_label->setVisible(m_jobList->rowCount(QModelIndex()) == 0);
203 void MainWindow::browseButtonPressed(void)
205 QString outputFile = m_jobList->getJobOutputFile(jobsView->currentIndex());
206 if((!outputFile.isEmpty()) && QFileInfo(outputFile).exists() && QFileInfo(outputFile).isFile())
208 QProcess::startDetached(QString::fromLatin1("explorer.exe"), QStringList() << QString::fromLatin1("/select,") << QDir::toNativeSeparators(outputFile), QFileInfo(outputFile).path());
212 QMessageBox::warning(this, tr("Not Found"), tr("Sorry, the output file could not be found!"));
216 void MainWindow::pauseButtonPressed(bool checked)
220 m_jobList->pauseJob(jobsView->currentIndex());
224 m_jobList->resumeJob(jobsView->currentIndex());
228 void MainWindow::jobSelected(const QModelIndex & current, const QModelIndex & previous)
230 qDebug("Job selected: %d", current.row());
234 disconnect(logView->model(), SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(jobLogExtended(QModelIndex, int, int)));
237 if(current.isValid())
239 logView->setModel(m_jobList->getLogFile(current));
240 connect(logView->model(), SIGNAL(rowsInserted(QModelIndex, int, int)), this, SLOT(jobLogExtended(QModelIndex, int, int)));
241 logView->actions().first()->setEnabled(true);
242 QTimer::singleShot(0, logView, SLOT(scrollToBottom()));
244 progressBar->setValue(m_jobList->getJobProgress(current));
245 editDetails->setText(m_jobList->data(m_jobList->index(current.row(), 3, QModelIndex()), Qt::DisplayRole).toString());
246 updateButtons(m_jobList->getJobStatus(current));
250 logView->setModel(NULL);
251 logView->actions().first()->setEnabled(false);
252 progressBar->setValue(0);
253 editDetails->clear();
254 updateButtons(EncodeThread::JobStatus_Undefined);
257 progressBar->repaint();
260 void MainWindow::jobChangedData(const QModelIndex &topLeft, const QModelIndex &bottomRight)
262 int selected = jobsView->currentIndex().row();
264 if(topLeft.column() <= 1 && bottomRight.column() >= 1)
266 for(int i = topLeft.row(); i <= bottomRight.row(); i++)
268 EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex()));
271 qDebug("Current job changed status!");
272 updateButtons(status);
274 if(status == EncodeThread::JobStatus_Completed)
276 QTimer::singleShot(0, this, SLOT(launchNextJob()));
280 else if(topLeft.column() <= 2 && bottomRight.column() >= 2)
282 for(int i = topLeft.row(); i <= bottomRight.row(); i++)
286 progressBar->setValue(m_jobList->getJobProgress(m_jobList->index(i, 0, QModelIndex())));
291 else if(topLeft.column() <= 3 && bottomRight.column() >= 3)
293 for(int i = topLeft.row(); i <= bottomRight.row(); i++)
297 editDetails->setText(m_jobList->data(m_jobList->index(i, 3, QModelIndex()), Qt::DisplayRole).toString());
304 void MainWindow::jobLogExtended(const QModelIndex & parent, int start, int end)
306 QTimer::singleShot(0, logView, SLOT(scrollToBottom()));
309 void MainWindow::showAbout(void)
313 text += QString().sprintf("<nobr><tt>Simple x264 Launcher v%u.%02u - use 64-Bit x264 with 32-Bit Avisynth<br>", x264_version_major(), x264_version_minor());
314 text += QString().sprintf("Copyright (c) 2004-%04d LoRd_MuldeR <mulder2@gmx.de>. Some rights reserved.<br>", qMax(x264_version_date().year(),QDate::currentDate().year()));
315 text += QString().sprintf("Built on %s at %s with %s for Win-%s.<br><br>", x264_version_date().toString(Qt::ISODate).toLatin1().constData(), x264_version_time(), x264_version_compiler(), x264_version_arch());
316 text += QString().sprintf("This program is free software: you can redistribute it and/or modify<br>");
317 text += QString().sprintf("it under the terms of the GNU General Public License <http://www.gnu.org/>.<br>");
318 text += QString().sprintf("Note that this program is distributed with ABSOLUTELY NO WARRANTY.<br><br>");
319 text += QString().sprintf("Please check the web-site at <a href=\"%s\">%s</a> for updates !!!<br></tt></nobr>", home_url, home_url);
323 int ret = QMessageBox::information(this, tr("About..."), text.replace("-", "−"), tr("About x264"), tr("About Qt"), tr("Close"));
330 text2 += tr("<nobr><tt>x264 - the best H.264/AVC encoder. Copyright (c) 2003-2012 x264 project.<br>");
331 text2 += tr("Free software library for encoding video streams into the H.264/MPEG-4 AVC format.<br>");
332 text2 += tr("Released under the terms of the GNU General Public License.<br><br>");
333 text2 += tr("Please visit <a href=\"%1\">%1</a> for obtaining a <u>commercial</u> x264 license!<br></tt></nobr>").arg("http://x264licensing.com/");
334 QMessageBox::information(this, tr("About x264"), text2.replace("-", "−"), tr("Close"));
338 QMessageBox::aboutQt(this);
346 void MainWindow::showWebLink(void)
348 if(QObject::sender() == actionWebMulder) QDesktopServices::openUrl(QUrl(home_url));
349 if(QObject::sender() == actionWebX264) QDesktopServices::openUrl(QUrl("http://www.x264.com/"));
350 if(QObject::sender() == actionWebKomisar) QDesktopServices::openUrl(QUrl("http://komisar.gin.by/"));
351 if(QObject::sender() == actionWebJarod) QDesktopServices::openUrl(QUrl("http://www.x264.nl/"));
352 if(QObject::sender() == actionWebWiki) QDesktopServices::openUrl(QUrl("http://mewiki.project357.com/wiki/X264_Settings"));
353 if(QObject::sender() == actionWebBluRay) QDesktopServices::openUrl(QUrl("http://www.x264bluray.com/"));
356 void MainWindow::launchNextJob(void)
358 const int rows = m_jobList->rowCount(QModelIndex());
360 for(int i = 0; i < rows; i++)
362 EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex()));
363 if(status == EncodeThread::JobStatus_Running || status == EncodeThread::JobStatus_Running_Pass1 || status == EncodeThread::JobStatus_Running_Pass2)
365 qWarning("Still have a job running, won't launch next yet!");
370 for(int i = 0; i < rows; i++)
372 EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex()));
373 if(status == EncodeThread::JobStatus_Enqueued)
375 m_jobList->startJob(m_jobList->index(i, 0, QModelIndex()));
380 qWarning("No enqueued jobs left!");
383 void MainWindow::init(void)
385 static const char *binFiles = "x264.exe:x264_x64.exe:avs2yuv.exe";
386 QStringList binaries = QString::fromLatin1(binFiles).split(":", QString::SkipEmptyParts);
391 while(!binaries.isEmpty())
393 qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
394 QString current = binaries.takeFirst();
395 QFile *file = new QFile(QString("%1/toolset/%2").arg(m_appDir, current));
396 if(file->open(QIODevice::ReadOnly))
398 bool binaryTypeOkay = false;
400 if(GetBinaryType(QWCHAR(file->fileName()), &binaryType))
402 binaryTypeOkay = (binaryType == SCS_32BIT_BINARY || binaryType == SCS_64BIT_BINARY);
406 QMessageBox::critical(this, tr("Invalid File!"), tr("<nobr>At least on required tool is not a valid Win32 or Win64 binary:<br>%1<br><br>Please re-install the program in order to fix the problem!</nobr>").arg(QDir::toNativeSeparators(QString("%1/toolset/%2").arg(m_appDir, current))).replace("-", "−"));
407 qFatal(QString("Binary is invalid: %1/toolset/%2").arg(m_appDir, current).toLatin1().constData());
408 close(); qApp->exit(-1); return;
415 QMessageBox::critical(this, tr("File Not Found!"), tr("<nobr>At least on required tool could not be found:<br>%1<br><br>Please re-install the program in order to fix the problem!</nobr>").arg(QDir::toNativeSeparators(QString("%1/toolset/%2").arg(m_appDir, current))).replace("-", "−"));
416 qFatal(QString("Binary not found: %1/toolset/%2").arg(m_appDir, current).toLatin1().constData());
417 close(); qApp->exit(-1); return;
422 if(x264_is_prerelease())
424 qsrand(time(NULL)); int rnd = qrand() % 3;
425 int val = QMessageBox::information(this, tr("Pre-Release Version"), tr("Note: This is a pre-release version. Please do NOT use for production!<br>Click the button #%1 in order to continue...<br><br>(There will be no such message box in the final version of this application)").arg(QString::number(rnd + 1)), tr("(1)"), tr("(2)"), tr("(3)"), qrand() % 3);
426 if(rnd != val) { close(); qApp->exit(-1); return; }
429 //Check for Avisynth support
430 bool avsAvailable = false;
431 QLibrary *avsLib = new QLibrary("avisynth.dll");
434 avsAvailable = (avsLib->resolve("avs_create_script_environment") != NULL);
438 avsLib->unload(); X264_DELETE(avsLib);
439 int val = QMessageBox::warning(this, tr("Avisynth Missing"), tr("<nobr>It appears that Avisynth is not currently installed on your computer.<br>Thus Avisynth input will not be working at all!<br><br>Please download and install Avisynth:<br><a href=\"http://sourceforge.net/projects/avisynth2/files/AviSynth%202.5/\">http://sourceforge.net/projects/avisynth2/files/AviSynth 2.5/</a></nobr>").replace("-", "−"), tr("Quit"), tr("Ignore"));
440 if(val != 1) { close(); qApp->exit(-1); return; }
443 //Check for expiration
444 if(x264_version_date().addMonths(6) < QDate::currentDate())
446 QMessageBox msgBox(this);
447 msgBox.setIcon(QMessageBox::Information);
448 msgBox.setWindowTitle(tr("Update Notification"));
449 msgBox.setWindowFlags(Qt::Window | Qt::WindowTitleHint | Qt::CustomizeWindowHint);
450 msgBox.setText(tr("<nobr><tt>Oups, this version of 'Simple x264 Launcher' is more than 6 months old.<br><br>Please check the official web-site at <a href=\"%1\">%1</a> for updates!<br></tt></nobr>").replace("-", "−").arg(home_url));
451 QPushButton *btn1 = msgBox.addButton(tr("Discard"), QMessageBox::NoRole);
452 QPushButton *btn2 = msgBox.addButton(tr("Discard"), QMessageBox::AcceptRole);
453 btn1->setEnabled(false);
454 btn2->setVisible(false);
455 QTimer::singleShot(5000, btn1, SLOT(hide()));
456 QTimer::singleShot(5000, btn2, SLOT(show()));
461 void MainWindow::updateLabel(void)
463 m_label->setGeometry(0, 0, jobsView->width(), jobsView->height());
466 void MainWindow::copyLogToClipboard(bool checked)
468 qDebug("copyLogToClipboard");
470 if(LogFileModel *log = dynamic_cast<LogFileModel*>(logView->model()))
472 log->copyToClipboard();
473 MessageBeep(MB_ICONINFORMATION);
477 ///////////////////////////////////////////////////////////////////////////////
479 ///////////////////////////////////////////////////////////////////////////////
481 void MainWindow::showEvent(QShowEvent *e)
483 QMainWindow::showEvent(e);
488 QTimer::singleShot(0, this, SLOT(init()));
492 void MainWindow::closeEvent(QCloseEvent *e)
494 if(haveRunningJobs())
497 QMessageBox::warning(this, tr("Jobs Are Running"), tr("Sorry, can not exit while there still are running jobs!"));
501 if(havePendingJobs())
503 int ret = QMessageBox::question(this, tr("Jobs Are Pending"), tr("Do you really want to quit and discard the pending jobs?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
504 if(ret != QMessageBox::Yes)
511 while(m_jobList->rowCount(QModelIndex()) > 0)
513 qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
514 if(!m_jobList->deleteJob(m_jobList->index(0, 0, QModelIndex())))
517 QMessageBox::warning(this, tr("Failed To Exit"), tr("Sorry, at least one job could not be deleted!"));
522 qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
523 QMainWindow::closeEvent(e);
526 void MainWindow::resizeEvent(QResizeEvent *e)
528 QMainWindow::resizeEvent(e);
532 bool MainWindow::eventFilter(QObject *o, QEvent *e)
534 if((o == labelBuildDate) && (e->type() == QEvent::MouseButtonPress))
536 QTimer::singleShot(0, this, SLOT(showAbout()));
543 * File dragged over window
545 void MainWindow::dragEnterEvent(QDragEnterEvent *event)
547 QStringList formats = event->mimeData()->formats();
549 if(formats.contains("application/x-qt-windows-mime;value=\"FileNameW\"", Qt::CaseInsensitive) && formats.contains("text/uri-list", Qt::CaseInsensitive))
551 event->acceptProposedAction();
556 * File dropped onto window
558 void MainWindow::dropEvent(QDropEvent *event)
560 QStringList droppedFiles;
561 QList<QUrl> urls = event->mimeData()->urls();
563 while(!urls.isEmpty())
565 QUrl currentUrl = urls.takeFirst();
566 QFileInfo file(currentUrl.toLocalFile());
567 if(file.exists() && file.isFile())
569 qDebug("Dropped File: %s", file.canonicalFilePath().toUtf8().constData());
570 droppedFiles << file.canonicalFilePath();
577 while((!droppedFiles.isEmpty()) && ok)
579 QString currentFile = droppedFiles.takeFirst();
580 qDebug("Adding file: %s", currentFile.toUtf8().constData());
581 addButtonPressed(currentFile, &ok);
585 ///////////////////////////////////////////////////////////////////////////////
587 ///////////////////////////////////////////////////////////////////////////////
589 /*Jobs that are not completed (or failed, or aborted) yet*/
590 bool MainWindow::havePendingJobs(void)
592 const int rows = m_jobList->rowCount(QModelIndex());
594 for(int i = 0; i < rows; i++)
596 EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex()));
597 if(status != EncodeThread::JobStatus_Completed && status != EncodeThread::JobStatus_Aborted && status != EncodeThread::JobStatus_Failed)
606 /*Jobs that are still active, i.e. not terminated or enqueued*/
607 bool MainWindow::haveRunningJobs(void)
609 const int rows = m_jobList->rowCount(QModelIndex());
611 for(int i = 0; i < rows; i++)
613 EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex()));
614 if(status != EncodeThread::JobStatus_Completed && status != EncodeThread::JobStatus_Aborted && status != EncodeThread::JobStatus_Failed && status != EncodeThread::JobStatus_Enqueued)
623 void MainWindow::updateButtons(EncodeThread::JobStatus status)
625 qDebug("MainWindow::updateButtons(void)");
627 buttonStartJob->setEnabled(status == EncodeThread::JobStatus_Enqueued);
628 buttonAbortJob->setEnabled(status == EncodeThread::JobStatus_Indexing || status == EncodeThread::JobStatus_Running || status == EncodeThread::JobStatus_Running_Pass1 || status == EncodeThread::JobStatus_Running_Pass2 || status == EncodeThread::JobStatus_Paused);
629 buttonPauseJob->setEnabled(status == EncodeThread::JobStatus_Indexing || status == EncodeThread::JobStatus_Running || status == EncodeThread::JobStatus_Paused || status == EncodeThread::JobStatus_Running_Pass1 || status == EncodeThread::JobStatus_Running_Pass2);
630 buttonPauseJob->setChecked(status == EncodeThread::JobStatus_Paused || status == EncodeThread::JobStatus_Pausing);
632 actionJob_Delete->setEnabled(status == EncodeThread::JobStatus_Completed || status == EncodeThread::JobStatus_Aborted || status == EncodeThread::JobStatus_Failed || status == EncodeThread::JobStatus_Enqueued);
633 actionJob_Browse->setEnabled(status == EncodeThread::JobStatus_Completed);
635 actionJob_Start->setEnabled(buttonStartJob->isEnabled());
636 actionJob_Abort->setEnabled(buttonAbortJob->isEnabled());
637 actionJob_Pause->setEnabled(buttonPauseJob->isEnabled());
638 actionJob_Pause->setChecked(buttonPauseJob->isChecked());
640 editDetails->setEnabled(status != EncodeThread::JobStatus_Paused);