X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=blobdiff_plain;f=Client%2Fwelcomedialog.cpp;h=f2b3c7ee0db04ebfebfe08c93dfd31171f7cb026;hp=a84c618a7d8fff0d17604ef3d50db59b1d00f86a;hb=188021aca5821b74cc990bbd1f9b8c4ff75cb29e;hpb=1f36faa8f303b72492ad538f571f1fa07b5151fe diff --git a/Client/welcomedialog.cpp b/Client/welcomedialog.cpp index a84c618..f2b3c7e 100644 --- a/Client/welcomedialog.cpp +++ b/Client/welcomedialog.cpp @@ -2,12 +2,16 @@ * Welcome dialog * * @author Toni Jussila + * @author Rikhard Kuutti * @copyright (c) 2010 Speed Freak team * @license http://opensource.org/licenses/gpl-license.php GNU Public License */ #include "welcomedialog.h" #include "ui_welcomedialog.h" +#include "instructionsdialog.h" + +#include WelcomeDialog::WelcomeDialog(QWidget *parent) : QDialog(parent), @@ -15,7 +19,7 @@ WelcomeDialog::WelcomeDialog(QWidget *parent) : { ui->setupUi(this); this->setWindowTitle(" "); - movie = new QMovie("start.gif"); + movie = new QMovie("Graphics/start.gif"); ui->labelWelcome->setMovie(movie); movie->start(); connect(movie,SIGNAL(frameChanged(int)),this,SLOT(stop(int))); @@ -46,5 +50,16 @@ void WelcomeDialog::stop(int currentFrame) { movie->stop(); this->close(); + + // Show instructionsDialog if this is + // the first time the application is run + QSettings settings; + bool firstRunGone = settings.value("firstRunGone").toBool(); + if (!firstRunGone) { + // show instructions + InstructionsDialog *instructionsDialog = new InstructionsDialog; + instructionsDialog->show(); + settings.setValue("firstRunGone", true); + } } }