81103a49ce6baee59a617fb5d16930cd8ac027d4
[speedfreak] / Client / mainwindow.cpp
1 #include "mainwindow.h"
2 #include "ui_mainwindow.h"
3
4 #include <QDesktopServices>
5 #include <QUrl>
6
7 MainWindow::MainWindow(QWidget *parent) :
8     QMainWindow(parent),
9     ui(new Ui::MainWindow)
10 {
11     ui->setupUi(this);
12
13     creditsDialog = new CreditsDialog;
14 }
15
16 MainWindow::~MainWindow()
17 {
18     delete ui;
19 }
20
21 void MainWindow::changeEvent(QEvent *e)
22 {
23     QMainWindow::changeEvent(e);
24     switch (e->type()) {
25     case QEvent::LanguageChange:
26         ui->retranslateUi(this);
27         break;
28     default:
29         break;
30     }
31 }
32
33 void MainWindow::on_pushButtonWWW_clicked()
34 {
35     QDesktopServices::openUrl(QUrl("http://garage.maemo.org/projects/speedfreak/"));
36 }
37
38 void MainWindow::on_pushButtonCredits_clicked()
39 {
40     creditsDialog->show();
41 }