2 #include "ui_aboutform.h"
7 using namespace SomePlayer::Storage;
9 AboutForm::AboutForm(QWidget *parent) :
16 setAttribute(Qt::WA_Maemo5StackedWindow);
17 setWindowFlags(Qt::Window | windowFlags());
18 connect(ui->onlineHelpButton, SIGNAL(clicked()), this, SLOT(onlineHelp()));
19 ui->donateButton->hide();
22 AboutForm::~AboutForm()
27 void AboutForm::updateIcons() {
29 _icons_theme = config.getValue("ui/iconstheme").toString();
30 ui->logoLabel->setPixmap(QPixmap(":/icons/"+_icons_theme+"/player.png"));
33 void AboutForm::updateTranslations() {
34 ui->retranslateUi(this);
37 void AboutForm::onlineHelp() {
39 QWebView *view = new QWebView(this);
40 view->setAttribute(Qt::WA_Maemo5StackedWindow);
41 view->setWindowFlags(Qt::Window | view->windowFlags());
42 QString lang = config.getValue("ui/language").toString();
43 QString icons_theme = config.getValue("ui/iconstheme").toString();
44 QColor background = palette().color(QPalette::Active, QPalette::Background);
45 QColor text = palette().color(QPalette::Active, QPalette::Text);
46 QString paramBg = QString("%1:%2:%3").arg(background.red()).arg(background.blue()).arg(background.green());
47 QString paramText = QString("%1:%2:%3").arg(text.red()).arg(text.blue()).arg(text.green());
48 QString url = QString("http://someplayer.some-body.ru/help.php?bg=%1&text=%2&lang=%3&iconstheme=%4")
49 .arg(paramBg).arg(paramText).arg(lang).arg(icons_theme);
50 view->load(QUrl(url));
54 void AboutForm::donate() {