Added license information
[speedfreak] / Client / mainwindow.cpp
1 /*
2  * Mainwindow for speedFreak project
3  *
4  * @author      Rikhard Kuutti <rikhard.kuutti@fudeco.com>
5  * @copyright   (c) 2010 Speed Freak team
6  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
7  */
8
9 #include "mainwindow.h"
10 #include "ui_mainwindow.h"
11
12 #include <QDesktopServices>
13 #include <QUrl>
14
15 MainWindow::MainWindow(QWidget *parent) :
16     QMainWindow(parent),
17     ui(new Ui::MainWindow)
18 {
19     ui->setupUi(this);
20
21     creditsDialog = new CreditsDialog;
22 }
23
24 MainWindow::~MainWindow()
25 {
26     delete ui;
27 }
28
29 void MainWindow::changeEvent(QEvent *e)
30 {
31     QMainWindow::changeEvent(e);
32     switch (e->type()) {
33     case QEvent::LanguageChange:
34         ui->retranslateUi(this);
35         break;
36     default:
37         break;
38     }
39 }
40
41 void MainWindow::on_pushButtonWWW_clicked()
42 {
43     QDesktopServices::openUrl(QUrl("http://garage.maemo.org/projects/speedfreak/"));
44 }
45
46 void MainWindow::on_pushButtonCredits_clicked()
47 {
48     creditsDialog->show();
49 }