diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:31 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:31 -0400 |
commit | 294b5ec5834affa57641475946b8d2aeca53c577 (patch) | |
tree | ca25b634d0f24ab5b1fc38eb805e72e0e993e0f1 /src/frontend/htmldialogs | |
parent | e8a196082586bb68e0bf254a8f6f4b8f39071f32 (diff) |
Imported Upstream version 2.4
Diffstat (limited to 'src/frontend/htmldialogs')
-rw-r--r-- | src/frontend/htmldialogs/btaboutdialog.cpp | 43 | ||||
-rw-r--r-- | src/frontend/htmldialogs/btaboutdialog.h | 5 | ||||
-rw-r--r-- | src/frontend/htmldialogs/bttabhtmldialog.cpp | 19 | ||||
-rw-r--r-- | src/frontend/htmldialogs/bttabhtmldialog.h | 2 |
4 files changed, 42 insertions, 27 deletions
diff --git a/src/frontend/htmldialogs/btaboutdialog.cpp b/src/frontend/htmldialogs/btaboutdialog.cpp index 2c6f553..f8e6666 100644 --- a/src/frontend/htmldialogs/btaboutdialog.cpp +++ b/src/frontend/htmldialogs/btaboutdialog.cpp @@ -7,11 +7,13 @@ * **********/ -#include "btaboutdialog.h" +#include "frontend/htmldialogs/btaboutdialog.h" -#include "util/directoryutil.h" +#include "util/directory.h" + +// Sword includes: +#include <swversion.h> -#include "swversion.h" // Forwards static QString make_body(const QString& content); @@ -99,8 +101,10 @@ void BtAboutDialog::init_contributors_tab() { // sorted alphabetically (last name) content += "<ul>"; content += "<li>Horatiu Alexe</li>"; - content += "<li>Jan B&ecarron;lohoubek</li>"; + content += "<li>Jan Bělohoubek</li>"; content += "<li>Chun-shek Chan</li>"; + content += "<li>Nouhoun Y. Diarra</li>"; + content += "<li>Rafael Fagundes</li>"; content += "<li>Ilpo Kantonen</li>"; content += "<li>Pavel Laukko</li>"; content += "<li>Piotr Markiewicz</li>"; @@ -111,8 +115,11 @@ void BtAboutDialog::init_contributors_tab() { content += "<li>Jaak Ristioja</li>"; content += "<li>Igor Rykhlin</li>"; content += "<li>Vlad Savitsky</li>"; + content += "<li>Henrik Sonesson</li>"; content += "<li>Johan van der Lingen</li>"; content += "<li>Jean Van Schaftingen</li>"; + content += "<li>Roland Teschner</li>"; + content += "<li>Giovanni Tedaldi</li>"; content += "<li>Dmitry Yurevich</li>"; content += "<li>Esteban Zeller</li>"; content += "</ul>"; @@ -149,21 +156,21 @@ void BtAboutDialog::init_qt_tab() { content += make_br() + make_br(); content += make_center(make_bold("Qt")); content += make_br(); - content += tr("This program uses Qt Open Source Edition version %1.").arg(qVersion()); - //content += qVersion(); + content += tr("This program uses Qt version %1.").arg(qVersion()); content += make_br() + make_br(); - content += tr("Qt Open Source Edition is intended for the development of Open Source applications."); - content += " "; - content += tr("Qt is a C++ toolkit for cross-platform application development."); + content += tr("Qt is a cross-platform application and UI framework, created with C++ language. It has been released under the LGPL license."); content += make_br() + make_br(); - content += tr("Please see "); - content += make_link("http://qtsoftware.com/company/model/", "qtsoftware.com/company/model"); - content += tr(" for an overview of Qt licensing."); + content += make_link("http://qt.nokia.com/", "http://qt.nokia.com/"); + //content += tr("Please see "); + //content += make_link("http://qtsoftware.com/company/model/", "qtsoftware.com/company/model"); + //content += tr(" for an overview of Qt licensing."); QString qt = make_html(make_head("") + make_body(content)); setHtml(qt); } void BtAboutDialog::init_lic_tab() { + namespace DU = util::directory; + selectTab(4); setTabText(tr("License")); @@ -173,12 +180,12 @@ void BtAboutDialog::init_lic_tab() { text += tr("You can download and use (but not distribute) the program for personal, private, public or commercial purposes without restrictions."); text += " "; text += tr("You can give away or distribute the program if you also distribute the corresponding source code."); - text += "<br><br>"; + text += "<br/><br/>"; //text += tr("It is allowed to distribute software under GPL for a small fee, but it must be accompanied with the complete source code, and the fact that it is freely available with no cost must not be hidden."); - //text += "<br><br>"; + //text += "<br/><br/>"; text += tr("The complete legally binding license is below."); - QFile licFile(util::filesystem::DirectoryUtil::getLicenseDir().path() + "/license.html"); + QFile licFile(DU::getLicenseDir().path() + "/license.html"); if (licFile.open(QFile::ReadOnly)) { QByteArray html; while (!licFile.atEnd()) { @@ -200,7 +207,7 @@ static QString make_center(const QString& content) { } static QString make_br() { - return "<br>"; + return "<br/>"; } static QString make_bold(const QString& content) { @@ -229,7 +236,9 @@ static QString make_version() { } static QString make_file_icon(const QString& icon) { - QString dir = "<img src=file://" + util::filesystem::DirectoryUtil::getIconDir().path(); + namespace DU = util::directory; + + QString dir("<img src=file://" + DU::getIconDir().path()); return dir + "/" + icon + ".png >"; } diff --git a/src/frontend/htmldialogs/btaboutdialog.h b/src/frontend/htmldialogs/btaboutdialog.h index 6521f7f..2fed22a 100644 --- a/src/frontend/htmldialogs/btaboutdialog.h +++ b/src/frontend/htmldialogs/btaboutdialog.h @@ -10,14 +10,15 @@ #ifndef BTABOUTDIALOG_H #define BTABOUTDIALOG_H -#include "bttabhtmldialog.h" +#include "frontend/htmldialogs/bttabhtmldialog.h" + class BtAboutDialog : public BtTabHtmlDialog { Q_OBJECT - public: BtAboutDialog(QWidget *parent = 0, Qt::WindowFlags wflags = Qt::Dialog); ~BtAboutDialog(); + void init_bt_tab(); void init_contributors_tab(); void init_sword_tab(); diff --git a/src/frontend/htmldialogs/bttabhtmldialog.cpp b/src/frontend/htmldialogs/bttabhtmldialog.cpp index 4d2b57c..74a2b20 100644 --- a/src/frontend/htmldialogs/bttabhtmldialog.cpp +++ b/src/frontend/htmldialogs/bttabhtmldialog.cpp @@ -7,18 +7,19 @@ * **********/ -#include "bttabhtmldialog.h" // See this file for more documentation of BtTabHtmlDialog -#include "util/dialogutil.h" -#include "util/directoryutil.h" +#include "frontend/htmldialogs/bttabhtmldialog.h" +#include <QContextMenuEvent> +#include <QDesktopServices> #include <QDialog> #include <QDialogButtonBox> -#include <QVBoxLayout> -#include <QWebView> #include <QMenu> #include <QTabWidget> -#include <QDesktopServices> -#include <QContextMenuEvent> +#include <QVBoxLayout> +#include <QWebView> +#include "util/dialogutil.h" +#include "util/directory.h" + BtTabHtmlDialog::BtTabHtmlDialog (const QString& title, int tabs, QWidget *parent, Qt::WindowFlags wflags ) @@ -91,9 +92,11 @@ QWebView* BtTabHtmlDialog::webView() { } void BtTabHtmlDialog::setHtml(const QString& html, const QUrl& baseUrl) { + namespace DU = util::directory; + QUrl url = baseUrl; if (url == QUrl()) { - QString dir = "file://" + util::filesystem::DirectoryUtil::getIconDir().path(); + QString dir("file://" + DU::getIconDir().path()); url.setUrl(dir); } webView()->setHtml(html, url); diff --git a/src/frontend/htmldialogs/bttabhtmldialog.h b/src/frontend/htmldialogs/bttabhtmldialog.h index 3ccdc0f..6e5ed20 100644 --- a/src/frontend/htmldialogs/bttabhtmldialog.h +++ b/src/frontend/htmldialogs/bttabhtmldialog.h @@ -11,10 +11,12 @@ #define BTTABDIALOG_H #include <QDialog> + #include <QString> #include <QUrl> #include <QWebView> + class QTabWidget; class QMenu; |