Add outline to xdxf plugin icon, now it is visible on black background
[mdictionary] / src / mdictionary / gui / AboutWidget.cpp
1 /*******************************************************************************
2
3     This file is part of mDictionary.
4
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.
9
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.
14
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/>.
17
18     Copyright 2010 Comarch S.A.
19
20 *******************************************************************************/
21 //! \file AboutWidget.cpp
22 //! \brief Simple "about" widget - product, company, license info
23 //! \author Bartosz Szatkowski <bulislaw@linux.com>
24
25 #include "AboutWidget.h"
26
27 AboutWidget::AboutWidget(GUIInterface *parent): QDialog(parent)
28 {
29     QString infoNote, licenseNote, comarchNote;
30     infoNote = "<center><h2><u>mDictionary</u></h2></center>";
31     comarchNote = "<center>Maemo/Meego Multilingual Dictionary</center>";
32     comarchNote += "<center>Copyright 2006-2010, Comarch S.A. <br>";
33     comarchNote += "<a href=\"http://mdictionary.garage.maemo.org\">"
34                    "http://mdictionary.garage.maemo.org</a></center>";
35     licenseNote = QString("<br><p><font size=\"small\">This program is free"
36                   "software: you can redistribute it and/or modify\n"
37                   "it under the terms of the GNU General Public License as"
38                   "published by\n"
39                   "the Free Software Foundation, either version 3 of the License,"
40                   "or\n"
41                   "(at your option) any later version.<br>"
42                   "This program is distributed in the hope that it will be"
43                   "useful,\n"
44                   "but WITHOUT ANY WARRANTY; without even the implied warranty"
45                   "of\n"
46                   "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. "
47                   "See the\n"
48                   "GNU General Public License for more details.<br>"
49                   "You should have received a copy of the GNU General Public "
50                   "License<br>"
51                   "along with this program.  If not, see"
52                   "&lt;<a href=\"http://www.gnu.org/licenses/\">"
53                   "http://www.gnu.org/licenses/</a>&gt;."
54                   "</p></font>");
55
56     setWindowTitle(tr("About"));
57     mainLayout = new QVBoxLayout;
58
59     #ifndef Q_WS_MAEMO_5
60         scrollLayout = new QVBoxLayout;
61         scroll = new QScrollArea;
62         w = new QWidget(this);
63
64     #endif
65
66
67     imageLabel = new QLabel;
68     mainLabel = new QLabel;
69     licenseLabel = new QLabel;
70
71
72     QImage img(":/icons/logo/mdictionary.png");
73     imageLabel->setPixmap(QPixmap::fromImage(img));
74     imageLabel->setMinimumSize(imageLabel->pixmap()->size());
75
76     mainLabel->setText(infoNote + comarchNote);
77     mainLabel->setOpenExternalLinks(true);
78     mainLabel->setMinimumSize(mainLabel->sizeHint());
79
80
81     licenseLabel->setWordWrap(true);
82     licenseLabel->setText(licenseNote);
83     licenseLabel->setOpenExternalLinks(true);
84     licenseLabel->setMinimumSize(licenseLabel->sizeHint());
85
86
87     mainLayout->addWidget(imageLabel, 0, Qt::AlignHCenter);
88     mainLayout->addWidget(mainLabel, 0, Qt::AlignHCenter);
89     mainLayout->addWidget(licenseLabel, 0, Qt::AlignHCenter);
90
91
92     #ifndef Q_WS_MAEMO_5
93         w->setLayout(mainLayout);
94         scroll->setWidget(w);
95         scroll->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
96         scrollLayout->addWidget(scroll, 0, Qt::AlignHCenter);
97         this->setLayout(scrollLayout);
98         w->setMinimumSize(img.width()*1.6, img.height()*2.45);
99         scroll->setLineWidth(0);
100         scroll->setMidLineWidth(0);
101         scroll->setFrameStyle(QFrame::NoFrame);;
102     #else
103         setLayout(mainLayout);
104     #endif
105
106
107
108
109
110 }