Fixed debian packaging.
[medard] / src / aboutdialog.cpp
index 74b509f..6f71c3d 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#ifdef Q_WS_MAEMO_6
+#include <MLabel>
+#endif
+
 #include <QtGui>
 
 #include "aboutdialog.h"
 
-AboutDialog::AboutDialog(QMainWindow *parent) : QMainWindow(parent)
+#ifdef Q_WS_MAEMO_6
+AboutDialog::AboutDialog(QGraphicsItem *parent) : MMessageBox("", M::OkButton)
+{
+    Q_UNUSED(parent);
+
+    setObjectName("messageBox");
+
+    setTitle("Medard 0.2.0\n");
+    setText(tr("Copyright(c) 2011 Roman Moravcik") +
+            tr("\n"
+               "Weather data:\n"
+               "Project MEDARD, Institute of Computer Science,\n"
+               "Academy of Sciences of the Czech Republic, Prague\n"
+               "\n"
+               "Copyright(c) Institute of Computer Science AS CR 2003-2009.\n"
+               "MM5: PSU/NCAR, USA (c) CAMx: EVNIRON Corp., USA"));
+}
+#else
+AboutDialog::AboutDialog(QDialog *parent) : QDialog(parent)
 {
+    setWindowTitle(tr("About"));
+
+    QVBoxLayout *layout = new QVBoxLayout();
+    layout->setMargin(16);
+    layout->setSpacing(16);
+    setLayout(layout);
+
+    QLabel *application = new QLabel();
+    QFont font = application->font();
+    font.setBold(true);
+    font.setPointSize(32);
+    application->setFont(font);
+    application->setText("Medard 0.1");
+    application->setAlignment(Qt::AlignCenter);
+    layout->addWidget(application);
+
+    QLabel *applicationCopyright = new QLabel();
+    applicationCopyright->setText(tr("Copyright(c) 2011 Roman Moravcik"));
+    applicationCopyright->setAlignment(Qt::AlignCenter);
+    layout->addWidget(applicationCopyright);
+
+    QLabel *weatherDataCopyright = new QLabel();
+    weatherDataCopyright->setText(tr("\n"
+                                  "Weather data:\n"
+                                  "Project MEDARD, Institute of Computer Science,\n"
+                                  "Academy of Sciences of the Czech Republic, Prague\n"
+                                  "\n"
+                                  "Copyright(c) Institute of Computer Science AS CR 2003-2009.\n"
+                                  "MM5: PSU/NCAR, USA (c) CAMx: EVNIRON Corp., USA"));
+    layout->addWidget(weatherDataCopyright);
+
 }
+#endif