Added empty about dialog
authorRoman Moravcik <roman.moravcik@gmail.com>
Thu, 3 Mar 2011 21:15:49 +0000 (22:15 +0100)
committerRoman Moravcik <roman.moravcik@gmail.com>
Thu, 3 Mar 2011 21:15:49 +0000 (22:15 +0100)
medard.pro
src/aboutdialog.cpp [new file with mode: 0644]
src/aboutdialog.h [new file with mode: 0644]
src/mainwindow.cpp
src/mainwindow.h

index b69ddad..b48a224 100644 (file)
@@ -29,11 +29,13 @@ SOURCES += \
     src/forecastwidget.cpp \
     src/medarddownloader.cpp \
     src/mainwindow.cpp \
-    src/main.cpp
+    src/main.cpp \
+    src/aboutdialog.cpp
 HEADERS += \
     src/forecastwidget.h \
     src/medarddownloader.h \
-    src/mainwindow.h
+    src/mainwindow.h \
+    src/aboutdialog.h
 FORMS +=
 
 TRANSLATIONS += \
diff --git a/src/aboutdialog.cpp b/src/aboutdialog.cpp
new file mode 100644 (file)
index 0000000..74b509f
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ *  Medard for Maemo.
+ *  Copyright (C) 2011 Roman Moravcik
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <QtGui>
+
+#include "aboutdialog.h"
+
+AboutDialog::AboutDialog(QMainWindow *parent) : QMainWindow(parent)
+{
+}
diff --git a/src/aboutdialog.h b/src/aboutdialog.h
new file mode 100644 (file)
index 0000000..87e5ff0
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ *  Medard for Maemo.
+ *  Copyright (C) 2011 Roman Moravcik
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef ABOUTDIALOG_H
+#define ABOUTDIALOG_H
+
+#include <QMainWindow>
+
+class AboutDialog : public QMainWindow
+{
+    Q_OBJECT
+
+public:
+    AboutDialog(QMainWindow *parent = 0);
+};
+
+#endif // ABOUTDIALOG_H
index d76a17c..e215c34 100644 (file)
@@ -20,6 +20,7 @@
 #include <QtGui>
 #include <QSettings>
 
+#include "aboutdialog.h"
 #include "mainwindow.h"
 
 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
@@ -145,6 +146,10 @@ void MainWindow::setupMenu()
     QAction *temperatureAction = new QAction(tr("Temperature"), this);
     menu->addAction(temperatureAction);
     connect(temperatureAction, SIGNAL(triggered()), this, SLOT(temperatureMenuClicked()));
+
+    QAction *aboutAction = new QAction(tr("About"), this);
+    menu->addAction(aboutAction);
+    connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutMenuClicked()));
 }
 
 void MainWindow::loadSettings()
@@ -253,6 +258,12 @@ void MainWindow::temperatureMenuClicked()
     forecastTypeChanged(tr("Temperature"), MedardDownloader::Temperature);
 }
 
+void MainWindow::aboutMenuClicked()
+{
+    AboutDialog *dialog = new AboutDialog();
+    dialog->show();
+}
+
 void MainWindow::downloadAgainClicked()
 {
     m_forecast->clearImage(false);
index a281e5b..c4f224e 100644 (file)
@@ -42,6 +42,7 @@ private slots:
     void windVelocityMenuClicked();
     void cloudinessMenuClicked();
     void temperatureMenuClicked();
+    void aboutMenuClicked();
 
     void downloadAgainClicked();