X-Git-Url: http://git.maemo.org/git/?p=someplayer;a=blobdiff_plain;f=src%2Faboutform.cpp;h=2edb7dd1884bd7f093f77ded8a7d0458a891aa41;hp=ab1ddf39fa77cbfc4643e82ffb486ccf95bd1800;hb=09cb1beb1534a9146c1d7d9b4b7b64f7e76b0f4f;hpb=b2637112412719f42c472b35043bede55c1234cd diff --git a/src/aboutform.cpp b/src/aboutform.cpp index ab1ddf3..2edb7dd 100644 --- a/src/aboutform.cpp +++ b/src/aboutform.cpp @@ -1,6 +1,8 @@ #include "aboutform.h" #include "ui_aboutform.h" #include "config.h" +#include +#include using namespace SomePlayer::Storage; @@ -13,6 +15,8 @@ AboutForm::AboutForm(QWidget *parent) : updateTranslations(); setAttribute(Qt::WA_Maemo5StackedWindow); setWindowFlags(Qt::Window | windowFlags()); + connect(ui->onlineHelpButton, SIGNAL(clicked()), this, SLOT(onlineHelp())); + ui->donateButton->hide(); } AboutForm::~AboutForm() @@ -29,3 +33,23 @@ void AboutForm::updateIcons() { void AboutForm::updateTranslations() { ui->retranslateUi(this); } + +void AboutForm::onlineHelp() { + Config config; + QWebView *view = new QWebView(this); + view->setAttribute(Qt::WA_Maemo5StackedWindow); + view->setWindowFlags(Qt::Window | view->windowFlags()); + QString lang = config.getValue("ui/language").toString(); + QString icons_theme = config.getValue("ui/iconstheme").toString(); + QColor background = palette().color(QPalette::Active, QPalette::Background); + QColor text = palette().color(QPalette::Active, QPalette::Text); + QString paramBg = QString("%1:%2:%3").arg(background.red()).arg(background.blue()).arg(background.green()); + QString paramText = QString("%1:%2:%3").arg(text.red()).arg(text.blue()).arg(text.green()); + QString url = QString("http://someplayer.some-body.ru/help.php?bg=%1&text=%2&lang=%3&iconstheme=%4") + .arg(paramBg).arg(paramText).arg(lang).arg(icons_theme); + view->load(QUrl(url)); + view->show(); +} + +void AboutForm::donate() { +}