<family>Lucida Console</family>
</font>
</property>
+ <property name="contextMenuPolicy">
+ <enum>Qt::ActionsContextMenu</enum>
+ </property>
<property name="toolTip">
<string><nobr>All command&minus;line parameters you enter here will be passed to x264 unmodified and unchecked. Some parameters are forbidden, as they are reserved for the GUI.<br>The following macros can be used:<tt> $(INPUT)</tt> expands to the current source file path and<tt> $(OUTPUT)</tt> expands to the current output file path.</nobr></string>
</property>
<family>Lucida Console</family>
</font>
</property>
+ <property name="contextMenuPolicy">
+ <enum>Qt::ActionsContextMenu</enum>
+ </property>
<property name="toolTip">
<string>All command-line parameters you enter here will be passed to Avs2YUV unmodified and unchecked. Only relevant for Avisynth input!</string>
</property>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>EditorDialog</class>
+ <widget class="QDialog" name="EditorDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>690</width>
+ <height>147</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Editor</string>
+ </property>
+ <property name="modal">
+ <bool>true</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QPlainTextEdit" name="plainTextEdit">
+ <property name="font">
+ <font>
+ <family>Lucida Console</family>
+ </font>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QPushButton" name="acceptButton">
+ <property name="minimumSize">
+ <size>
+ <width>96</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>OK</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="cancelButton">
+ <property name="minimumSize">
+ <size>
+ <width>96</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>Cancel</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <tabstops>
+ <tabstop>plainTextEdit</tabstop>
+ <tabstop>acceptButton</tabstop>
+ <tabstop>cancelButton</tabstop>
+ </tabstops>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>acceptButton</sender>
+ <signal>clicked()</signal>
+ <receiver>EditorDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>455</x>
+ <y>304</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>307</x>
+ <y>162</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>cancelButton</sender>
+ <signal>clicked()</signal>
+ <receiver>EditorDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>557</x>
+ <y>304</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>307</x>
+ <y>162</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
<file>buttons/hourglass.png</file>
<file>buttons/information.png</file>
<file>buttons/lightning.png</file>
+ <file>buttons/page_edit.png</file>
<file>buttons/page_paste.png</file>
<file>buttons/pause.png</file>
<file>buttons/play.png</file>
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 0
#define VER_X264_PATCH 2
-#define VER_X264_BUILD 202
+#define VER_X264_BUILD 209
#define VER_X264_MINIMUM_REV 2146
#define VER_X264_CURRENT_API 120
#include "global.h"
#include "model_options.h"
#include "win_help.h"
+#include "win_editor.h"
#include <QDate>
#include <QTimer>
#include <QInputDialog>
#include <QSettings>
#include <QUrl>
+#include <QAction>
#define VALID_DIR(PATH) ((!(PATH).isEmpty()) && QFileInfo(PATH).exists() && QFileInfo(PATH).isDir())
virtual State validate(QString &input, int &pos) const
{
- static const char* p[] = {"o", "frames", "seek", "raw", "hfyu", NULL};
+ static const char* p[] = {"o", "frames", "seek", "raw", "hfyu", "slave", NULL};
bool invalid = false;
connect(editCustomX264Params, SIGNAL(textChanged(QString)), this, SLOT(configurationChanged()));
connect(editCustomAvs2YUVParams, SIGNAL(textChanged(QString)), this, SLOT(configurationChanged()));
+ //Create context menus
+ QAction *editorActionX264 = new QAction(QIcon(":/buttons/page_edit.png"), tr("Open Editor"), this);
+ editorActionX264->setData(QVariant::fromValue<void*>(editCustomX264Params));
+ editCustomX264Params->addAction(editorActionX264);
+ connect(editorActionX264, SIGNAL(triggered(bool)), this, SLOT(editorActionTriggered()));
+ QAction *editorActionAvs2YUV = new QAction(QIcon(":/buttons/page_edit.png"), tr("Open Editor"), this);
+ editorActionAvs2YUV->setData(QVariant::fromValue<void*>(editCustomAvs2YUVParams));
+ editCustomAvs2YUVParams->addAction(editorActionAvs2YUV);
+ connect(editorActionAvs2YUV, SIGNAL(triggered(bool)), this, SLOT(editorActionTriggered()));
+
//Setup template selector
loadTemplateList();
connect(cbxTemplate, SIGNAL(currentIndexChanged(int)), this, SLOT(templateSelected()));
X264_DELETE(item);
}
+void AddJobDialog::editorActionTriggered(void)
+{
+
+ if(QAction *action = dynamic_cast<QAction*>(QObject::sender()))
+ {
+ QLineEdit *lineEdit = reinterpret_cast<QLineEdit*>(action->data().value<void*>());
+
+ EditorDialog *editor = new EditorDialog(this);
+ editor->setEditText(lineEdit->text());
+
+ if(editor->exec() == QDialog::Accepted)
+ {
+ lineEdit->setText(editor->getEditText());
+ }
+
+ X264_DELETE(editor);
+ }
+}
+
///////////////////////////////////////////////////////////////////////////////
// Public functions
///////////////////////////////////////////////////////////////////////////////
void templateSelected(void);
void saveTemplateButtonClicked(void);
void deleteTemplateButtonClicked(void);
+ void editorActionTriggered(void);
virtual void accept(void);
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Simple x264 Launcher
+// Copyright (C) 2004-2012 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 "win_editor.h"
+#include "global.h"
+
+#include <QProcess>
+#include <QScrollBar>
+#include <QTimer>
+
+///////////////////////////////////////////////////////////////////////////////
+// Constructor & Destructor
+///////////////////////////////////////////////////////////////////////////////
+
+EditorDialog::EditorDialog(QWidget *parent)
+:
+ QDialog(parent)
+{
+ //Init the dialog, from the .ui file
+ setupUi(this);
+ setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
+
+ //Fix size
+ setMinimumSize(size());
+}
+
+EditorDialog::~EditorDialog(void)
+{
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Events
+///////////////////////////////////////////////////////////////////////////////
+
+/*None*/
+
+///////////////////////////////////////////////////////////////////////////////
+// Slots
+///////////////////////////////////////////////////////////////////////////////
+
+/*None*/
+
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Simple x264 Launcher
+// Copyright (C) 2004-2012 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 "uic_win_editor.h"
+
+class QProcess;
+
+class EditorDialog : public QDialog, private Ui::EditorDialog
+{
+ Q_OBJECT
+
+public:
+ EditorDialog(QWidget *parent);
+ ~EditorDialog(void);
+
+ QString getEditText(void) { return plainTextEdit->toPlainText().simplified(); }
+
+ void setEditText(const QString &text)
+ {
+ plainTextEdit->clear();
+ plainTextEdit->appendPlainText(text.simplified());
+ }
+};
+
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\uic\uic_%(Filename).h;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\uic\uic_%(Filename).h;%(Outputs)</Outputs>
</CustomBuild>
+ <CustomBuild Include="gui\win_editor.ui">
+ <FileType>Document</FileType>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\uic\uic_%(Filename).h" "%(FullPath)"</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o "$(SolutionDir)tmp\uic\uic_%(Filename).h" "%(FullPath)"</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">UIC "$(SolutionDir)tmp\uic\uic_%(Filename).h"</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">UIC "$(SolutionDir)tmp\uic\uic_%(Filename).h"</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\uic\uic_%(Filename).h;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\uic\uic_%(Filename).h;%(Outputs)</Outputs>
+ </CustomBuild>
<None Include="ReadMe.txt" />
<CustomBuild Include="res\resources.qrc">
<FileType>Document</FileType>
<None Include="res\icons\movie.ico" />
</ItemGroup>
<ItemGroup>
+ <CustomBuild Include="src\win_editor.h">
+ <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\moc\moc_%(Filename).cpp" "%(FullPath)"</Command>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\moc\moc_%(Filename).cpp" "%(FullPath)"</Command>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MOC "$(SolutionDir)tmp\moc\moc_%(Filename).cpp"</Message>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MOC "$(SolutionDir)tmp\moc\moc_%(Filename).cpp"</Message>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\moc\moc_%(Filename).cpp;%(Outputs)</Outputs>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\moc\moc_%(Filename).cpp;%(Outputs)</Outputs>
+ </CustomBuild>
<CustomBuild Include="src\win_preferences.h">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\moc\moc_%(Filename).cpp" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -o "$(SolutionDir)tmp\moc\moc_%(Filename).cpp" "%(FullPath)"</Command>
<ClCompile Include="src\global.cpp" />
<ClCompile Include="src\main.cpp" />
<ClCompile Include="src\win_addJob.cpp" />
+ <ClCompile Include="src\win_editor.cpp" />
<ClCompile Include="src\win_help.cpp" />
<ClCompile Include="src\win_main.cpp" />
<ClCompile Include="src\win_preferences.cpp" />
<ClCompile Include="tmp\moc\moc_model_logFile.cpp" />
<ClCompile Include="tmp\moc\moc_thread_encode.cpp" />
<ClCompile Include="tmp\moc\moc_win_addJob.cpp" />
+ <ClCompile Include="tmp\moc\moc_win_editor.cpp" />
<ClCompile Include="tmp\moc\moc_win_help.cpp" />
<ClCompile Include="tmp\moc\moc_win_main.cpp" />
<ClCompile Include="tmp\moc\moc_win_preferences.cpp" />
<ClCompile Include="src\taskbar7.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\win_editor.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="tmp\moc\moc_win_editor.cpp">
+ <Filter>Generated Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="src\win_main.h">
<CustomBuild Include="gui\win_main.ui">
<Filter>Dialogs</Filter>
</CustomBuild>
+ <CustomBuild Include="gui\win_editor.ui">
+ <Filter>Dialogs</Filter>
+ </CustomBuild>
+ <CustomBuild Include="src\win_editor.h">
+ <Filter>Header Files</Filter>
+ </CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="x264_launcher.rc">