aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-02-13 20:19:03 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2008-02-13 20:19:03 +0000
commit743106083092d3cdfad526de825215ace68f5267 (patch)
tree47b6fca46f2aeb6b0d05ff32850f798ecd414f40 /src
parentc6dc3a195a11b3089db9f8db9152d0fbcc9c4b24 (diff)
downloadqmmp-743106083092d3cdfad526de825215ace68f5267.tar.gz
qmmp-743106083092d3cdfad526de825215ace68f5267.tar.bz2
qmmp-743106083092d3cdfad526de825215ace68f5267.zip
about dialog changes
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@242 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/ui/aboutdialog.cpp75
-rw-r--r--src/ui/aboutdialog.h3
-rw-r--r--src/ui/forms/aboutdialog.ui92
-rw-r--r--src/ui/stuff.qrc1
-rw-r--r--src/ui/txt/description_en.txt1
5 files changed, 155 insertions, 17 deletions
diff --git a/src/ui/aboutdialog.cpp b/src/ui/aboutdialog.cpp
index a8b80e6cd..849197f9b 100644
--- a/src/ui/aboutdialog.cpp
+++ b/src/ui/aboutdialog.cpp
@@ -19,11 +19,23 @@
***************************************************************************/
-#include "aboutdialog.h"
-
#include <QFile>
#include <QTextStream>
+#include <decoder.h>
+#include <decoderfactory.h>
+#include <output.h>
+#include <outputfactory.h>
+#include <visual.h>
+#include <visualfactory.h>
+#include <effect.h>
+#include <effectfactory.h>
+#include <qmmpui/general.h>
+#include <qmmpui/generalfactory.h>
+#include "version.h"
+
+#include "aboutdialog.h"
+
static QString getstringFromResource(const QString& res_file)
{
QString ret_string;
@@ -44,7 +56,7 @@ AboutDialog::AboutDialog(QWidget* parent, Qt::WFlags fl)
setupUi(this);
setAttribute(Qt::WA_QuitOnClose, FALSE);
licenseTextEdit->setPlainText(getstringFromResource(":COPYING"));
- aboutTextEdit->setHtml(getstringFromResource(tr(":/html/about_en.html")));
+ aboutTextEdit->setHtml(loadAbout());
authorsTextEdit->setPlainText(getstringFromResource(tr(":/html/authors_en.txt")));
thanksToTextEdit->setPlainText(getstringFromResource(tr(":/html/thanks_en.txt")));
}
@@ -58,6 +70,63 @@ void AboutDialog::accept()
QDialog::accept();
}
+QString AboutDialog::loadAbout()
+{
+ QString text;
+ text.append("<head>");
+ text.append("<META content=\"text/html; charset=UTF-8\">");
+ text.append("</head>");
+ text.append("<h3>"+tr("Qt-based Multimedia Player (Qmmp)")+"</h3>");
+ text.append("<h4>"+tr("Version:")+" "+ QMMP_STR_VERSION "</h4>");
+ text.append("<p>"+getstringFromResource(tr(":txt/description_en.txt"))+"</p>");
+ text.append("<h5>"+tr("Input plugins:")+"</h5>");
+ text.append("<ul type=\"square\">");
+ foreach(DecoderFactory *fact, *Decoder::decoderFactories())
+ {
+ text.append("<li>");
+ text.append(fact->properties().name);
+ text.append("</li>");
+ }
+ text.append("</ul>");
+ text.append("<h5>"+tr("Output plugins:")+"</h5>");
+ text.append("<ul type=\"square\">");
+ foreach(OutputFactory *fact, *Output::outputFactories())
+ {
+ text.append("<li>");
+ text.append(fact->properties().name);
+ text.append("</li>");
+ }
+ text.append("</ul>");
+ text.append("<h5>"+tr("Visual plugins:")+"</h5>");
+ text.append("<ul type=\"square\">");
+ foreach(VisualFactory *fact, *Visual::visualFactories())
+ {
+ text.append("<li>");
+ text.append(fact->properties().name);
+ text.append("</li>");
+ }
+ text.append("</ul>");
+ text.append("<h5>"+tr("Effect plugins:")+"</h5>");
+ text.append("<ul type=\"square\">");
+ foreach(EffectFactory *fact, *Effect::effectFactories())
+ {
+ text.append("<li>");
+ text.append(fact->properties().name);
+ text.append("</li>");
+ }
+ text.append("</ul>");
+ text.append("<h5>"+tr("General plugins:")+"</h5>");
+ text.append("<ul type=\"square\">");
+ foreach(GeneralFactory *fact, *General::generalFactories())
+ {
+ text.append("<li>");
+ text.append(fact->properties().name);
+ text.append("</li>");
+ }
+ text.append("</ul>");
+
+ return text;
+}
diff --git a/src/ui/aboutdialog.h b/src/ui/aboutdialog.h
index 10dcde4a5..2d8384ea4 100644
--- a/src/ui/aboutdialog.h
+++ b/src/ui/aboutdialog.h
@@ -38,6 +38,9 @@ public:
protected slots:
virtual void accept();
+private:
+ QString loadAbout();
+
};
#endif
diff --git a/src/ui/forms/aboutdialog.ui b/src/ui/forms/aboutdialog.ui
index 56fbef9c5..ad7dfcf89 100644
--- a/src/ui/forms/aboutdialog.ui
+++ b/src/ui/forms/aboutdialog.ui
@@ -13,19 +13,28 @@
<string>About Qmmp</string>
</property>
<layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
<property name="spacing" >
<number>6</number>
</property>
+ <property name="leftMargin" >
+ <number>9</number>
+ </property>
+ <property name="topMargin" >
+ <number>9</number>
+ </property>
+ <property name="rightMargin" >
+ <number>9</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>9</number>
+ </property>
<item>
<widget class="QLabel" name="pixmapLabel" >
<property name="text" >
<string/>
</property>
<property name="pixmap" >
- <pixmap resource="images/images.qrc" >:/logo-qmmp.png</pixmap>
+ <pixmap resource="../images/images.qrc" >:/logo-qmmp.png</pixmap>
</property>
<property name="alignment" >
<set>Qt::AlignCenter</set>
@@ -42,10 +51,22 @@
<string>About</string>
</attribute>
<layout class="QGridLayout" >
- <property name="margin" >
+ <property name="leftMargin" >
<number>9</number>
</property>
- <property name="spacing" >
+ <property name="topMargin" >
+ <number>9</number>
+ </property>
+ <property name="rightMargin" >
+ <number>9</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>9</number>
+ </property>
+ <property name="horizontalSpacing" >
+ <number>6</number>
+ </property>
+ <property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
@@ -62,10 +83,22 @@
<string>Authors</string>
</attribute>
<layout class="QGridLayout" >
- <property name="margin" >
+ <property name="leftMargin" >
<number>9</number>
</property>
- <property name="spacing" >
+ <property name="topMargin" >
+ <number>9</number>
+ </property>
+ <property name="rightMargin" >
+ <number>9</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>9</number>
+ </property>
+ <property name="horizontalSpacing" >
+ <number>6</number>
+ </property>
+ <property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
@@ -77,17 +110,36 @@
</item>
</layout>
</widget>
+ <widget class="QWidget" name="tab" >
+ <attribute name="title" >
+ <string>Translators</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QTextEdit" name="textEdit" />
+ </item>
+ </layout>
+ </widget>
<widget class="QWidget" name="thanksToTab" >
<attribute name="title" >
<string>Thanks To</string>
</attribute>
<layout class="QHBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
<property name="spacing" >
<number>6</number>
</property>
+ <property name="leftMargin" >
+ <number>9</number>
+ </property>
+ <property name="topMargin" >
+ <number>9</number>
+ </property>
+ <property name="rightMargin" >
+ <number>9</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>9</number>
+ </property>
<item>
<widget class="QTextEdit" name="thanksToTextEdit" >
<property name="readOnly" >
@@ -102,10 +154,22 @@
<string>License Agreement</string>
</attribute>
<layout class="QGridLayout" >
- <property name="margin" >
+ <property name="leftMargin" >
<number>9</number>
</property>
- <property name="spacing" >
+ <property name="topMargin" >
+ <number>9</number>
+ </property>
+ <property name="rightMargin" >
+ <number>9</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>9</number>
+ </property>
+ <property name="horizontalSpacing" >
+ <number>6</number>
+ </property>
+ <property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="0" >
@@ -135,7 +199,7 @@
</layout>
</widget>
<resources>
- <include location="images/images.qrc" />
+ <include location="../images/images.qrc" />
</resources>
<connections>
<connection>
diff --git a/src/ui/stuff.qrc b/src/ui/stuff.qrc
index e9c99d558..20275a842 100644
--- a/src/ui/stuff.qrc
+++ b/src/ui/stuff.qrc
@@ -2,6 +2,7 @@
<RCC version="1.0">
<qresource>
<file>../../COPYING</file>
+ <file>txt/description_en.txt</file>
<file>html/about_en.html</file>
<file>html/about_ru.html</file>
<file>html/authors_en.txt</file>
diff --git a/src/ui/txt/description_en.txt b/src/ui/txt/description_en.txt
new file mode 100644
index 000000000..0f4336f6f
--- /dev/null
+++ b/src/ui/txt/description_en.txt
@@ -0,0 +1 @@
+This program is an audio-player, written with help of Qt library. \ No newline at end of file