Added help for settings dialog.
authorJanne Änäkkälä <janne.anakkala@fudeco.com>
Mon, 19 Apr 2010 09:19:08 +0000 (12:19 +0300)
committerJanne Änäkkälä <janne.anakkala@fudeco.com>
Mon, 19 Apr 2010 09:19:08 +0000 (12:19 +0300)
Client/Graphics/settingsDialog.png [new file with mode: 0644]
Client/graphics.qrc
Client/helpdialog.cpp
Client/helpdialog.h
Client/helpdialog.ui
Client/helpsettingsdialog.cpp [new file with mode: 0644]
Client/helpsettingsdialog.h [new file with mode: 0644]
Client/helpsettingsdialog.ui [new file with mode: 0644]
Client/speedfreak.pro

diff --git a/Client/Graphics/settingsDialog.png b/Client/Graphics/settingsDialog.png
new file mode 100644 (file)
index 0000000..8c9c2a3
Binary files /dev/null and b/Client/Graphics/settingsDialog.png differ
index cf5b651..50b60bc 100644 (file)
@@ -20,6 +20,7 @@
         <file>Graphics/route_stop.png</file>
         <file>Graphics/trophy_gold_refresh.png</file>
         <file>Graphics/sf_2.png</file>
-       <file>Graphics/measuringDialog.png</file>
+        <file>Graphics/measuringDialog.png</file>
+        <file>Graphics/settingsDialog.png</file>
     </qresource>
 </RCC>
index 92ffcc2..e63eb35 100644 (file)
@@ -10,6 +10,7 @@ HelpDialog::HelpDialog(QWidget *parent) :
     helpAccelerationDialog = NULL;
     helpRoutingDialog = NULL;
     creditsDialog = NULL;
+    helpSettingsDialog = NULL;
 }
 
 HelpDialog::~HelpDialog()
@@ -65,3 +66,12 @@ void HelpDialog::on_pushButtonCredits_clicked()
     }
     creditsDialog->show();
 }
+
+void HelpDialog::on_pushButtonHelpSettings_clicked()
+{
+    if(!helpSettingsDialog)
+    {
+        helpSettingsDialog = new HelpSettingsDialog;
+    }
+    helpSettingsDialog->show();
+}
index 2348d5c..9ca31aa 100644 (file)
@@ -6,6 +6,7 @@
 #include <helpaccelerationdialog.h>
 #include <helproutingdialog.h>
 #include "creditsdialog.h"
+#include <helpsettingsdialog.h>
 
 namespace Ui {
     class HelpDialog;
@@ -21,6 +22,7 @@ public:
    HelpAccelerationDialog *helpAccelerationDialog;
    HelpRoutingDialog *helpRoutingDialog;
    CreditsDialog *creditsDialog;
+   HelpSettingsDialog *helpSettingsDialog;
 
 protected:
     void changeEvent(QEvent *e);
@@ -30,6 +32,7 @@ private:
 
 
 private slots:
+    void on_pushButtonHelpSettings_clicked();
     void on_pushButtonCredits_clicked();
     void on_pushButtonHelpRoute_clicked();
     void on_pushButtonHelpAccelerate_clicked();
index 89c3412..5b21f08 100644 (file)
     </size>
    </property>
   </widget>
-  <widget class="QPushButton" name="pushButtonHelpWWW">
-   <property name="geometry">
-    <rect>
-     <x>140</x>
-     <y>300</y>
-     <width>61</width>
-     <height>61</height>
-    </rect>
-   </property>
-   <property name="autoFillBackground">
-    <bool>true</bool>
-   </property>
-   <property name="text">
-    <string/>
-   </property>
-   <property name="icon">
-    <iconset resource="graphics.qrc">
-     <normaloff>:/new/prefix1/Graphics/applications_internet.png</normaloff>:/new/prefix1/Graphics/applications_internet.png</iconset>
-   </property>
-   <property name="iconSize">
-    <size>
-     <width>55</width>
-     <height>55</height>
-    </size>
-   </property>
-  </widget>
   <widget class="QLabel" name="labelHelpRoute">
    <property name="geometry">
     <rect>
     <rect>
      <x>230</x>
      <y>310</y>
-     <width>171</width>
+     <width>261</width>
      <height>41</height>
     </rect>
    </property>
     </font>
    </property>
    <property name="text">
-    <string>WWW-page</string>
+    <string>Speed freak's home page</string>
    </property>
   </widget>
   <widget class="QPushButton" name="pushButtonCredits">
    <property name="geometry">
     <rect>
-     <x>432</x>
-     <y>306</y>
+     <x>620</x>
+     <y>290</y>
      <width>111</width>
      <height>51</height>
     </rect>
     <string>Credits</string>
    </property>
   </widget>
+  <widget class="QLabel" name="labelWwwPage">
+   <property name="geometry">
+    <rect>
+     <x>140</x>
+     <y>300</y>
+     <width>55</width>
+     <height>55</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="pixmap">
+    <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/applications_internet.png</pixmap>
+   </property>
+   <property name="scaledContents">
+    <bool>true</bool>
+   </property>
+  </widget>
  </widget>
  <resources>
   <include location="graphics.qrc"/>
diff --git a/Client/helpsettingsdialog.cpp b/Client/helpsettingsdialog.cpp
new file mode 100644 (file)
index 0000000..65b18f3
--- /dev/null
@@ -0,0 +1,63 @@
+#include "helpsettingsdialog.h"
+#include "ui_helpsettingsdialog.h"
+
+HelpSettingsDialog::HelpSettingsDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::HelpSettingsDialog)
+{
+    ui->setupUi(this);
+    pageCounter = 0;
+
+    ui->labelInfo2->hide();
+    ui->labelLast->hide();
+    ui->pushButtonLast->hide();
+}
+
+HelpSettingsDialog::~HelpSettingsDialog()
+{
+    delete ui;
+}
+
+void HelpSettingsDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
+
+void HelpSettingsDialog::on_pushButtonNext_clicked()
+{
+    pageCounter ++;
+
+    if(pageCounter == 1)
+    {
+        ui->labelNext->hide();
+        ui->pushButtonNext->hide();
+        ui->labelInfo1->hide();
+
+        ui->labelInfo2->show();
+        ui->labelLast->show();
+        ui->pushButtonLast->show();
+    }
+}
+
+void HelpSettingsDialog::on_pushButtonLast_clicked()
+{
+    pageCounter --;
+
+    if(pageCounter == 0)
+    {
+        ui->labelInfo2->hide();
+        ui->labelLast->hide();
+        ui->pushButtonLast->hide();
+
+        ui->labelNext->show();
+        ui->pushButtonNext->show();
+        ui->labelInfo1->show();
+    }
+}
diff --git a/Client/helpsettingsdialog.h b/Client/helpsettingsdialog.h
new file mode 100644 (file)
index 0000000..945adbd
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef HELPSETTINGSDIALOG_H
+#define HELPSETTINGSDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class HelpSettingsDialog;
+}
+
+class HelpSettingsDialog : public QDialog {
+    Q_OBJECT
+public:
+    HelpSettingsDialog(QWidget *parent = 0);
+    ~HelpSettingsDialog();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::HelpSettingsDialog *ui;
+    int pageCounter;
+
+private slots:
+    void on_pushButtonLast_clicked();
+    void on_pushButtonNext_clicked();
+};
+
+#endif // HELPSETTINGSDIALOG_H
diff --git a/Client/helpsettingsdialog.ui b/Client/helpsettingsdialog.ui
new file mode 100644 (file)
index 0000000..5eba07a
--- /dev/null
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>HelpSettingsDialog</class>
+ <widget class="QDialog" name="HelpSettingsDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>380</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Help for settings</string>
+  </property>
+  <widget class="QPushButton" name="pushButtonLast">
+   <property name="geometry">
+    <rect>
+     <x>540</x>
+     <y>320</y>
+     <width>81</width>
+     <height>61</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>&lt;</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="pushButtonNext">
+   <property name="geometry">
+    <rect>
+     <x>670</x>
+     <y>320</y>
+     <width>81</width>
+     <height>61</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>&gt;</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="labelNext">
+   <property name="geometry">
+    <rect>
+     <x>690</x>
+     <y>290</y>
+     <width>62</width>
+     <height>17</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Next</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="labelLast">
+   <property name="geometry">
+    <rect>
+     <x>560</x>
+     <y>290</y>
+     <width>62</width>
+     <height>17</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Last</string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="labelInfo1">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>10</y>
+     <width>431</width>
+     <height>321</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Speed freak communicates with server.
+If you want send your results to server
+or view other users results you need to
+register to server.
+
+1. For registering: Set user name,
+password and valid e-mail address to
+the fields. Press Register-button and
+your registering will be confirmed.   </string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="labelSettingsPic">
+   <property name="geometry">
+    <rect>
+     <x>500</x>
+     <y>50</y>
+     <width>291</width>
+     <height>211</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="pixmap">
+    <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/settingsDialog.png</pixmap>
+   </property>
+   <property name="scaledContents">
+    <bool>true</bool>
+   </property>
+   <property name="textInteractionFlags">
+    <set>Qt::LinksAccessibleByMouse</set>
+   </property>
+  </widget>
+  <widget class="QLabel" name="labelInfo2">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>10</y>
+     <width>421</width>
+     <height>351</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>2. After succesful registering you need
+to put username and password to the
+fields and press Set user button. After
+that you are logged in and can send
+own results to the server.
+
+NOTE: If you are registered your user-
+name before you just need to set your
+username and password in to the Set user
+fields and press Set user -button.</string>
+   </property>
+  </widget>
+ </widget>
+ <resources>
+  <include location="graphics.qrc"/>
+ </resources>
+ <connections/>
+</ui>
index ce4c5e7..22ebcb8 100644 (file)
@@ -36,7 +36,8 @@ SOURCES += main.cpp \
     helpdialog.cpp \
     helpresultsdialog.cpp \
     helpaccelerationdialog.cpp \
-    helproutingdialog.cpp
+    helproutingdialog.cpp \
+    helpsettingsdialog.cpp
 HEADERS += mainwindow.h \
     creditsdialog.h \
     routedialog.h \
@@ -63,7 +64,8 @@ HEADERS += mainwindow.h \
     helpdialog.h \
     helpresultsdialog.h \
     helpaccelerationdialog.h \
-    helproutingdialog.h
+    helproutingdialog.h \
+    helpsettingsdialog.h
 FORMS += mainwindow.ui \
     creditsdialog.ui \
     routedialog.ui \
@@ -79,7 +81,8 @@ FORMS += mainwindow.ui \
     helpdialog.ui \
     helpresultsdialog.ui \
     helpaccelerationdialog.ui \
-    helproutingdialog.ui
+    helproutingdialog.ui \
+    helpsettingsdialog.ui
 RESOURCES += graphics.qrc
 contains(QT_CONFIG, hildon):CONFIG += hildon
 CONFIG += link_pkgconfig