Merge branch 'bookmarks' of ssh://drop.maemo.org/git/mdictionary into bookmarks
authorMateusz Półrola <mateusz.polrola@comarch.pl>
Wed, 18 Aug 2010 10:31:56 +0000 (12:31 +0200)
committerMateusz Półrola <mateusz.polrola@comarch.pl>
Wed, 18 Aug 2010 10:31:56 +0000 (12:31 +0200)
trunk/src/base/gui/AboutWidget.cpp [new file with mode: 0644]
trunk/src/base/gui/AboutWidget.h [new file with mode: 0644]

diff --git a/trunk/src/base/gui/AboutWidget.cpp b/trunk/src/base/gui/AboutWidget.cpp
new file mode 100644 (file)
index 0000000..ddd6cdd
--- /dev/null
@@ -0,0 +1,44 @@
+#include "AboutWidget.h"
+
+AboutWidget::AboutWidget(GUIInterface *parent): QDialog(parent)
+{
+    QString infoNote, licenseNote, comarchNote;
+    infoNote = "<center><h2><u>mDictionary</u></h2></center>";
+    infoNote += "<center>Meamo/Meego Mulitlingual Dictionary</center>";
+    comarchNote = "<center>Copyright 2006-2010, Comarch S.A. </center>";
+    licenseNote = "<br /><p><font size=\"small\">This program is free software: you can redistribute it and/or modify\n"
+                  "it under the terms of the GNU General Public License as published by\n"
+                  "the Free Software Foundation, either version 3 of the License, or\n"
+                  "(at your option) any later version.<br />"
+                  "This program is distributed in the hope that it will be useful,\n"
+                  "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
+                  "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
+                  "GNU General Public License for more details.<br />"
+                  "You should have received a copy of the GNU General Public License\n"
+                  "along with this program.  If not, see <http://www.gnu.org/licenses/>."
+                  "</p></font>";
+
+    setWindowTitle("About mDictionary");
+    mainLayout = new QVBoxLayout(this);
+    setLayout(mainLayout);
+
+    imageLabel = new QLabel(this);
+    mainLabel = new QLabel(this);
+    licenseLabel = new QLabel(this);
+    mainLayout->addWidget(imageLabel, 0, Qt::AlignCenter);
+    mainLayout->addWidget(mainLabel);
+    mainLayout->addWidget(licenseLabel);
+
+    QImage img(":/icons/mdictionary.png");
+    imageLabel->setPixmap(QPixmap::fromImage(img));
+    imageLabel->resize(imageLabel->pixmap()->size());
+
+    mainLabel->setText(infoNote + comarchNote);
+
+    licenseLabel->setText(licenseNote);
+    licenseLabel->setWordWrap(true);
+
+    #ifdef Q_WS_MAEMO_5
+        mainLayout->addSpacing(20);
+    #endif
+}
diff --git a/trunk/src/base/gui/AboutWidget.h b/trunk/src/base/gui/AboutWidget.h
new file mode 100644 (file)
index 0000000..6bfa069
--- /dev/null
@@ -0,0 +1,21 @@
+#ifndef ABOUTWIDGET_H
+#define ABOUTWIDGET_H
+
+#include <QDialog>
+#include <QWidget>
+#include <QtGui>
+#include "../../includes/GUIInterface.h"
+
+class AboutWidget : public QDialog
+{
+    Q_OBJECT
+public:
+    AboutWidget(GUIInterface *parent = 0);
+private:
+    QVBoxLayout* mainLayout;
+    QLabel* mainLabel, * licenseLabel, *imageLabel;
+
+
+};
+
+#endif // ABOUTWIDGET_H