Added instructions dialog
[speedfreak] / Client / welcomedialog.cpp
index a84c618..eea387b 100644 (file)
@@ -8,6 +8,9 @@
 
 #include "welcomedialog.h"
 #include "ui_welcomedialog.h"
+#include "instructionsdialog.h"
+
+#include <QSettings>
 
 WelcomeDialog::WelcomeDialog(QWidget *parent) :
     QDialog(parent),
@@ -46,5 +49,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);
+        }
     }
 }