Finished new "About" dialog and removed old code.

This commit is contained in:
LoRd_MuldeR 2014-02-26 15:34:56 +01:00
parent fb721fb532
commit e694ed1154
5 changed files with 245 additions and 130 deletions

View File

@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>709</width>
<height>285</height>
<height>275</height>
</rect>
</property>
<property name="windowTitle">
@ -37,7 +37,7 @@
</property>
<widget class="QWidget" name="tabAbout">
<attribute name="title">
<string>About</string>
<string>Information</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
@ -117,9 +117,9 @@
</font>
</property>
<property name="text">
<string>&lt;nobr&gt;&lt;tt&gt;&lt;b&gt;Simple x264 Launcher v%1 - graphical interface for x264 &amp;amp; x265&lt;/b&gt;&lt;br&gt;
<string>&lt;nobr&gt;&lt;tt&gt;&lt;b&gt;Simple x264 Launcher v%1 - graphical interface for x264/x265&lt;/b&gt;&lt;br&gt;
Copyright (c) 2004%2 LoRd_MuldeR &amp;lt;mulder2@gmx.de&amp;gt;. Some rights reserved.&lt;br&gt;
Built on %3 at %4 with %5 for Win-%6.&lt;br&gt;
Built on %3 at %4 with %5 (Win-%6) and Qt %7.&lt;br&gt;
&lt;br&gt;
This program is free software: you can redistribute it and/or modify&lt;br&gt;
it under the terms of the GNU General Public License &amp;lt;http://www.gnu.org/&amp;gt;.&lt;br&gt;
@ -143,7 +143,7 @@ Please check the website at &lt;a href=&quot;http://muldersoft.com/&quot;&gt;
</widget>
<widget class="QWidget" name="tabX264">
<attribute name="title">
<string>x264</string>
<string>x264 Encoder</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
@ -230,7 +230,7 @@ Released under the terms of the GNU General Public License, version 2.&lt;br&gt;
Please visit &lt;a href=&quot;http://x264licensing.com/&quot;&gt;http://x264licensing.com/&lt;/a&gt; for obtaining a commercial x264 license.&lt;br&gt;
Read the &lt;a href=&quot;http://mewiki.project357.com/wiki/X264_Settings&quot;&gt;user's manual&lt;/a&gt; to get started and use the &lt;a href=&quot;http://forum.doom9.org/forumdisplay.php?f=77&quot;&gt;support forum&lt;/a&gt; for help!&lt;br&gt;
&lt;br&gt;
Note: Simple x264 Launcher is not affiliated with or endosed by the x264 project.&lt;/tt&gt;&lt;/nobr&gt;
Note: Simple x264 Launcher is not affiliated with or endorsed by the x264 project.&lt;/tt&gt;&lt;/nobr&gt;
</string>
</property>
<property name="alignment">
@ -249,7 +249,7 @@ Note: Simple x264 Launcher is not affiliated with or endosed by the x264 project
</widget>
<widget class="QWidget" name="tabX265">
<attribute name="title">
<string>x265</string>
<string>x265 Encoder</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
@ -330,13 +330,13 @@ Note: Simple x264 Launcher is not affiliated with or endosed by the x264 project
</property>
<property name="text">
<string>&lt;nobr&gt;&lt;tt&gt;&lt;b&gt;x265 - free H.265/HEVC encoder. Copyright (C) 2003-2014 x265 project.&lt;/b&gt;&lt;br&gt;
Commercially funded open source implementation of the HEVC compression standard.&lt;br&gt;
Commercially funded, open source implementation of the HEVC compression standard.&lt;br&gt;
Released under the terms of the GNU General Public License, version 2.&lt;br&gt;
&lt;br&gt;
The x265 project is coordinated by &lt;a href=&quot;http://www.multicorewareinc.com/&quot;&gt;MultiCoreWare&lt;/a&gt;. See the &lt;a href=&quot;http://x265.org/&quot;&gt;web-site&lt;/a&gt; for details.&lt;br&gt;
Read the &lt;a href=&quot;http://goo.gl/smws42&quot;&gt;user's manual&lt;/a&gt; to get started and use the &lt;a href=&quot;https://forum.doom9.org/forumdisplay.php?f=81&quot;&gt;support forum&lt;/a&gt; for help!&lt;br&gt;
&lt;br&gt;
Note: Simple x264 Launcher is not affiliated with or endosed by the x265 project.&lt;/tt&gt;&lt;/nobr&gt;
Note: Simple x264 Launcher is not affiliated with or endorsed by the x265 project.&lt;/tt&gt;&lt;/nobr&gt;
</string>
</property>
<property name="alignment">
@ -353,6 +353,217 @@ Note: Simple x264 Launcher is not affiliated with or endosed by the x265 project
</item>
</layout>
</widget>
<widget class="QWidget" name="tabAvisynth">
<attribute name="title">
<string>Avisynth</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>16</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QLabel" name="iconAbout_2">
<property name="minimumSize">
<size>
<width>64</width>
<height>76</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>76</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../res/resources.qrc">:/images/avisynth.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QLabel" name="labelAbout_2">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>&lt;nobr&gt;&lt;tt&gt;&lt;b&gt;Avisynth - powerful video processing scripting language.&lt;/b&gt;&lt;br&gt;
Copyright (c) 2000 Ben Rudiak-Gould and all subsequent Avisynth developers.&lt;br&gt;
Released under the terms of the GNU General Public License, version 2.&lt;br&gt;
&lt;br&gt;
Please visit the official web-site at &lt;a href=&quot;http://avisynth.nl/&quot;&gt;http://avisynth.nl/&lt;/a&gt; for more information.&lt;br&gt;
Read the &lt;a href=&quot;http://avisynth.nl/index.php/First_script&quot;&gt;user's manual&lt;/a&gt; to get started and use the &lt;a href=&quot;http://forum.doom9.org/forumdisplay.php?f=33&quot;&gt;support forum&lt;/a&gt; for help!&lt;br&gt;
&lt;br&gt;
The &lt;b&gt;AviSynth+&lt;/b&gt; project provides an improved version of the AviSynth frameserver.&lt;br&gt;
Please see &lt;a href=&quot;http://avs-plus.net/&quot;&gt;http://avs-plus.net/&lt;/a&gt; or the &lt;a href=&quot;http://forum.doom9.org/showthread.php?t=168856&quot;&gt;forum thread&lt;/a&gt; for more information.&lt;/tt&gt;&lt;/nobr&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabVapourSynth">
<attribute name="title">
<string>VapourSynth</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<property name="spacing">
<number>16</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QLabel" name="iconAbout_3">
<property name="minimumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>64</width>
<height>64</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../res/resources.qrc">:/images/python.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_12">
<item>
<widget class="QLabel" name="labelAbout_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>9</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>&lt;nobr&gt;&lt;tt&gt;&lt;b&gt;VapourSynth - application for video manipulation based on Python.&lt;/b&gt;&lt;br&gt;
Copyright (c) 2012 Fredrik &quot;Myrsloik&quot; Mellbin.&lt;br&gt;
Released under the terms of the GNU Lesser General Public License, version 2.1.&lt;br&gt;
&lt;br&gt;
Please visit the web-site at &lt;a href=&quot;http://www.vapoursynth.com&quot;&gt;http://www.vapoursynth.com&lt;/a&gt; for more information.&lt;br&gt;
Read the &lt;a href=&quot;http://www.vapoursynth.com/doc/&quot;&gt;documentation&lt;/a&gt; to get started and use the &lt;a href=&quot;http://forum.doom9.org/showthread.php?t=165771&quot;&gt;support forum&lt;/a&gt; for help!&lt;br&gt;
&lt;br&gt;
VapourSynth has been inspired by Avisynth and aims to be a 21st century rewrite.&lt;/tt&gt;&lt;/nobr&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item>
@ -360,7 +571,7 @@ Note: Simple x264 Launcher is not affiliated with or endosed by the x265 project
<item>
<widget class="QLabel" name="labelGPL">
<property name="text">
<string>&lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html&quot;&gt;GNU General Public License v2&lt;/a&gt;</string>
<string>&lt;a href=&quot;http://www.gnu.org/licenses/gpl-2.0.html&quot; class=&quot;mylink&quot;&gt;GNU General Public License v2&lt;/a&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>

View File

@ -26,7 +26,7 @@
#define VER_X264_MAJOR 2
#define VER_X264_MINOR 3
#define VER_X264_PATCH 3
#define VER_X264_BUILD 801
#define VER_X264_BUILD 804
#define VER_X264_PORTABLE_EDITION (0)

View File

@ -53,10 +53,16 @@ AboutDialog::AboutDialog(QWidget *parent)
x264_version_date().toString(Qt::ISODate).toLatin1().constData(),
x264_version_time(),
x264_version_compiler(),
x264_version_arch()
x264_version_arch(),
QString::fromLatin1(QT_VERSION_STR)
)
);
//Enable hover
ui->labelGPL->setAttribute(Qt::WA_Hover, true);
((QWidget*)ui->labelGPL->parent())->setAttribute(Qt::WA_Hover, true);
((QWidget*)ui->labelGPL->parent()->parent())->setAttribute(Qt::WA_Hover, true);
//Switch to first tab
ui->tabWidget->setCurrentIndex(ui->tabWidget->indexOf(ui->tabAbout));
@ -81,7 +87,9 @@ AboutDialog::~AboutDialog(void)
void AboutDialog::showEvent(QShowEvent *event)
{
//Fix dialog size
QDialog::showEvent(event);
//Fix dialog size - need to do this in Show event
const QSize hint = sizeHint();
setFixedSize(hint.isValid() ? hint : size());
}

View File

@ -499,118 +499,13 @@ void MainWindow::showAbout(void)
ENSURE_APP_IS_IDLE();
m_status = STATUS_BLOCKED;
AboutDialog *aboutDialog = new AboutDialog(this);
aboutDialog->exec();
X264_DELETE(aboutDialog);
m_status = STATUS_IDLE;
/*
QString text;
text += QString().sprintf("<nobr><tt>Simple x264 Launcher v%u.%02u.%u - use 64-Bit x264 with 32-Bit Avisynth<br>", x264_version_major(), x264_version_minor(), x264_version_build());
text += QString().sprintf("Copyright (c) 2004-%04d LoRd_MuldeR &lt;mulder2@gmx.de&gt;. Some rights reserved.<br>", qMax(x264_version_date().year(),QDate::currentDate().year()));
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());
text += QString().sprintf("This program is free software: you can redistribute it and/or modify<br>");
text += QString().sprintf("it under the terms of the GNU General Public License &lt;http://www.gnu.org/&gt;.<br>");
text += QString().sprintf("Note that this program is distributed with ABSOLUTELY NO WARRANTY.<br><br>");
text += QString().sprintf("Please check the web-site at <a href=\"%s\">%s</a> for updates !!!<br></tt></nobr>", home_url, home_url);
QMessageBox aboutBox(this);
aboutBox.setIconPixmap(QIcon(":/images/movie.png").pixmap(64,64));
aboutBox.setWindowTitle(tr("About..."));
aboutBox.setText(text.replace("-", "&minus;"));
aboutBox.addButton(tr("About x264"), QMessageBox::NoRole);
aboutBox.addButton(tr("About x265"), QMessageBox::NoRole);
aboutBox.addButton(tr("About Avs"), QMessageBox::NoRole);
aboutBox.addButton(tr("About Vpy"), QMessageBox::NoRole);
aboutBox.addButton(tr("About Qt"), QMessageBox::NoRole);
aboutBox.setEscapeButton(aboutBox.addButton(tr("Close"), QMessageBox::NoRole));
forever
if(AboutDialog *aboutDialog = new AboutDialog(this))
{
x264_beep(x264_beep_info);
switch(aboutBox.exec())
{
case 0:
{
QString text2;
text2 += tr("<nobr><tt>x264 - the best H.264/AVC encoder. Copyright (C) 2013-2014 x264 project.<br>");
text2 += tr("Free software library for encoding video streams into the H.264/MPEG-4 AVC format.<br>");
text2 += tr("Released under the terms of the GNU General Public License v2.<br><br>");
text2 += tr("Please visit <a href=\"%1\">%1</a> for obtaining a commercial x264 license.<br>").arg("http://x264licensing.com/");
text2 += tr("Read the <a href=\"%1\">user's manual</a> to get started and use the <a href=\"%2\">support forum</a> for help!<br></tt></nobr>").arg("http://mewiki.project357.com/wiki/X264_Settings", "http://forum.doom9.org/forumdisplay.php?f=77");
QMessageBox x264Box(this);
x264Box.setIconPixmap(QIcon(":/images/x264.png").pixmap(48,48));
x264Box.setWindowTitle(tr("About x264"));
x264Box.setText(text2.replace("-", "&minus;"));
x264Box.setEscapeButton(x264Box.addButton(tr("Close"), QMessageBox::NoRole));
x264_beep(x264_beep_info);
x264Box.exec();
}
break;
case 1:
{
QString text2;
text2 += tr("<nobr><tt>x265 - H.265/HEVC encoder. Copyright (C) 2003-2014 x265 project.<br>");
text2 += tr("Commercially funded open source implementation of the H.265/HEVC compression standard.<br>");
text2 += tr("Released under the terms of the GNU General Public License v2.<br><br>");
text2 += tr("The x265 project is coordinated by <a href=\"%1\">MultiCoreWare</a>. Visit the <a href=\"%2\">x265 web-site</a> for details.<br>").arg("http://www.multicorewareinc.com/", "http://x265.org/");
text2 += tr("Read the <a href=\"%1\">user's manual</a> to get started and use the <a href=\"%2\">support forum</a> for help!<br></tt></nobr").arg("http://goo.gl/smws42", "https://forum.doom9.org/forumdisplay.php?f=81");
QMessageBox x264Box(this);
x264Box.setIconPixmap(QIcon(":/images/x265.png").pixmap(48,48));
x264Box.setWindowTitle(tr("About x264"));
x264Box.setText(text2.replace("-", "&minus;"));
x264Box.setEscapeButton(x264Box.addButton(tr("Close"), QMessageBox::NoRole));
x264_beep(x264_beep_info);
x264Box.exec();
}
break;
case 2:
{
QString text2;
text2 += tr("<nobr><tt>Avisynth - powerful video processing scripting language.<br>");
text2 += tr("Copyright (c) 2000 Ben Rudiak-Gould and all subsequent developers.<br>");
text2 += tr("Released under the terms of the GNU General Public License.<br><br>");
text2 += tr("Please visit the web-site <a href=\"%1\">%1</a> for more information.<br>").arg("http://avisynth.nl/");
text2 += tr("Read the <a href=\"%1\">guide</a> to get started and use the <a href=\"%2\">support forum</a> for help!<br></tt></nobr>").arg("http://avisynth.nl/index.php/First_script", "http://forum.doom9.org/forumdisplay.php?f=33");
QMessageBox x264Box(this);
x264Box.setIconPixmap(QIcon(":/images/avisynth.png").pixmap(48,67));
x264Box.setWindowTitle(tr("About Avisynth"));
x264Box.setText(text2.replace("-", "&minus;"));
x264Box.setEscapeButton(x264Box.addButton(tr("Close"), QMessageBox::NoRole));
x264_beep(x264_beep_info);
x264Box.exec();
}
break;
case 3:
{
QString text2;
text2 += tr("<nobr><tt>VapourSynth - application for video manipulation based on Python.<br>");
text2 += tr("Copyright (c) 2012 Fredrik Mellbin.<br>");
text2 += tr("Released under the terms of the GNU Lesser General Public.<br><br>");
text2 += tr("Please visit the web-site <a href=\"%1\">%1</a> for more information.<br>").arg("http://www.vapoursynth.com/");
text2 += tr("Read the <a href=\"%1\">documentation</a> to get started and use the <a href=\"%2\">support forum</a> for help!<br></tt></nobr>").arg("http://www.vapoursynth.com/doc/", "http://forum.doom9.org/showthread.php?t=165771");
QMessageBox x264Box(this);
x264Box.setIconPixmap(QIcon(":/images/python.png").pixmap(48,48));
x264Box.setWindowTitle(tr("About VapourSynth"));
x264Box.setText(text2.replace("-", "&minus;"));
x264Box.setEscapeButton(x264Box.addButton(tr("Close"), QMessageBox::NoRole));
x264_beep(x264_beep_info);
x264Box.exec();
}
break;
case 4:
QMessageBox::aboutQt(this);
break;
default:
m_status = STATUS_IDLE;
return;
}
aboutDialog->exec();
X264_DELETE(aboutDialog);
}
*/
m_status = STATUS_IDLE;
}
/*
@ -1075,7 +970,7 @@ void MainWindow::init(void)
//---------------------------------------
//Set Window title
setWindowTitle(QString("%1 [%2]").arg(tr("Simple %1 Launcher").arg(m_sysinfo->has256Support() ? "x264/x265" : "x264"), m_sysinfo->hasX64Support() ? "x64" : "x86"));
setWindowTitle(QString("%1 (%2)").arg(tr("Simple %1 Launcher").arg(m_sysinfo->has256Support() ? "x264/x265" : "x264"), m_sysinfo->hasX64Support() ? "64-Bit" : "32-Bit"));
//Enable drag&drop support for this window, required for Qt v4.8.4+
setAcceptDrops(true);
@ -1264,6 +1159,7 @@ void MainWindow::showEvent(QShowEvent *e)
if(m_status == STATUS_PRE_INIT)
{
setWindowTitle(tr("%1 - Starting...").arg(windowTitle()));
QTimer::singleShot(0, this, SLOT(init()));
}
}

View File

@ -34,9 +34,6 @@
<None Include="res\icons\movie.ico">
<Filter>Resource Files</Filter>
</None>
<None Include="gui\win_about.ui">
<Filter>Dialogs</Filter>
</None>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\global.h">
@ -105,9 +102,6 @@
<ClInclude Include="src\source_vapoursynth.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\win_about.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\main.cpp">
@ -322,6 +316,12 @@
<CustomBuild Include="src\tool_abstract.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="src\win_about.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="gui\win_about.ui">
<Filter>Dialogs</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="x264_launcher.rc">