</property>
<item>
<property name="text">
+ <string>Above Normal</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
<string>Normal</string>
</property>
</item>
#include "model_jobList.h"
#include "thread_encode.h"
#include "model_options.h"
+#include "model_preferences.h"
#include "resource.h"
#include <QIcon>
#include <Mmsystem.h>
-JobListModel::JobListModel(PreferencesDialog::Preferences *preferences)
+JobListModel::JobListModel(PreferencesModel *preferences)
{
m_preferences = preferences;
}
m_status.insert(jobId, newStatus);
emit dataChanged(createIndex(index, 0), createIndex(index, 1));
- if(m_preferences->enableSounds)
+ if(m_preferences->enableSounds())
{
switch(newStatus)
{
#include "thread_encode.h"
#include "model_logFile.h"
-#include "win_preferences.h"
#include "QAbstractItemModel"
#include <QUuid>
#include <QList>
#include <QMap>
+class PreferencesModel;
+
class JobListModel : public QAbstractItemModel
{
Q_OBJECT
public:
- JobListModel(PreferencesDialog::Preferences *preferences);
+ JobListModel(PreferencesModel *preferences);
~JobListModel(void);
virtual int columnCount(const QModelIndex &parent) const;
QMap<QUuid, unsigned int> m_progress;
QMap<QUuid, LogFileModel*> m_logFile;
QMap<QUuid, QString> m_details;
- PreferencesDialog::Preferences *m_preferences;
+ PreferencesModel *m_preferences;
public slots:
void updateStatus(const QUuid &jobId, EncodeThread::JobStatus newStatus);
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Simple x264 Launcher
+// Copyright (C) 2004-2013 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
+///////////////////////////////////////////////////////////////////////////////
+
+#include "model_preferences.h"
+
+#include "global.h"
+
+#include <cstring>
+
+#include <QSettings>
+#include <QDesktopServices>
+#include <QMouseEvent>
+#include <QMessageBox>
+
+PreferencesModel::PreferencesModel(void)
+{
+ initPreferences(this);
+}
+
+void PreferencesModel::initPreferences(PreferencesModel *preferences)
+{
+ memset(preferences, 0, sizeof(PreferencesModel));
+
+ preferences->m_autoRunNextJob = true;
+ preferences->m_maxRunningJobCount = 1;
+ preferences->m_shutdownComputer = false;
+ preferences->m_use10BitEncoding = false;
+ preferences->m_useAvisyth64Bit = false;
+ preferences->m_saveLogFiles = false;
+ preferences->m_saveToSourcePath = false;
+ preferences->m_processPriority = X264_PRIORITY_BELOWNORMAL;
+ preferences->m_enableSounds = false;
+}
+
+void PreferencesModel::loadPreferences(PreferencesModel *preferences)
+{
+ const QString appDir = x264_data_path();
+ QSettings settings(QString("%1/preferences.ini").arg(appDir), QSettings::IniFormat);
+
+ PreferencesModel defaults;
+
+ settings.beginGroup("preferences");
+ preferences->m_autoRunNextJob = settings.value("auto_run_next_job", QVariant(defaults.m_autoRunNextJob)).toBool();
+ preferences->m_maxRunningJobCount = qBound(1U, settings.value("max_running_job_count", QVariant(defaults.m_maxRunningJobCount)).toUInt(), 16U);
+ preferences->m_shutdownComputer = settings.value("shutdown_computer_on_completion", QVariant(defaults.m_shutdownComputer)).toBool();
+ preferences->m_use10BitEncoding = settings.value("use_10bit_encoding", QVariant(defaults.m_use10BitEncoding)).toBool();
+ preferences->m_useAvisyth64Bit = settings.value("use_64bit_avisynth", QVariant(defaults.m_useAvisyth64Bit)).toBool();
+ preferences->m_saveLogFiles = settings.value("save_log_files", QVariant(defaults.m_saveLogFiles)).toBool();
+ preferences->m_saveToSourcePath = settings.value("save_to_source_path", QVariant(defaults.m_saveToSourcePath)).toBool();
+ preferences->m_processPriority = settings.value("process_priority", QVariant(defaults.m_processPriority)).toInt();
+ preferences->m_enableSounds = settings.value("enable_sounds", QVariant(defaults.m_enableSounds)).toBool();
+}
+
+void PreferencesModel::savePreferences(PreferencesModel *preferences)
+{
+ const QString appDir = x264_data_path();
+ QSettings settings(QString("%1/preferences.ini").arg(appDir), QSettings::IniFormat);
+
+ settings.beginGroup("preferences");
+ settings.setValue("auto_run_next_job", preferences->m_autoRunNextJob);
+ settings.setValue("shutdown_computer_on_completion", preferences->m_shutdownComputer);
+ settings.setValue("max_running_job_count", preferences->m_maxRunningJobCount);
+ settings.setValue("use_10bit_encoding", preferences->m_use10BitEncoding);
+ settings.setValue("use_64bit_avisynth", preferences->m_useAvisyth64Bit);
+ settings.setValue("save_log_files", preferences->m_saveLogFiles);
+ settings.setValue("save_to_source_path", preferences->m_saveToSourcePath);
+ settings.setValue("process_priority", preferences->m_processPriority);
+ settings.setValue("enable_sounds", preferences->m_enableSounds);
+ settings.sync();
+}
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Simple x264 Launcher
+// Copyright (C) 2004-2013 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
+
+class PreferencesModel
+{
+public:
+ PreferencesModel(void);
+
+ enum
+ {
+ X264_PRIORITY_ABOVENORMAL = 0,
+ X264_PRIORITY_NORMAL = 1,
+ X264_PRIORITY_BELOWNORMAL = 2,
+ X264_PRIORITY_IDLE = 3,
+ }
+ x264_priority_t;
+
+ //Getter
+ bool autoRunNextJob(void) { return m_autoRunNextJob; }
+ unsigned int maxRunningJobCount(void) { return m_maxRunningJobCount; }
+ bool shutdownComputer(void) { return m_shutdownComputer; }
+ bool use10BitEncoding(void) { return m_use10BitEncoding; }
+ bool useAvisyth64Bit(void) { return m_useAvisyth64Bit; }
+ bool saveLogFiles(void) { return m_saveLogFiles; }
+ bool saveToSourcePath(void) { return m_saveToSourcePath; }
+ int processPriority(void) { return m_processPriority; }
+ bool enableSounds(void) { return m_enableSounds; }
+
+ //Setter
+ void setAutoRunNextJob(const bool autoRunNextJob) { m_autoRunNextJob = autoRunNextJob; }
+ void setMaxRunningJobCount(const unsigned int maxRunningJobCount) { m_maxRunningJobCount = maxRunningJobCount; }
+ void setShutdownComputer(const bool shutdownComputer) { m_shutdownComputer = shutdownComputer; }
+ void setUse10BitEncoding(const bool use10BitEncoding) { m_use10BitEncoding = use10BitEncoding; }
+ void setUseAvisyth64Bit(const bool useAvisyth64Bit) { m_useAvisyth64Bit = useAvisyth64Bit; }
+ void setSaveLogFiles(const bool saveLogFiles) { m_saveLogFiles = saveLogFiles; }
+ void setSaveToSourcePath(const bool saveToSourcePath) { m_saveToSourcePath = saveToSourcePath; }
+ void setProcessPriority(const int processPriority) { m_processPriority = processPriority; }
+ void setEnableSounds(const bool enableSounds) { m_enableSounds = enableSounds; }
+
+ //Static
+ static void initPreferences(PreferencesModel *preferences);
+ static void loadPreferences(PreferencesModel *preferences);
+ static void savePreferences(PreferencesModel *preferences);
+
+protected:
+ bool m_autoRunNextJob;
+ unsigned int m_maxRunningJobCount;
+ bool m_shutdownComputer;
+ bool m_use10BitEncoding;
+ bool m_useAvisyth64Bit;
+ bool m_saveLogFiles;
+ bool m_saveToSourcePath;
+ int m_processPriority;
+ bool m_enableSounds;
+};
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Simple x264 Launcher
+// Copyright (C) 2004-2013 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
+///////////////////////////////////////////////////////////////////////////////
+
+#include "model_recently.h"
+
+#include "global.h"
+
+#include <QDesktopServices>
+#include <QDir>
+#include <QSettings>
+
+#define ARRAY_SIZE(ARRAY) (sizeof((ARRAY))/sizeof((ARRAY[0])))
+#define VALID_DIR(PATH) ((!(PATH).isEmpty()) && QFileInfo(PATH).exists() && QFileInfo(PATH).isDir())
+
+static const char *KEY_FILTER_IDX = "path/filterIndex";
+static const char *KEY_SOURCE_DIR = "path/directory_openFrom";
+static const char *KEY_OUTPUT_DIR = "path/directory_saveTo";
+
+RecentlyUsed::RecentlyUsed(void)
+{
+ initRecentlyUsed(this);
+}
+
+void RecentlyUsed::initRecentlyUsed(RecentlyUsed *recentlyUsed)
+{
+ recentlyUsed->m_sourceDirectory = QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
+ recentlyUsed->m_outputDirectory = QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
+ recentlyUsed->m_filterIndex = 0;
+}
+
+void RecentlyUsed::loadRecentlyUsed(RecentlyUsed *recentlyUsed)
+{
+ RecentlyUsed defaults;
+
+ QSettings settings(QString("%1/last.ini").arg(x264_data_path()), QSettings::IniFormat);
+ recentlyUsed->m_sourceDirectory = settings.value(KEY_SOURCE_DIR, defaults.m_sourceDirectory).toString();
+ recentlyUsed->m_outputDirectory = settings.value(KEY_OUTPUT_DIR, defaults.m_outputDirectory).toString();
+ recentlyUsed->m_filterIndex = settings.value(KEY_FILTER_IDX, defaults.m_filterIndex).toInt();
+
+ if(!VALID_DIR(recentlyUsed->m_sourceDirectory)) recentlyUsed->m_sourceDirectory = defaults.m_sourceDirectory;
+ if(!VALID_DIR(recentlyUsed->m_outputDirectory)) recentlyUsed->m_outputDirectory = defaults.m_outputDirectory;
+ recentlyUsed->m_filterIndex = qBound(0, recentlyUsed->m_filterIndex, int(ARRAY_SIZE(X264_FILE_TYPE_FILTERS)-1));
+}
+
+void RecentlyUsed::saveRecentlyUsed(RecentlyUsed *recentlyUsed)
+{
+ QSettings settings(QString("%1/last.ini").arg(x264_data_path()), QSettings::IniFormat);
+ if(settings.isWritable())
+ {
+ settings.setValue(KEY_SOURCE_DIR, recentlyUsed->m_sourceDirectory);
+ settings.setValue(KEY_OUTPUT_DIR, recentlyUsed->m_outputDirectory);
+ settings.setValue(KEY_FILTER_IDX, recentlyUsed->m_filterIndex);
+ settings.sync();
+ }
+}
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Simple x264 Launcher
+// Copyright (C) 2004-2013 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 <QString>
+
+static const struct
+{
+ const char *pcExt;
+ const char *pcStr;
+}
+X264_FILE_TYPE_FILTERS[] =
+{
+ { "mkv", "Matroska Files" },
+ { "mp4", "MPEG-4 Part 14 Container" },
+ { "264", "H.264 Elementary Stream"},
+};
+
+class RecentlyUsed
+{
+public:
+ RecentlyUsed(void);
+
+ static void initRecentlyUsed(RecentlyUsed *recentlyUsed);
+ static void loadRecentlyUsed(RecentlyUsed *recentlyUsed);
+ static void saveRecentlyUsed(RecentlyUsed *recentlyUsed);
+
+ //Getter
+ QString sourceDirectory(void) { return m_sourceDirectory; }
+ QString outputDirectory(void) { return m_outputDirectory; }
+ int filterIndex(void) { return m_filterIndex; }
+
+ //Setter
+ void setSourceDirectory(const QString &sourceDirectory) { m_sourceDirectory = sourceDirectory; }
+ void setOutputDirectory(const QString &outputDirectory) { m_outputDirectory = outputDirectory; }
+ void setFilterIndex(const int filterIndex) { m_filterIndex = filterIndex; }
+
+protected:
+ QString m_sourceDirectory;
+ QString m_outputDirectory;
+ int m_filterIndex;
+};
#include "global.h"
#include "model_options.h"
-#include "win_preferences.h"
+#include "model_preferences.h"
#include "version.h"
#include <QDate>
// Constructor & Destructor
///////////////////////////////////////////////////////////////////////////////
-EncodeThread::EncodeThread(const QString &sourceFileName, const QString &outputFileName, const OptionsModel *options, const QString &binDir, bool x264_x64, bool x264_10bit, bool avs2yuv_x64, unsigned int processPriroity)
+EncodeThread::EncodeThread(const QString &sourceFileName, const QString &outputFileName, const OptionsModel *options, const QString &binDir, bool x264_x64, bool x264_10bit, bool avs2yuv_x64, int processPriroity)
:
m_jobId(QUuid::createUuid()),
m_sourceFileName(sourceFileName),
if(process.waitForStarted())
{
Q_PID pid = process.pid();
- AssignProcessToJobObject(m_handle_jobObject, process.pid()->hProcess);
if(pid != NULL)
{
- switch(m_processPriority)
- {
- case PreferencesDialog::X264_PRIORITY_NORMAL:
- SetPriorityClass(process.pid()->hProcess, NORMAL_PRIORITY_CLASS);
- break;
- case PreferencesDialog::X264_PRIORITY_BELOWNORMAL:
- if(!SetPriorityClass(process.pid()->hProcess, BELOW_NORMAL_PRIORITY_CLASS))
- {
- SetPriorityClass(process.pid()->hProcess, IDLE_PRIORITY_CLASS);
- }
- break;
- case PreferencesDialog::X264_PRIORITY_IDLE:
- SetPriorityClass(process.pid()->hProcess, IDLE_PRIORITY_CLASS);
- break;
- }
+ AssignProcessToJobObject(m_handle_jobObject, process.pid()->hProcess);
+ setPorcessPriority(process.pid()->hProcess, m_processPriority);
}
lock.unlock();
return tr("N/A");
}
+
+void EncodeThread::setPorcessPriority(void *processId, int priroity)
+{
+ switch(priroity)
+ {
+ case PreferencesModel::X264_PRIORITY_ABOVENORMAL:
+ if(!SetPriorityClass(processId, ABOVE_NORMAL_PRIORITY_CLASS))
+ {
+ SetPriorityClass(processId, NORMAL_PRIORITY_CLASS);
+ }
+ break;
+ case PreferencesModel::X264_PRIORITY_NORMAL:
+ SetPriorityClass(processId, NORMAL_PRIORITY_CLASS);
+ break;
+ case PreferencesModel::X264_PRIORITY_BELOWNORMAL:
+ if(!SetPriorityClass(processId, BELOW_NORMAL_PRIORITY_CLASS))
+ {
+ SetPriorityClass(processId, IDLE_PRIORITY_CLASS);
+ }
+ break;
+ case PreferencesModel::X264_PRIORITY_IDLE:
+ SetPriorityClass(processId, IDLE_PRIORITY_CLASS);
+ break;
+ }
+}
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, unsigned int processPriroity);
+ 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);
QUuid getId(void) { return this->m_jobId; };
const bool m_x264_x64;
const bool m_x264_10bit;
const bool m_avs2yuv_x64;
- const unsigned int m_processPriority;
+ const int m_processPriority;
//Flags
volatile bool m_abort;
//Static functions
static QString commandline2string(const QString &program, const QStringList &arguments);
static QString sizeToString(qint64 size);
+ static void setPorcessPriority(void *processId, int priroity);
signals:
void statusChanged(const QUuid &jobId, EncodeThread::JobStatus newStatus);
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 1
#define VER_X264_PATCH 5
-#define VER_X264_BUILD 480
+#define VER_X264_BUILD 494
#define VER_X264_MINIMUM_REV 2282
#define VER_X264_CURRENT_API 133
#include "global.h"
#include "model_options.h"
+#include "model_recently.h"
#include "win_help.h"
#include "win_editor.h"
if((!editSource->text().isEmpty()) && editOutput->text().isEmpty())
{
- QString outPath = generateOutputFileName(QDir::fromNativeSeparators(editSource->text()), m_recentlyUsed->outputDirectory, m_recentlyUsed->filterIndex, m_saveToSourceFolder);
+ QString outPath = generateOutputFileName(QDir::fromNativeSeparators(editSource->text()), m_recentlyUsed->outputDirectory(), m_recentlyUsed->filterIndex(), m_saveToSourceFolder);
editOutput->setText(QDir::toNativeSeparators(outPath));
buttonAccept->setFocus();
}
}
//Update recently used
- m_recentlyUsed->filterIndex = currentOutputIndx();
- m_recentlyUsed->sourceDirectory = currentSourcePath();
- m_recentlyUsed->outputDirectory = currentOutputPath();
- saveRecentlyUsed(m_recentlyUsed);
+ m_recentlyUsed->setFilterIndex(currentOutputIndx());
+ m_recentlyUsed->setSourceDirectory(currentSourcePath());
+ m_recentlyUsed->setOutputDirectory(currentOutputPath());
+ RecentlyUsed::saveRecentlyUsed(m_recentlyUsed);
//Save options
saveOptions(m_options);
}
if(tempIndex < 0)
{
- tempIndex = m_recentlyUsed->filterIndex;
+ tempIndex = m_recentlyUsed->filterIndex();
}
filePath = QString("%1.%2").arg(filePath, getFilterExt(tempIndex));
}
QString AddJobDialog::currentSourcePath(const bool bWithName)
{
- QString path = m_recentlyUsed->sourceDirectory;
+ QString path = m_recentlyUsed->sourceDirectory();
QString currentSourceFile = this->sourceFile();
if(!currentSourceFile.isEmpty())
QString AddJobDialog::currentOutputPath(const bool bWithName)
{
- QString path = m_recentlyUsed->outputDirectory;
+ QString path = m_recentlyUsed->outputDirectory();
QString currentOutputFile = this->outputFile();
if(!currentOutputFile.isEmpty())
int AddJobDialog::currentOutputIndx(void)
{
- int index = m_recentlyUsed->filterIndex;
+ int index = m_recentlyUsed->filterIndex();
QString currentOutputFile = this->outputFile();
if(!currentOutputFile.isEmpty())
// Static functions
///////////////////////////////////////////////////////////////////////////////
-static const char *KEY_FILTER_IDX = "path/filterIndex";
-static const char *KEY_SOURCE_DIR = "path/directory_openFrom";
-static const char *KEY_OUTPUT_DIR = "path/directory_saveTo";
-
-static const struct
-{
- const char *pcExt;
- const char *pcStr;
-}
-FILE_TYPE_FILTERS[] =
-{
- { "mkv", "Matroska Files" },
- { "mp4", "MPEG-4 Part 14 Container" },
- { "264", "H.264 Elementary Stream"},
-};
-
-/* ------------------------------------------------------------------------- */
-
-void AddJobDialog::initRecentlyUsed(RecentlyUsed *recentlyUsed)
-{
- recentlyUsed->sourceDirectory = QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
- recentlyUsed->outputDirectory = QDir::fromNativeSeparators(QDesktopServices::storageLocation(QDesktopServices::MoviesLocation));
- recentlyUsed->filterIndex = 0;
-}
-
-void AddJobDialog::loadRecentlyUsed(RecentlyUsed *recentlyUsed)
-{
- RecentlyUsed defaults;
- initRecentlyUsed(&defaults);
-
- QSettings settings(QString("%1/last.ini").arg(x264_data_path()), QSettings::IniFormat);
- recentlyUsed->sourceDirectory = settings.value(KEY_SOURCE_DIR, defaults.sourceDirectory).toString();
- recentlyUsed->outputDirectory = settings.value(KEY_OUTPUT_DIR, defaults.outputDirectory).toString();
- recentlyUsed->filterIndex = settings.value(KEY_FILTER_IDX, defaults.filterIndex).toInt();
-
- if(!VALID_DIR(recentlyUsed->sourceDirectory)) recentlyUsed->sourceDirectory = defaults.sourceDirectory;
- if(!VALID_DIR(recentlyUsed->outputDirectory)) recentlyUsed->outputDirectory = defaults.outputDirectory;
- recentlyUsed->filterIndex = qBound(0, recentlyUsed->filterIndex, int(ARRAY_SIZE(FILE_TYPE_FILTERS)-1));
-}
-
-void AddJobDialog::saveRecentlyUsed(RecentlyUsed *recentlyUsed)
-{
- QSettings settings(QString("%1/last.ini").arg(x264_data_path()), QSettings::IniFormat);
- if(settings.isWritable())
- {
- settings.setValue(KEY_SOURCE_DIR, recentlyUsed->sourceDirectory);
- settings.setValue(KEY_OUTPUT_DIR, recentlyUsed->outputDirectory);
- settings.setValue(KEY_FILTER_IDX, recentlyUsed->filterIndex);
- settings.sync();
- }
-}
-
QString AddJobDialog::generateOutputFileName(const QString &sourceFilePath, const QString &destinationDirectory, const int filterIndex, const bool saveToSourceDir)
{
QString name = QFileInfo(sourceFilePath).completeBaseName();
if(!VALID_DIR(path))
{
RecentlyUsed defaults;
- initRecentlyUsed(&defaults);
- path = defaults.outputDirectory;
+ path = defaults.outputDirectory();
}
QString outPath = QString("%1/%2.%3").arg(path, name, fext);
QString AddJobDialog::getFilterExt(const int filterIndex)
{
- const int count = ARRAY_SIZE(FILE_TYPE_FILTERS);
+ const int count = ARRAY_SIZE(X264_FILE_TYPE_FILTERS);
if((filterIndex >= 0) && (filterIndex < count))
{
- return QString::fromLatin1(FILE_TYPE_FILTERS[filterIndex].pcExt);
+ return QString::fromLatin1(X264_FILE_TYPE_FILTERS[filterIndex].pcExt);
}
- return QString::fromLatin1(FILE_TYPE_FILTERS[0].pcExt);
+ return QString::fromLatin1(X264_FILE_TYPE_FILTERS[0].pcExt);
}
int AddJobDialog::getFilterIdx(const QString &fileExt)
{
- const int count = ARRAY_SIZE(FILE_TYPE_FILTERS);
+ const int count = ARRAY_SIZE(X264_FILE_TYPE_FILTERS);
for(int i = 0; i < count; i++)
{
- if(fileExt.compare(QString::fromLatin1(FILE_TYPE_FILTERS[i].pcExt), Qt::CaseInsensitive) == 0)
+ if(fileExt.compare(QString::fromLatin1(X264_FILE_TYPE_FILTERS[i].pcExt), Qt::CaseInsensitive) == 0)
{
return i;
}
QString AddJobDialog::getFilterStr(const int filterIndex)
{
- const int count = ARRAY_SIZE(FILE_TYPE_FILTERS);
+ const int count = ARRAY_SIZE(X264_FILE_TYPE_FILTERS);
if((filterIndex >= 0) && (filterIndex < count))
{
- return QString("%1 (*.%2)").arg(QString::fromLatin1(FILE_TYPE_FILTERS[filterIndex].pcStr), QString::fromLatin1(FILE_TYPE_FILTERS[filterIndex].pcExt));
+ return QString("%1 (*.%2)").arg(QString::fromLatin1(X264_FILE_TYPE_FILTERS[filterIndex].pcStr), QString::fromLatin1(X264_FILE_TYPE_FILTERS[filterIndex].pcExt));
}
- return QString("%1 (*.%2)").arg(QString::fromLatin1(FILE_TYPE_FILTERS[0].pcStr), QString::fromLatin1(FILE_TYPE_FILTERS[0].pcExt));
+ return QString("%1 (*.%2)").arg(QString::fromLatin1(X264_FILE_TYPE_FILTERS[0].pcStr), QString::fromLatin1(X264_FILE_TYPE_FILTERS[0].pcExt));
}
QString AddJobDialog::getFilterLst(void)
{
QStringList filters;
- const int count = ARRAY_SIZE(FILE_TYPE_FILTERS);
+ const int count = ARRAY_SIZE(X264_FILE_TYPE_FILTERS);
for(int i = 0; i < count; i++)
{
- filters << QString("%1 (*.%2)").arg(QString::fromLatin1(FILE_TYPE_FILTERS[i].pcStr), QString::fromLatin1(FILE_TYPE_FILTERS[i].pcExt));
+ filters << QString("%1 (*.%2)").arg(QString::fromLatin1(X264_FILE_TYPE_FILTERS[i].pcStr), QString::fromLatin1(X264_FILE_TYPE_FILTERS[i].pcExt));
}
return filters.join(";;");
#include <QDir>
class OptionsModel;
+class RecentlyUsed;
class AddJobDialog : public QDialog, private Ui::AddJobDialog
{
Q_OBJECT
public:
- typedef struct
- {
- QString sourceDirectory;
- QString outputDirectory;
- int filterIndex;
- }
- RecentlyUsed;
-
AddJobDialog(QWidget *parent, OptionsModel *options, RecentlyUsed *recentlyUsed, bool x64supported, bool use10BitEncoding, bool saveToSourceFolder);
~AddJobDialog(void);
void setOutputFile(const QString &path) { editOutput->setText(QDir::toNativeSeparators(path)); }
void setSourceEditable(const bool editable) { buttonBrowseSource->setEnabled(editable); }
void setApplyToAllVisible(const bool visible) { checkBoxApplyToAll->setVisible(visible); }
-
- static void initRecentlyUsed(RecentlyUsed *recentlyUsed);
- static void loadRecentlyUsed(RecentlyUsed *recentlyUsed);
- static void saveRecentlyUsed(RecentlyUsed *recentlyUsed);
static QString generateOutputFileName(const QString &sourceFilePath, const QString &destinationDirectory, const int filterIndex, const bool saveToSourceDir);
static int getFilterIdx(const QString &fileExt);
#include "model_jobList.h"
#include "model_options.h"
+#include "model_preferences.h"
+#include "model_recently.h"
#include "thread_avisynth.h"
#include "taskbar7.h"
+#include "win_addJob.h"
+#include "win_preferences.h"
#include "resource.h"
#include <QDate>
m_options(NULL),
m_jobList(NULL),
m_droppedFiles(NULL),
+ m_preferences(NULL),
+ m_recentlyUsed(NULL),
m_firstShow(true)
{
//Init the dialog, from the .ui file
qRegisterMetaType<EncodeThread::JobStatus>("EncodeThread::JobStatus");
//Load preferences
- PreferencesDialog::initPreferences(&m_preferences);
- PreferencesDialog::loadPreferences(&m_preferences);
+ m_preferences = new PreferencesModel();
+ PreferencesModel::loadPreferences(m_preferences);
//Load recently used
- AddJobDialog::initRecentlyUsed(&m_recentlyUsed);
- AddJobDialog::loadRecentlyUsed(&m_recentlyUsed);
+ m_recentlyUsed = new RecentlyUsed();
+ RecentlyUsed::loadRecentlyUsed(m_recentlyUsed);
//Create options object
m_options = new OptionsModel();
}
//Create model
- m_jobList = new JobListModel(&m_preferences);
+ m_jobList = new JobListModel(m_preferences);
connect(m_jobList, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(jobChangedData(QModelIndex, QModelIndex)));
jobsView->setModel(m_jobList);
X264_DELETE(m_ipcThread);
AvisynthCheckThread::unload();
+ X264_DELETE(m_preferences);
+ X264_DELETE(m_recentlyUsed);
}
///////////////////////////////////////////////////////////////////////////////
void MainWindow::addButtonPressed()
{
qDebug("MainWindow::addButtonPressed");
- bool runImmediately = (countRunningJobs() < (m_preferences.autoRunNextJob ? m_preferences.maxRunningJobCount : 1));
+ bool runImmediately = (countRunningJobs() < (m_preferences->autoRunNextJob() ? m_preferences->maxRunningJobCount() : 1));
QString sourceFileName, outputFileName;
if(createJob(sourceFileName, outputFileName, m_options, runImmediately))
*/
void MainWindow::openActionTriggered()
{
- QStringList fileList = QFileDialog::getOpenFileNames(this, tr("Open Source File(s)"), m_recentlyUsed.sourceDirectory, AddJobDialog::getInputFilterLst(), NULL, QFileDialog::DontUseNativeDialog);
+ QStringList fileList = QFileDialog::getOpenFileNames(this, tr("Open Source File(s)"), m_recentlyUsed->sourceDirectory(), AddJobDialog::getInputFilterLst(), NULL, QFileDialog::DontUseNativeDialog);
if(!fileList.empty())
{
- m_recentlyUsed.sourceDirectory = QFileInfo(fileList.last()).absolutePath();
+ m_recentlyUsed->setSourceDirectory(QFileInfo(fileList.last()).absolutePath());
if(fileList.count() > 1)
{
createJobMultiple(fileList);
}
else
{
- bool runImmediately = (countRunningJobs() < (m_preferences.autoRunNextJob ? m_preferences.maxRunningJobCount : 1));
+ bool runImmediately = (countRunningJobs() < (m_preferences->autoRunNextJob() ? m_preferences->maxRunningJobCount() : 1));
QString sourceFileName(fileList.first()), outputFileName;
if(createJob(sourceFileName, outputFileName, m_options, runImmediately))
{
}
if((status == EncodeThread::JobStatus_Completed) || (status == EncodeThread::JobStatus_Failed))
{
- if(m_preferences.autoRunNextJob) QTimer::singleShot(0, this, SLOT(launchNextJob()));
- if(m_preferences.shutdownComputer) QTimer::singleShot(0, this, SLOT(shutdownComputer()));
- if(m_preferences.saveLogFiles) saveLogFile(m_jobList->index(i, 1, QModelIndex()));
+ if(m_preferences->autoRunNextJob()) QTimer::singleShot(0, this, SLOT(launchNextJob()));
+ if(m_preferences->shutdownComputer()) QTimer::singleShot(0, this, SLOT(shutdownComputer()));
+ if(m_preferences->saveLogFiles()) saveLogFile(m_jobList->index(i, 1, QModelIndex()));
}
}
}
*/
void MainWindow::showPreferences(void)
{
- PreferencesDialog *preferences = new PreferencesDialog(this, &m_preferences, m_cpuFeatures->x64);
+ PreferencesDialog *preferences = new PreferencesDialog(this, m_preferences, m_cpuFeatures->x64);
preferences->exec();
X264_DELETE(preferences);
}
const int rows = m_jobList->rowCount(QModelIndex());
- if(countRunningJobs() >= m_preferences.maxRunningJobCount)
+ if(countRunningJobs() >= m_preferences->maxRunningJobCount())
{
qDebug("Still have too many jobs running, won't launch next one yet!");
return;
bool MainWindow::createJob(QString &sourceFileName, QString &outputFileName, OptionsModel *options, bool &runImmediately, const bool restart, int fileNo, int fileTotal, bool *applyToAll)
{
bool okay = false;
- AddJobDialog *addDialog = new AddJobDialog(this, options, &m_recentlyUsed, m_cpuFeatures->x64, m_preferences.use10BitEncoding, m_preferences.saveToSourcePath);
+ AddJobDialog *addDialog = new AddJobDialog(this, options, m_recentlyUsed, m_cpuFeatures->x64, m_preferences->use10BitEncoding(), m_preferences->saveToSourcePath());
addDialog->setRunImmediately(runImmediately);
if(!sourceFileName.isEmpty()) addDialog->setSourceFile(sourceFileName);
//Add files individually
for(iter = filePathIn.constBegin(); (iter != filePathIn.constEnd()) && (!applyToAll); iter++)
{
- runImmediately = (countRunningJobs() < (m_preferences.autoRunNextJob ? m_preferences.maxRunningJobCount : 1));
+ runImmediately = (countRunningJobs() < (m_preferences->autoRunNextJob() ? m_preferences->maxRunningJobCount() : 1));
QString sourceFileName(*iter), outputFileName;
if(createJob(sourceFileName, outputFileName, m_options, runImmediately, false, counter++, filePathIn.count(), &applyToAll))
{
//Add remaining files
while(applyToAll && (iter != filePathIn.constEnd()))
{
- const bool runImmediatelyTmp = runImmediately && (countRunningJobs() < (m_preferences.autoRunNextJob ? m_preferences.maxRunningJobCount : 1));
+ const bool runImmediatelyTmp = runImmediately && (countRunningJobs() < (m_preferences->autoRunNextJob() ? m_preferences->maxRunningJobCount() : 1));
const QString sourceFileName = *iter;
- const QString outputFileName = AddJobDialog::generateOutputFileName(sourceFileName, m_recentlyUsed.outputDirectory, m_recentlyUsed.filterIndex, m_preferences.saveToSourcePath);
+ const QString outputFileName = AddJobDialog::generateOutputFileName(sourceFileName, m_recentlyUsed->outputDirectory(), m_recentlyUsed->filterIndex(), m_preferences->saveToSourcePath());
if(!appendJob(sourceFileName, outputFileName, m_options, runImmediatelyTmp))
{
return false;
options,
QString("%1/toolset").arg(m_appDir),
m_cpuFeatures->x64,
- m_preferences.use10BitEncoding,
- m_cpuFeatures->x64 && m_preferences.useAvisyth64Bit,
- m_preferences.processPriority
+ m_preferences->use10BitEncoding(),
+ m_cpuFeatures->x64 && m_preferences->useAvisyth64Bit(),
+ m_preferences->processPriority()
);
QModelIndex newIndex = m_jobList->insertJob(thrd);
#include "uic_win_main.h"
#include "thread_ipc.h"
#include "thread_encode.h"
-#include "win_preferences.h"
-#include "win_addJob.h"
-#include "global.h"
class JobListModel;
class OptionsModel;
class QFile;
class QLibrary;
+class PreferencesModel;
+class RecentlyUsed;
class MainWindow: public QMainWindow, private Ui::MainWindow
{
QStringList *m_droppedFiles;
QList<QFile*> m_toolsList;
- PreferencesDialog::Preferences m_preferences;
- AddJobDialog::RecentlyUsed m_recentlyUsed;
+ PreferencesModel *m_preferences;
+ RecentlyUsed *m_recentlyUsed;
const x264_cpu_t *const m_cpuFeatures;
const QString m_appDir;
#include "win_preferences.h"
#include "global.h"
+#include "model_preferences.h"
#include <QSettings>
#include <QDesktopServices>
if((CHKBOX)->isChecked() != (VALUE)) (CHKBOX)->setChecked(VALUE); \
}
-PreferencesDialog::PreferencesDialog(QWidget *parent, Preferences *preferences, bool x64)
+PreferencesDialog::PreferencesDialog(QWidget *parent, PreferencesModel *preferences, bool x64)
:
QDialog(parent),
m_x64(x64)
{
if(event) QDialog::showEvent(event);
- UPDATE_CHECKBOX(checkRunNextJob, m_preferences->autoRunNextJob);
- UPDATE_CHECKBOX(checkShutdownComputer, m_preferences->shutdownComputer);
- UPDATE_CHECKBOX(checkUse64BitAvs2YUV, m_preferences->useAvisyth64Bit);
- UPDATE_CHECKBOX(checkSaveLogFiles, m_preferences->saveLogFiles);
- UPDATE_CHECKBOX(checkSaveToSourceFolder, m_preferences->saveToSourcePath);
- UPDATE_CHECKBOX(checkEnableSounds, m_preferences->enableSounds);
+ UPDATE_CHECKBOX(checkRunNextJob, m_preferences->autoRunNextJob());
+ UPDATE_CHECKBOX(checkShutdownComputer, m_preferences->shutdownComputer());
+ UPDATE_CHECKBOX(checkUse64BitAvs2YUV, m_preferences->useAvisyth64Bit());
+ UPDATE_CHECKBOX(checkSaveLogFiles, m_preferences->saveLogFiles());
+ UPDATE_CHECKBOX(checkSaveToSourceFolder, m_preferences->saveToSourcePath());
+ UPDATE_CHECKBOX(checkEnableSounds, m_preferences->enableSounds());
checkUse10BitEncoding->blockSignals(true);
- UPDATE_CHECKBOX(checkUse10BitEncoding, m_preferences->use10BitEncoding);
+ UPDATE_CHECKBOX(checkUse10BitEncoding, m_preferences->use10BitEncoding());
checkUse10BitEncoding->blockSignals(false);
- spinBoxJobCount->setValue(m_preferences->maxRunningJobCount);
- comboBoxPriority->setCurrentIndex(qBound(0U, m_preferences->processPriority, 2U));
+ spinBoxJobCount->setValue(m_preferences->maxRunningJobCount());
+ comboBoxPriority->setCurrentIndex(qBound(0, m_preferences->processPriority(), comboBoxPriority->count()-1));
checkUse64BitAvs2YUV->setEnabled(m_x64);
labelUse64BitAvs2YUV->setEnabled(m_x64);
void PreferencesDialog::done(int n)
{
- m_preferences->autoRunNextJob = checkRunNextJob->isChecked();
- m_preferences->shutdownComputer = checkShutdownComputer->isChecked();
- m_preferences->use10BitEncoding = checkUse10BitEncoding->isChecked();
- m_preferences->useAvisyth64Bit = checkUse64BitAvs2YUV->isChecked();
- m_preferences->saveLogFiles = checkSaveLogFiles->isChecked();
- m_preferences->saveToSourcePath = checkSaveToSourceFolder->isChecked();
- m_preferences->maxRunningJobCount = spinBoxJobCount->value();
- m_preferences->processPriority = comboBoxPriority->currentIndex();
- m_preferences->enableSounds = checkEnableSounds->isChecked();
-
- savePreferences(m_preferences);
+ m_preferences->setAutoRunNextJob(checkRunNextJob->isChecked());
+ m_preferences->setShutdownComputer(checkShutdownComputer->isChecked());
+ m_preferences->setUse10BitEncoding(checkUse10BitEncoding->isChecked());
+ m_preferences->setUseAvisyth64Bit(checkUse64BitAvs2YUV->isChecked());
+ m_preferences->setSaveLogFiles(checkSaveLogFiles->isChecked());
+ m_preferences->setSaveToSourcePath(checkSaveToSourceFolder->isChecked());
+ m_preferences->setMaxRunningJobCount(spinBoxJobCount->value());
+ m_preferences->setProcessPriority(comboBoxPriority->currentIndex());
+ m_preferences->setEnableSounds(checkEnableSounds->isChecked());
+
+ PreferencesModel::savePreferences(m_preferences);
QDialog::done(n);
}
void PreferencesDialog::resetButtonPressed(void)
{
- initPreferences(m_preferences);
+ PreferencesModel::initPreferences(m_preferences);
showEvent(NULL);
}
}
}
}
-
-///////////////////////////////////////////////////////////////////////////////
-// Static Functions
-///////////////////////////////////////////////////////////////////////////////
-
-void PreferencesDialog::initPreferences(Preferences *preferences)
-{
- memset(preferences, 0, sizeof(Preferences));
-
- preferences->autoRunNextJob = true;
- preferences->maxRunningJobCount = 1;
- preferences->shutdownComputer = false;
- preferences->use10BitEncoding = false;
- preferences->useAvisyth64Bit = false;
- preferences->saveLogFiles = false;
- preferences->saveToSourcePath = false;
- preferences->processPriority = X264_PRIORITY_BELOWNORMAL;
- preferences->enableSounds = false;
-}
-
-void PreferencesDialog::loadPreferences(Preferences *preferences)
-{
- const QString appDir = x264_data_path();
- QSettings settings(QString("%1/preferences.ini").arg(appDir), QSettings::IniFormat);
-
- Preferences defaults;
- initPreferences(&defaults);
-
- settings.beginGroup("preferences");
- preferences->autoRunNextJob = settings.value("auto_run_next_job", QVariant(defaults.autoRunNextJob)).toBool();
- preferences->maxRunningJobCount = qBound(1U, settings.value("max_running_job_count", QVariant(defaults.maxRunningJobCount)).toUInt(), 16U);
- preferences->shutdownComputer = settings.value("shutdown_computer_on_completion", QVariant(defaults.shutdownComputer)).toBool();
- preferences->use10BitEncoding = settings.value("use_10bit_encoding", QVariant(defaults.use10BitEncoding)).toBool();
- preferences->useAvisyth64Bit = settings.value("use_64bit_avisynth", QVariant(defaults.useAvisyth64Bit)).toBool();
- preferences->saveLogFiles = settings.value("save_log_files", QVariant(defaults.saveLogFiles)).toBool();
- preferences->saveToSourcePath = settings.value("save_to_source_path", QVariant(defaults.saveToSourcePath)).toBool();
- preferences->processPriority = settings.value("process_priority", QVariant(defaults.processPriority)).toUInt();
- preferences->enableSounds = settings.value("enable_sounds", QVariant(defaults.enableSounds)).toBool();
-}
-
-void PreferencesDialog::savePreferences(Preferences *preferences)
-{
- const QString appDir = x264_data_path();
- QSettings settings(QString("%1/preferences.ini").arg(appDir), QSettings::IniFormat);
-
- settings.beginGroup("preferences");
- settings.setValue("auto_run_next_job", preferences->autoRunNextJob);
- settings.setValue("shutdown_computer_on_completion", preferences->shutdownComputer);
- settings.setValue("max_running_job_count", preferences->maxRunningJobCount);
- settings.setValue("use_10bit_encoding", preferences->use10BitEncoding);
- settings.setValue("use_64bit_avisynth", preferences->useAvisyth64Bit);
- settings.setValue("save_log_files", preferences->saveLogFiles);
- settings.setValue("save_to_source_path", preferences->saveToSourcePath);
- settings.setValue("process_priority", preferences->processPriority);
- settings.setValue("enable_sounds", preferences->enableSounds);
- settings.sync();
-}
#include "uic_win_preferences.h"
+class PreferencesModel;
+
class PreferencesDialog : public QDialog, private Ui::PreferencesDialog
{
Q_OBJECT
public:
- enum
- {
- X264_PRIORITY_NORMAL = 0,
- X264_PRIORITY_BELOWNORMAL = 1,
- X264_PRIORITY_IDLE = 2,
- }
- x264_priority_t;
-
- typedef struct
- {
- bool autoRunNextJob;
- unsigned int maxRunningJobCount;
- bool shutdownComputer;
- bool use10BitEncoding;
- bool useAvisyth64Bit;
- bool saveLogFiles;
- bool saveToSourcePath;
- unsigned int processPriority;
- bool enableSounds;
- }
- Preferences;
-
- PreferencesDialog(QWidget *parent, Preferences *preferences, bool x64);
+ PreferencesDialog(QWidget *parent, PreferencesModel *preferences, bool x64);
~PreferencesDialog(void);
const bool m_x64;
- static void initPreferences(Preferences *preferences);
- static void loadPreferences(Preferences *preferences);
- static void savePreferences(Preferences *preferences);
-
protected:
virtual void done(int n);
virtual void showEvent(QShowEvent *event);
void emulateMouseEvent(QObject *object, QEvent *event, QWidget *source, QWidget *target);
private:
- Preferences *m_preferences;
+ PreferencesModel *m_preferences;
private slots:
void resetButtonPressed(void);
mkdir "$(TargetDir)\toolset\x64"
mkdir "$(TargetDir)\imageformats"
copy /Y "$(SolutionDir)res\toolset\x86\*.exe" "$(TargetDir)\toolset\x86\"
-copy /Y "$(SolutionDir)res\toolset\x86\*.dll" "$(TargetDir)\toolset\x86\"
copy /Y "$(SolutionDir)res\toolset\x64\*.exe" "$(TargetDir)\toolset\x64\"
-copy /Y "$(SolutionDir)res\toolset\x64\*.dll" "$(TargetDir)\toolset\x64\"
copy /Y "$(QTDIR)\bin\QtCore4.dll" "$(TargetDir)"
copy /Y "$(QTDIR)\bin\QtGui4.dll" "$(TargetDir)"
copy /Y "$(QTDIR)\bin\QtSvg4.dll" "$(TargetDir)"
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\moc\moc_%(Filename).cpp;%(Outputs)</Outputs>
</CustomBuild>
<ClInclude Include="src\model_options.h" />
+ <ClInclude Include="src\model_preferences.h" />
+ <ClInclude Include="src\model_recently.h" />
<ClInclude Include="src\targetver.h" />
<ClInclude Include="src\taskbar7.h" />
<CustomBuild Include="src\thread_ipc.h">
<ClCompile Include="src\model_jobList.cpp" />
<ClCompile Include="src\model_logFile.cpp" />
<ClCompile Include="src\model_options.cpp" />
+ <ClCompile Include="src\model_preferences.cpp" />
+ <ClCompile Include="src\model_recently.cpp" />
<ClCompile Include="src\qtmain_win.cpp">
<TreatWChar_tAsBuiltInType Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</TreatWChar_tAsBuiltInType>
<TreatWChar_tAsBuiltInType Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</TreatWChar_tAsBuiltInType>
<ClInclude Include="src\taskbar7.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="src\model_preferences.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\model_recently.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\main.cpp">
<ClCompile Include="tmp\moc\moc_thread_avisynth.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
+ <ClCompile Include="src\model_preferences.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\model_recently.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="src\win_main.h">