4 * @author Toni Jussila <toni.jussila@fudeco.com>
5 * @copyright (c) 2010 Speed Freak team
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 #include "welcomedialog.h"
10 #include "ui_welcomedialog.h"
11 #include "instructionsdialog.h"
15 WelcomeDialog::WelcomeDialog(QWidget *parent) :
17 ui(new Ui::WelcomeDialog)
20 this->setWindowTitle(" ");
21 movie = new QMovie("start.gif");
22 ui->labelWelcome->setMovie(movie);
24 connect(movie,SIGNAL(frameChanged(int)),this,SLOT(stop(int)));
27 WelcomeDialog::~WelcomeDialog()
34 void WelcomeDialog::changeEvent(QEvent *e)
36 QDialog::changeEvent(e);
38 case QEvent::LanguageChange:
39 ui->retranslateUi(this);
46 void WelcomeDialog::stop(int currentFrame)
48 if (currentFrame == 21)
53 // Show instructionsDialog if this is
54 // the first time the application is run
56 bool firstRunGone = settings.value("firstRunGone").toBool();
59 InstructionsDialog *instructionsDialog = new InstructionsDialog;
60 instructionsDialog->show();
61 settings.setValue("firstRunGone", true);