From 74ac7077a641d1bb10ee913ca3a4221c4601e6ac Mon Sep 17 00:00:00 2001 From: lordmulder Date: Wed, 3 Jul 2013 21:52:19 +0200 Subject: [PATCH] Some more refactoring. --- src/model_jobList.cpp | 94 +++++++++++++------------- src/model_jobList.h | 6 +- src/model_status.h | 40 +++++++++++ src/thread_encode.h | 22 +----- src/version.h | 2 +- src/win_main.cpp | 68 ++++++++++--------- src/win_main.h | 10 +-- x264_launcher_MSVC2012.vcxproj | 1 + x264_launcher_MSVC2012.vcxproj.filters | 3 + 9 files changed, 139 insertions(+), 107 deletions(-) create mode 100644 src/model_status.h diff --git a/src/model_jobList.cpp b/src/model_jobList.cpp index 9c6a4fa..b5463fa 100644 --- a/src/model_jobList.cpp +++ b/src/model_jobList.cpp @@ -113,43 +113,43 @@ QVariant JobListModel::data(const QModelIndex &index, int role) const case 1: switch(m_status.value(m_jobs.at(index.row()))) { - case EncodeThread::JobStatus_Enqueued: + case JobStatus_Enqueued: return QVariant::fromValue(tr("Enqueued.")); break; - case EncodeThread::JobStatus_Starting: + case JobStatus_Starting: return QVariant::fromValue(tr("Starting...")); break; - case EncodeThread::JobStatus_Indexing: + case JobStatus_Indexing: return QVariant::fromValue(tr("Indexing...")); break; - case EncodeThread::JobStatus_Running: + case JobStatus_Running: return QVariant::fromValue(tr("Running...")); break; - case EncodeThread::JobStatus_Running_Pass1: + case JobStatus_Running_Pass1: return QVariant::fromValue(tr("Running... (Pass 1)")); break; - case EncodeThread::JobStatus_Running_Pass2: + case JobStatus_Running_Pass2: return QVariant::fromValue(tr("Running... (Pass 2)")); break; - case EncodeThread::JobStatus_Completed: + case JobStatus_Completed: return QVariant::fromValue(tr("Completed.")); break; - case EncodeThread::JobStatus_Failed: + case JobStatus_Failed: return QVariant::fromValue(tr("Failed!")); break; - case EncodeThread::JobStatus_Pausing: + case JobStatus_Pausing: return QVariant::fromValue(tr("Pausing...")); break; - case EncodeThread::JobStatus_Paused: + case JobStatus_Paused: return QVariant::fromValue(tr("Paused.")); break; - case EncodeThread::JobStatus_Resuming: + case JobStatus_Resuming: return QVariant::fromValue(tr("Resuming...")); break; - case EncodeThread::JobStatus_Aborting: + case JobStatus_Aborting: return QVariant::fromValue(tr("Aborting...")); break; - case EncodeThread::JobStatus_Aborted: + case JobStatus_Aborted: return QVariant::fromValue(tr("Aborted!")); break; default: @@ -175,39 +175,39 @@ QVariant JobListModel::data(const QModelIndex &index, int role) const { switch(m_status.value(m_jobs.at(index.row()))) { - case EncodeThread::JobStatus_Enqueued: + case JobStatus_Enqueued: return QIcon(":/buttons/hourglass.png"); break; - case EncodeThread::JobStatus_Starting: + case JobStatus_Starting: return QIcon(":/buttons/lightning.png"); break; - case EncodeThread::JobStatus_Indexing: + case JobStatus_Indexing: return QIcon(":/buttons/find.png"); break; - case EncodeThread::JobStatus_Running: - case EncodeThread::JobStatus_Running_Pass1: - case EncodeThread::JobStatus_Running_Pass2: + case JobStatus_Running: + case JobStatus_Running_Pass1: + case JobStatus_Running_Pass2: return QIcon(":/buttons/play.png"); break; - case EncodeThread::JobStatus_Completed: + case JobStatus_Completed: return QIcon(":/buttons/accept.png"); break; - case EncodeThread::JobStatus_Failed: + case JobStatus_Failed: return QIcon(":/buttons/exclamation.png"); break; - case EncodeThread::JobStatus_Pausing: + case JobStatus_Pausing: return QIcon(":/buttons/clock_pause.png"); break; - case EncodeThread::JobStatus_Paused: + case JobStatus_Paused: return QIcon(":/buttons/suspended.png"); break; - case EncodeThread::JobStatus_Resuming: + case JobStatus_Resuming: return QIcon(":/buttons/clock_play.png"); break; - case EncodeThread::JobStatus_Aborting: + case JobStatus_Aborting: return QIcon(":/buttons/clock_stop.png"); break; - case EncodeThread::JobStatus_Aborted: + case JobStatus_Aborted: return QIcon(":/buttons/error.png"); break; default: @@ -278,7 +278,7 @@ QModelIndex JobListModel::insertJob(EncodeThread *thread) beginInsertRows(QModelIndex(), m_jobs.count(), m_jobs.count()); m_jobs.append(id); m_name.insert(id, jobName); - m_status.insert(id, EncodeThread::JobStatus_Enqueued); + m_status.insert(id, JobStatus_Enqueued); m_progress.insert(id, 0); m_threads.insert(id, thread); m_logFile.insert(id, logFile); @@ -298,9 +298,9 @@ bool JobListModel::startJob(const QModelIndex &index) if(index.isValid() && index.row() >= 0 && index.row() < m_jobs.count()) { QUuid id = m_jobs.at(index.row()); - if(m_status.value(id) == EncodeThread::JobStatus_Enqueued) + if(m_status.value(id) == JobStatus_Enqueued) { - updateStatus(id, EncodeThread::JobStatus_Starting); + updateStatus(id, JobStatus_Starting); updateDetails(id, tr("Starting up, please wait...")); m_threads.value(id)->start(); return true; @@ -315,11 +315,11 @@ bool JobListModel::pauseJob(const QModelIndex &index) if(index.isValid() && index.row() >= 0 && index.row() < m_jobs.count()) { QUuid id = m_jobs.at(index.row()); - EncodeThread::JobStatus status = m_status.value(id); - if((status == EncodeThread::JobStatus_Indexing) || (status == EncodeThread::JobStatus_Running) || - (status == EncodeThread::JobStatus_Running_Pass1) || (status == EncodeThread::JobStatus_Running_Pass2)) + JobStatus status = m_status.value(id); + if((status == JobStatus_Indexing) || (status == JobStatus_Running) || + (status == JobStatus_Running_Pass1) || (status == JobStatus_Running_Pass2)) { - updateStatus(id, EncodeThread::JobStatus_Pausing); + updateStatus(id, JobStatus_Pausing); m_threads.value(id)->pauseJob(); return true; } @@ -333,10 +333,10 @@ bool JobListModel::resumeJob(const QModelIndex &index) if(index.isValid() && index.row() >= 0 && index.row() < m_jobs.count()) { QUuid id = m_jobs.at(index.row()); - EncodeThread::JobStatus status = m_status.value(id); - if(status == EncodeThread::JobStatus_Paused) + JobStatus status = m_status.value(id); + if(status == JobStatus_Paused) { - updateStatus(id, EncodeThread::JobStatus_Resuming); + updateStatus(id, JobStatus_Resuming); m_threads.value(id)->resumeJob(); return true; } @@ -350,10 +350,10 @@ bool JobListModel::abortJob(const QModelIndex &index) if(index.isValid() && index.row() >= 0 && index.row() < m_jobs.count()) { QUuid id = m_jobs.at(index.row()); - if(m_status.value(id) == EncodeThread::JobStatus_Indexing || m_status.value(id) == EncodeThread::JobStatus_Running || - m_status.value(id) == EncodeThread::JobStatus_Running_Pass1 || EncodeThread::JobStatus_Running_Pass2) + if(m_status.value(id) == JobStatus_Indexing || m_status.value(id) == JobStatus_Running || + m_status.value(id) == JobStatus_Running_Pass1 || JobStatus_Running_Pass2) { - updateStatus(id, EncodeThread::JobStatus_Aborting); + updateStatus(id, JobStatus_Aborting); m_threads.value(id)->abortJob(); return true; } @@ -367,8 +367,8 @@ bool JobListModel::deleteJob(const QModelIndex &index) if(index.isValid() && index.row() >= 0 && index.row() < m_jobs.count()) { QUuid id = m_jobs.at(index.row()); - if(m_status.value(id) == EncodeThread::JobStatus_Completed || m_status.value(id) == EncodeThread::JobStatus_Failed || - m_status.value(id) == EncodeThread::JobStatus_Aborted || m_status.value(id) == EncodeThread::JobStatus_Enqueued) + if(m_status.value(id) == JobStatus_Completed || m_status.value(id) == JobStatus_Failed || + m_status.value(id) == JobStatus_Aborted || m_status.value(id) == JobStatus_Enqueued) { int idx = index.row(); QUuid id = m_jobs.at(idx); @@ -432,14 +432,14 @@ const QString &JobListModel::getJobOutputFile(const QModelIndex &index) return nullStr; } -EncodeThread::JobStatus JobListModel::getJobStatus(const QModelIndex &index) +JobStatus JobListModel::getJobStatus(const QModelIndex &index) { if(index.isValid() && index.row() >= 0 && index.row() < m_jobs.count()) { return m_status.value(m_jobs.at(index.row())); } - return static_cast(-1); + return static_cast(-1); } unsigned int JobListModel::getJobProgress(const QModelIndex &index) @@ -479,7 +479,7 @@ QModelIndex JobListModel::getJobIndexById(const QUuid &id) // Slots /////////////////////////////////////////////////////////////////////////////// -void JobListModel::updateStatus(const QUuid &jobId, EncodeThread::JobStatus newStatus) +void JobListModel::updateStatus(const QUuid &jobId, JobStatus newStatus) { int index = -1; @@ -492,13 +492,13 @@ void JobListModel::updateStatus(const QUuid &jobId, EncodeThread::JobStatus newS { switch(newStatus) { - case EncodeThread::JobStatus_Completed: + case JobStatus_Completed: PlaySound(MAKEINTRESOURCE(IDR_WAVE4), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC); break; - case EncodeThread::JobStatus_Aborted: + case JobStatus_Aborted: PlaySound(MAKEINTRESOURCE(IDR_WAVE5), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC); break; - case EncodeThread::JobStatus_Failed: + case JobStatus_Failed: PlaySound(MAKEINTRESOURCE(IDR_WAVE6), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC); break; } diff --git a/src/model_jobList.h b/src/model_jobList.h index 2774c6f..9357fd7 100644 --- a/src/model_jobList.h +++ b/src/model_jobList.h @@ -55,7 +55,7 @@ public: LogFileModel *getLogFile(const QModelIndex &index); const QString &getJobSourceFile(const QModelIndex &index); const QString &getJobOutputFile(const QModelIndex &index); - EncodeThread::JobStatus getJobStatus(const QModelIndex &index); + JobStatus getJobStatus(const QModelIndex &index); unsigned int getJobProgress(const QModelIndex &index); const OptionsModel *getJobOptions(const QModelIndex &index); QModelIndex getJobIndexById(const QUuid &id); @@ -64,14 +64,14 @@ protected: QList m_jobs; QMap m_name; QMap m_threads; - QMap m_status; + QMap m_status; QMap m_progress; QMap m_logFile; QMap m_details; PreferencesModel *m_preferences; public slots: - void updateStatus(const QUuid &jobId, EncodeThread::JobStatus newStatus); + void updateStatus(const QUuid &jobId, JobStatus newStatus); void updateProgress(const QUuid &jobId, unsigned int newProgress); void updateDetails(const QUuid &jobId, const QString &details); }; diff --git a/src/model_status.h b/src/model_status.h new file mode 100644 index 0000000..8f60a0b --- /dev/null +++ b/src/model_status.h @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////// +// Simple x264 Launcher +// Copyright (C) 2004-2013 LoRd_MuldeR +// +// 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 + +enum JobStatus +{ + JobStatus_Enqueued = 0, + JobStatus_Starting = 1, + JobStatus_Indexing = 2, + JobStatus_Running = 3, + JobStatus_Running_Pass1 = 4, + JobStatus_Running_Pass2 = 5, + JobStatus_Completed = 6, + JobStatus_Failed = 7, + JobStatus_Pausing = 8, + JobStatus_Paused = 9, + JobStatus_Resuming = 10, + JobStatus_Aborting = 11, + JobStatus_Aborted = 12, + JobStatus_Undefined = 666 +}; diff --git a/src/thread_encode.h b/src/thread_encode.h index f943fd0..f06f702 100644 --- a/src/thread_encode.h +++ b/src/thread_encode.h @@ -21,6 +21,8 @@ #pragma once +#include "model_status.h" + #include #include #include @@ -35,24 +37,6 @@ class EncodeThread : public QThread Q_OBJECT public: - enum JobStatus - { - JobStatus_Enqueued = 0, - JobStatus_Starting = 1, - JobStatus_Indexing = 2, - JobStatus_Running = 3, - JobStatus_Running_Pass1 = 4, - JobStatus_Running_Pass2 = 5, - JobStatus_Completed = 6, - JobStatus_Failed = 7, - JobStatus_Pausing = 8, - JobStatus_Paused = 9, - JobStatus_Resuming = 10, - JobStatus_Aborting = 11, - JobStatus_Aborted = 12, - JobStatus_Undefined = 666 - }; - EncodeThread(const QString &sourceFileName, const QString &outputFileName, const OptionsModel *options, const QString &binDir, bool x264_x64, bool x264_10bit, bool avs2yuv_x64, int processPriroity); ~EncodeThread(void); @@ -136,7 +120,7 @@ protected: static void setPorcessPriority(void *processId, int priroity); signals: - void statusChanged(const QUuid &jobId, EncodeThread::JobStatus newStatus); + void statusChanged(const QUuid &jobId, JobStatus newStatus); void progressChanged(const QUuid &jobId, unsigned int newProgress); void messageLogged(const QUuid &jobId, const QString &text); void detailsChanged(const QUuid &jobId, const QString &details); diff --git a/src/version.h b/src/version.h index 2862f9e..d75aae3 100644 --- a/src/version.h +++ b/src/version.h @@ -22,7 +22,7 @@ #define VER_X264_MAJOR 2 #define VER_X264_MINOR 1 #define VER_X264_PATCH 5 -#define VER_X264_BUILD 494 +#define VER_X264_BUILD 497 #define VER_X264_MINIMUM_REV 2282 #define VER_X264_CURRENT_API 133 diff --git a/src/win_main.cpp b/src/win_main.cpp index 976f0a8..6399eeb 100644 --- a/src/win_main.cpp +++ b/src/win_main.cpp @@ -26,6 +26,8 @@ #include "model_preferences.h" #include "model_recently.h" #include "thread_avisynth.h" +#include "thread_ipc.h" +#include "thread_encode.h" #include "taskbar7.h" #include "win_addJob.h" #include "win_preferences.h" @@ -82,7 +84,7 @@ MainWindow::MainWindow(const x264_cpu_t *const cpuFeatures) //Register meta types qRegisterMetaType("QUuid"); qRegisterMetaType("DWORD"); - qRegisterMetaType("EncodeThread::JobStatus"); + qRegisterMetaType("EncodeThread::JobStatus"); //Load preferences m_preferences = new PreferencesModel(); @@ -365,8 +367,8 @@ void MainWindow::jobSelected(const QModelIndex & current, const QModelIndex & pr logView->actions().first()->setEnabled(false); progressBar->setValue(0); editDetails->clear(); - updateButtons(EncodeThread::JobStatus_Undefined); - updateTaskbar(EncodeThread::JobStatus_Undefined, QIcon()); + updateButtons(JobStatus_Undefined); + updateTaskbar(JobStatus_Undefined, QIcon()); } progressBar->repaint(); @@ -383,14 +385,14 @@ void MainWindow::jobChangedData(const QModelIndex &topLeft, const QModelIndex & { for(int i = topLeft.row(); i <= bottomRight.row(); i++) { - EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex())); + JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex())); if(i == selected) { qDebug("Current job changed status!"); updateButtons(status); updateTaskbar(status, m_jobList->data(m_jobList->index(i, 0, QModelIndex()), Qt::DecorationRole).value()); } - if((status == EncodeThread::JobStatus_Completed) || (status == EncodeThread::JobStatus_Failed)) + if((status == JobStatus_Completed) || (status == JobStatus_Failed)) { if(m_preferences->autoRunNextJob()) QTimer::singleShot(0, this, SLOT(launchNextJob())); if(m_preferences->shutdownComputer()) QTimer::singleShot(0, this, SLOT(shutdownComputer())); @@ -554,8 +556,8 @@ void MainWindow::launchNextJob(void) for(int i = 0; i < rows; i++) { int currentIdx = (i + startIdx) % rows; - EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(currentIdx, 0, QModelIndex())); - if(status == EncodeThread::JobStatus_Enqueued) + JobStatus status = m_jobList->getJobStatus(m_jobList->index(currentIdx, 0, QModelIndex())); + if(status == JobStatus_Enqueued) { if(m_jobList->startJob(m_jobList->index(currentIdx, 0, QModelIndex()))) { @@ -1149,8 +1151,8 @@ unsigned int MainWindow::countPendingJobs(void) for(int i = 0; i < rows; i++) { - EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex())); - if(status != EncodeThread::JobStatus_Completed && status != EncodeThread::JobStatus_Aborted && status != EncodeThread::JobStatus_Failed) + JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex())); + if(status != JobStatus_Completed && status != JobStatus_Aborted && status != JobStatus_Failed) { count++; } @@ -1169,8 +1171,8 @@ unsigned int MainWindow::countRunningJobs(void) for(int i = 0; i < rows; i++) { - EncodeThread::JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex())); - if(status != EncodeThread::JobStatus_Completed && status != EncodeThread::JobStatus_Aborted && status != EncodeThread::JobStatus_Failed && status != EncodeThread::JobStatus_Enqueued) + JobStatus status = m_jobList->getJobStatus(m_jobList->index(i, 0, QModelIndex())); + if(status != JobStatus_Completed && status != JobStatus_Aborted && status != JobStatus_Failed && status != JobStatus_Enqueued) { count++; } @@ -1182,50 +1184,50 @@ unsigned int MainWindow::countRunningJobs(void) /* * Update all buttons with respect to current job status */ -void MainWindow::updateButtons(EncodeThread::JobStatus status) +void MainWindow::updateButtons(JobStatus status) { qDebug("MainWindow::updateButtons(void)"); - buttonStartJob->setEnabled(status == EncodeThread::JobStatus_Enqueued); - buttonAbortJob->setEnabled(status == EncodeThread::JobStatus_Indexing || status == EncodeThread::JobStatus_Running || status == EncodeThread::JobStatus_Running_Pass1 || status == EncodeThread::JobStatus_Running_Pass2 || status == EncodeThread::JobStatus_Paused); - buttonPauseJob->setEnabled(status == EncodeThread::JobStatus_Indexing || status == EncodeThread::JobStatus_Running || status == EncodeThread::JobStatus_Paused || status == EncodeThread::JobStatus_Running_Pass1 || status == EncodeThread::JobStatus_Running_Pass2); - buttonPauseJob->setChecked(status == EncodeThread::JobStatus_Paused || status == EncodeThread::JobStatus_Pausing); + buttonStartJob->setEnabled(status == JobStatus_Enqueued); + buttonAbortJob->setEnabled(status == JobStatus_Indexing || status == JobStatus_Running || status == JobStatus_Running_Pass1 || status == JobStatus_Running_Pass2 || status == JobStatus_Paused); + buttonPauseJob->setEnabled(status == JobStatus_Indexing || status == JobStatus_Running || status == JobStatus_Paused || status == JobStatus_Running_Pass1 || status == JobStatus_Running_Pass2); + buttonPauseJob->setChecked(status == JobStatus_Paused || status == JobStatus_Pausing); - actionJob_Delete->setEnabled(status == EncodeThread::JobStatus_Completed || status == EncodeThread::JobStatus_Aborted || status == EncodeThread::JobStatus_Failed || status == EncodeThread::JobStatus_Enqueued); - actionJob_Restart->setEnabled(status == EncodeThread::JobStatus_Completed || status == EncodeThread::JobStatus_Aborted || status == EncodeThread::JobStatus_Failed || status == EncodeThread::JobStatus_Enqueued); - actionJob_Browse->setEnabled(status == EncodeThread::JobStatus_Completed); + actionJob_Delete->setEnabled(status == JobStatus_Completed || status == JobStatus_Aborted || status == JobStatus_Failed || status == JobStatus_Enqueued); + actionJob_Restart->setEnabled(status == JobStatus_Completed || status == JobStatus_Aborted || status == JobStatus_Failed || status == JobStatus_Enqueued); + actionJob_Browse->setEnabled(status == JobStatus_Completed); actionJob_Start->setEnabled(buttonStartJob->isEnabled()); actionJob_Abort->setEnabled(buttonAbortJob->isEnabled()); actionJob_Pause->setEnabled(buttonPauseJob->isEnabled()); actionJob_Pause->setChecked(buttonPauseJob->isChecked()); - editDetails->setEnabled(status != EncodeThread::JobStatus_Paused); + editDetails->setEnabled(status != JobStatus_Paused); } /* * Update the taskbar with current job status */ -void MainWindow::updateTaskbar(EncodeThread::JobStatus status, const QIcon &icon) +void MainWindow::updateTaskbar(JobStatus status, const QIcon &icon) { qDebug("MainWindow::updateTaskbar(void)"); switch(status) { - case EncodeThread::JobStatus_Undefined: + case JobStatus_Undefined: WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarNoState); break; - case EncodeThread::JobStatus_Aborting: - case EncodeThread::JobStatus_Starting: - case EncodeThread::JobStatus_Pausing: - case EncodeThread::JobStatus_Resuming: + case JobStatus_Aborting: + case JobStatus_Starting: + case JobStatus_Pausing: + case JobStatus_Resuming: WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarIndeterminateState); break; - case EncodeThread::JobStatus_Aborted: - case EncodeThread::JobStatus_Failed: + case JobStatus_Aborted: + case JobStatus_Failed: WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarErrorState); break; - case EncodeThread::JobStatus_Paused: + case JobStatus_Paused: WinSevenTaskbar::setTaskbarState(this, WinSevenTaskbar::WinSevenTaskbarPausedState); break; default: @@ -1235,10 +1237,10 @@ void MainWindow::updateTaskbar(EncodeThread::JobStatus status, const QIcon &icon switch(status) { - case EncodeThread::JobStatus_Aborting: - case EncodeThread::JobStatus_Starting: - case EncodeThread::JobStatus_Pausing: - case EncodeThread::JobStatus_Resuming: + case JobStatus_Aborting: + case JobStatus_Starting: + case JobStatus_Pausing: + case JobStatus_Resuming: break; default: WinSevenTaskbar::setTaskbarProgress(this, progressBar->value(), progressBar->maximum()); diff --git a/src/win_main.h b/src/win_main.h index 23bd88f..291fd1f 100644 --- a/src/win_main.h +++ b/src/win_main.h @@ -22,8 +22,9 @@ #pragma once #include "uic_win_main.h" -#include "thread_ipc.h" -#include "thread_encode.h" + +#include "global.h" +#include "model_status.h" class JobListModel; class OptionsModel; @@ -31,6 +32,7 @@ class QFile; class QLibrary; class PreferencesModel; class RecentlyUsed; +class IPCThread; class MainWindow: public QMainWindow, private Ui::MainWindow { @@ -69,8 +71,8 @@ private: bool createJobMultiple(const QStringList &filePathIn); bool appendJob(const QString &sourceFileName, const QString &outputFileName, OptionsModel *options, const bool runImmediately); - void updateButtons(EncodeThread::JobStatus status); - void updateTaskbar(EncodeThread::JobStatus status, const QIcon &icon); + void updateButtons(JobStatus status); + void updateTaskbar(JobStatus status, const QIcon &icon); unsigned int countPendingJobs(void); unsigned int countRunningJobs(void); diff --git a/x264_launcher_MSVC2012.vcxproj b/x264_launcher_MSVC2012.vcxproj index 9e24ad3..7ef48c7 100644 --- a/x264_launcher_MSVC2012.vcxproj +++ b/x264_launcher_MSVC2012.vcxproj @@ -285,6 +285,7 @@ copy /Y "$(QTDIR)\plugins\imageformats\qgif4.dll" "$(TargetDir)\imageformats" + diff --git a/x264_launcher_MSVC2012.vcxproj.filters b/x264_launcher_MSVC2012.vcxproj.filters index 789e62f..fca02ff 100644 --- a/x264_launcher_MSVC2012.vcxproj.filters +++ b/x264_launcher_MSVC2012.vcxproj.filters @@ -54,6 +54,9 @@ Header Files + + Header Files +