1 #include "AboutWidget.h"
3 AboutWidget::AboutWidget(GUIInterface *parent): QDialog(parent)
5 QString infoNote, licenseNote, comarchNote;
6 infoNote = "<center><h2><u>mDictionary</u></h2></center>";
7 comarchNote = "<center>Meamo/Meego Mulitlingual Dictionary</center>";
8 comarchNote += "<center>Copyright 2006-2010, Comarch S.A. <br>";
9 comarchNote += "<a href=\"http://mdictionary.garage.maemo.org\">http://mdictionary.garage.maemo.org</a></center>";
10 licenseNote = QString("<br><p><font size=\"small\">This program is free software: you can redistribute it and/or modify\n")+
11 QString("it under the terms of the GNU General Public License as published by\n")+
12 QString("the Free Software Foundation, either version 3 of the License, or\n")+
13 QString("(at your option) any later version.<br>")+
14 QString("This program is distributed in the hope that it will be useful,\n")+
15 QString("but WITHOUT ANY WARRANTY; without even the implied warranty of\n")+
16 QString("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n")+
17 QString("GNU General Public License for more details.<br>") +
18 QString("You should have received a copy of the GNU General Public License<br>") +
19 QString("along with this program. If not, see") +
20 QString("<<a href=\"http://www.gnu.org/licenses/\">") +
21 QString("http://www.gnu.org/licenses/</a>>.") +
22 QString("</p></font>");
24 setWindowTitle(tr("About"));
25 mainLayout = new QVBoxLayout;
28 scrollLayout = new QVBoxLayout;
29 scroll = new QScrollArea;
30 w = new QWidget(this);
35 imageLabel = new QLabel;
36 mainLabel = new QLabel;
37 licenseLabel = new QLabel;
40 QImage img(":/icons/logo/mdictionary.png");
41 imageLabel->setPixmap(QPixmap::fromImage(img));
42 imageLabel->setMinimumSize(imageLabel->pixmap()->size());
44 mainLabel->setText(infoNote + comarchNote);
45 mainLabel->setOpenExternalLinks(true);
46 mainLabel->setMinimumSize(mainLabel->sizeHint());
49 licenseLabel->setWordWrap(true);
50 licenseLabel->setText(licenseNote);
51 licenseLabel->setOpenExternalLinks(true);
52 licenseLabel->setMinimumSize(licenseLabel->sizeHint());
55 mainLayout->addWidget(imageLabel, 0, Qt::AlignHCenter);
56 mainLayout->addWidget(mainLabel, 0, Qt::AlignHCenter);
57 mainLayout->addWidget(licenseLabel, 0, Qt::AlignHCenter);
61 w->setLayout(mainLayout);
63 scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
64 scrollLayout->addWidget(scroll, 0, Qt::AlignHCenter);
65 this->setLayout(scrollLayout);
66 scroll->setMinimumSize(img.width()*1.65, img.height()*2.60);
68 setLayout(mainLayout);