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