1 /*******************************************************************************
3 This file is part of mDictionary.
5 mDictionary is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 mDictionary is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with mDictionary. If not, see <http://www.gnu.org/licenses/>.
18 Copyright 2010 Comarch S.A.
20 *******************************************************************************/
21 //! \file AboutWidget.cpp
22 //! \brief Simple "about" widget - product, company, license info
23 //! \author Bartosz Szatkowski <bulislaw@linux.com>
25 #include "AboutWidget.h"
27 AboutWidget::AboutWidget(GUIInterface *parent): QDialog(parent)
29 QString infoNote, licenseNote, comarchNote;
30 infoNote = "<center><h2><u>mDictionary</u></h2></center>";
31 comarchNote = "<center>Meamo/Meego Multilingual Dictionary</center>";
32 comarchNote += "<center>Copyright 2006-2010, Comarch S.A. <br>";
33 comarchNote += "<a href=\"http://mdictionary.garage.maemo.org\">http://mdictionary.garage.maemo.org</a></center>";
34 licenseNote = QString("<br><p><font size=\"small\">This program is free software: you can redistribute it and/or modify\n")+
35 QString("it under the terms of the GNU General Public License as published by\n")+
36 QString("the Free Software Foundation, either version 3 of the License, or\n")+
37 QString("(at your option) any later version.<br>")+
38 QString("This program is distributed in the hope that it will be useful,\n")+
39 QString("but WITHOUT ANY WARRANTY; without even the implied warranty of\n")+
40 QString("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n")+
41 QString("GNU General Public License for more details.<br>") +
42 QString("You should have received a copy of the GNU General Public License<br>") +
43 QString("along with this program. If not, see") +
44 QString("<<a href=\"http://www.gnu.org/licenses/\">") +
45 QString("http://www.gnu.org/licenses/</a>>.") +
46 QString("</p></font>");
48 setWindowTitle(tr("About"));
49 mainLayout = new QVBoxLayout;
52 scrollLayout = new QVBoxLayout;
53 scroll = new QScrollArea;
54 w = new QWidget(this);
59 imageLabel = new QLabel;
60 mainLabel = new QLabel;
61 licenseLabel = new QLabel;
64 QImage img(":/icons/logo/mdictionary.png");
65 imageLabel->setPixmap(QPixmap::fromImage(img));
66 imageLabel->setMinimumSize(imageLabel->pixmap()->size());
68 mainLabel->setText(infoNote + comarchNote);
69 mainLabel->setOpenExternalLinks(true);
70 mainLabel->setMinimumSize(mainLabel->sizeHint());
73 licenseLabel->setWordWrap(true);
74 licenseLabel->setText(licenseNote);
75 licenseLabel->setOpenExternalLinks(true);
76 licenseLabel->setMinimumSize(licenseLabel->sizeHint());
79 mainLayout->addWidget(imageLabel, 0, Qt::AlignHCenter);
80 mainLayout->addWidget(mainLabel, 0, Qt::AlignHCenter);
81 mainLayout->addWidget(licenseLabel, 0, Qt::AlignHCenter);
85 w->setLayout(mainLayout);
87 scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
88 scrollLayout->addWidget(scroll, 0, Qt::AlignHCenter);
89 this->setLayout(scrollLayout);
90 w->setMinimumSize(img.width()*1.6, img.height()*2.45);
92 setLayout(mainLayout);