<x>0</x>
<y>0</y>
<width>379</width>
- <height>366</height>
+ <height>399</height>
</rect>
</property>
<property name="windowTitle">
</property>
</widget>
</item>
- <item row="1" column="0" rowspan="13">
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>8</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="1" column="6" rowspan="13">
- <spacer name="horizontalSpacer_3">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>12</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
<item row="1" column="2" colspan="4">
<widget class="QLabel" name="labelRunNextJob">
<property name="text">
</property>
</spacer>
</item>
- <item row="15" column="1" colspan="5">
+ <item row="17" column="1" colspan="5">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
+ <item row="16" column="1">
+ <widget class="QCheckBox" name="checkEnableSounds">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="16" column="2" colspan="4">
+ <widget class="QLabel" name="labelEnableSounds">
+ <property name="text">
+ <string>Enable sound effects when a job has completed or failed</string>
+ </property>
+ </widget>
+ </item>
+ <item row="15" column="1" colspan="5">
+ <spacer name="verticalSpacer_9">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>8</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="0" rowspan="16">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>8</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="1" column="6" rowspan="16">
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>12</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</item>
</layout>
static const char *g_x264_version_compiler = "MSVC 2012-U1 CTP";
#elif (_MSC_FULL_VER < 170060315)
static const char *g_x264_version_compiler = "MSVC 2012-U1";
- #elif (_MSC_FULL_VER == 170060315)
+ #elif (_MSC_FULL_VER < 170060610)
static const char *g_x264_version_compiler = "MSVC 2012-U2";
+ #elif (_MSC_FULL_VER == 170060610)
+ static const char *g_x264_version_compiler = "MSVC 2012-U3";
#else
#error Compiler version is not supported yet!
#endif
// http://www.gnu.org/licenses/gpl-2.0.txt
///////////////////////////////////////////////////////////////////////////////
-#include "model_jobList.h"
#include "global.h"
+#include "model_jobList.h"
#include "thread_encode.h"
#include "model_options.h"
+#include "resource.h"
#include <QIcon>
#include <QFileInfo>
-JobListModel::JobListModel(void)
+#include <Mmsystem.h>
+
+JobListModel::JobListModel(PreferencesDialog::Preferences *preferences)
{
+ m_preferences = preferences;
}
JobListModel::~JobListModel(void)
{
m_status.insert(jobId, newStatus);
emit dataChanged(createIndex(index, 0), createIndex(index, 1));
+
+ if(m_preferences->enableSounds)
+ {
+ switch(newStatus)
+ {
+ case EncodeThread::JobStatus_Completed:
+ PlaySound(MAKEINTRESOURCE(IDR_WAVE4), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
+ break;
+ case EncodeThread::JobStatus_Aborted:
+ PlaySound(MAKEINTRESOURCE(IDR_WAVE5), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
+ break;
+ case EncodeThread::JobStatus_Failed:
+ PlaySound(MAKEINTRESOURCE(IDR_WAVE6), GetModuleHandle(NULL), SND_RESOURCE | SND_ASYNC);
+ break;
+ }
+ }
}
}
#include "thread_encode.h"
#include "model_logFile.h"
+#include "win_preferences.h"
#include "QAbstractItemModel"
#include <QUuid>
Q_OBJECT
public:
- JobListModel(void);
+ JobListModel(PreferencesDialog::Preferences *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;
public slots:
void updateStatus(const QUuid &jobId, EncodeThread::JobStatus newStatus);
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 1
-#define VER_X264_PATCH 4
-#define VER_X264_BUILD 475
+#define VER_X264_PATCH 5
+#define VER_X264_BUILD 480
#define VER_X264_MINIMUM_REV 2282
#define VER_X264_CURRENT_API 133
}
//Create model
- m_jobList = new JobListModel();
+ m_jobList = new JobListModel(&m_preferences);
connect(m_jobList, SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(jobChangedData(QModelIndex, QModelIndex)));
jobsView->setModel(m_jobList);
labelShutdownComputer->installEventFilter(this);
labelSaveLogFiles->installEventFilter(this);
labelSaveToSourceFolder->installEventFilter(this);
+ labelEnableSounds->installEventFilter(this);
connect(resetButton, SIGNAL(clicked()), this, SLOT(resetButtonPressed()));
connect(checkUse10BitEncoding, SIGNAL(toggled(bool)), this, SLOT(use10BitEncodingToggled(bool)));
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);
emulateMouseEvent(o, e, labelUse64BitAvs2YUV, checkUse64BitAvs2YUV);
emulateMouseEvent(o, e, labelSaveLogFiles, checkSaveLogFiles);
emulateMouseEvent(o, e, labelSaveToSourceFolder, checkSaveToSourceFolder);
+ emulateMouseEvent(o, e, labelEnableSounds, checkEnableSounds);
return false;
}
m_preferences->saveToSourcePath = checkSaveToSourceFolder->isChecked();
m_preferences->maxRunningJobCount = spinBoxJobCount->value();
m_preferences->processPriority = comboBoxPriority->currentIndex();
+ m_preferences->enableSounds = checkEnableSounds->isChecked();
savePreferences(m_preferences);
QDialog::done(n);
preferences->saveLogFiles = false;
preferences->saveToSourcePath = false;
preferences->processPriority = X264_PRIORITY_BELOWNORMAL;
+ preferences->enableSounds = false;
}
void PreferencesDialog::loadPreferences(Preferences *preferences)
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)
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();
}
bool saveLogFiles;
bool saveToSourcePath;
unsigned int processPriority;
+ bool enableSounds;
}
Preferences;