Added Info button for all dialog.
authorToni Jussila <toni.jussila@fudeco.com>
Mon, 26 Apr 2010 12:09:10 +0000 (15:09 +0300)
committerToni Jussila <toni.jussila@fudeco.com>
Mon, 26 Apr 2010 12:09:10 +0000 (15:09 +0300)
18 files changed:
Client/accelerationstart.cpp
Client/accelerationstart.h
Client/accelerationstartdialog.ui
Client/resultdialog.cpp
Client/resultdialog.h
Client/resultdialog.ui
Client/routedialog.cpp
Client/routedialog.h
Client/routedialog.ui
Client/routesavedialog.cpp
Client/routesavedialog.h
Client/routesavedialog.ui
Client/settingsdialog.cpp
Client/settingsdialog.h
Client/settingsdialog.ui
Client/topresultdialog.cpp
Client/topresultdialog.h
Client/topresultdialog.ui

index 6214897..00c3160 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Acceleration start dialog
  *
 /*
  * Acceleration start dialog
  *
- * @author      Jukka Kurttila <jukka.kurttila@fudeco.com>
+ * @author      Jukka Kurttila  <jukka.kurttila@fudeco.com>
  * @author      Toni Jussila   <toni.jussila@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  * @author      Toni Jussila   <toni.jussila@fudeco.com>
  * @copyright   (c) 2010 Speed Freak team
  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
@@ -9,6 +9,7 @@
 #include "accelerationstart.h"
 #include "ui_accelerationstartdialog.h"
 #include <QMessageBox>
 #include "accelerationstart.h"
 #include "ui_accelerationstartdialog.h"
 #include <QMessageBox>
+#include <QDebug>
 
 accelerationstart::accelerationstart(QWidget *parent) :
     QDialog(parent),
 
 accelerationstart::accelerationstart(QWidget *parent) :
     QDialog(parent),
@@ -18,6 +19,7 @@ accelerationstart::accelerationstart(QWidget *parent) :
     ui->buttonStart->setDisabled(true);
 
     accRealTimeDialog = NULL;
     ui->buttonStart->setDisabled(true);
 
     accRealTimeDialog = NULL;
+    helpAccelerationDialog = NULL;
 
     stopMeasureSpeed = 0;
 
 
     stopMeasureSpeed = 0;
 
@@ -32,6 +34,8 @@ accelerationstart::accelerationstart(QWidget *parent) :
     ui->buttonCalib->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     ui->buttonStart->setAutoFillBackground(true);
     ui->buttonStart->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     ui->buttonCalib->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     ui->buttonStart->setAutoFillBackground(true);
     ui->buttonStart->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
+    ui->pushButtonInfo->setAutoFillBackground(true);
+    ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
 }
 
 accelerationstart::~accelerationstart()
 }
 
 accelerationstart::~accelerationstart()
@@ -112,3 +116,29 @@ void accelerationstart::sendResult(double result)
 {
     emit sendresult(measureCategory, result);
 }
 {
     emit sendresult(measureCategory, result);
 }
+
+/**
+  * This slot function called when ever info button clicked.
+  */
+void accelerationstart::on_pushButtonInfo_clicked()
+{
+    if(!helpAccelerationDialog)
+    {
+        helpAccelerationDialog = new HelpAccelerationDialog;
+    }
+    connect(helpAccelerationDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+    helpAccelerationDialog->show();
+}
+
+/**
+  * This slot function called when ever dialog rejected.
+  */
+void accelerationstart::killHelpDialog()
+{
+    if(helpAccelerationDialog)
+    {
+        qDebug() << "__Acc kill: helpAccelerationDialog";
+        delete helpAccelerationDialog;
+        helpAccelerationDialog = NULL;
+    }
+}
index 1a0aec6..1f0dd47 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <QDialog>
 #include "accrealtimedialog.h"
 
 #include <QDialog>
 #include "accrealtimedialog.h"
+#include <helpaccelerationdialog.h>
 
 namespace Ui {
     class accelerationstart;
 
 namespace Ui {
     class accelerationstart;
@@ -23,6 +24,7 @@ public:
     ~accelerationstart();
     AccRealTimeDialog* accRealTimeDialog;
     QString getMeasureCategory();
     ~accelerationstart();
     AccRealTimeDialog* accRealTimeDialog;
     QString getMeasureCategory();
+    HelpAccelerationDialog *helpAccelerationDialog;
 
 protected:
     void changeEvent(QEvent *e);
 
 protected:
     void changeEvent(QEvent *e);
@@ -34,10 +36,12 @@ private:
     QString measureCategory;
 
 private slots:
     QString measureCategory;
 
 private slots:
+    void on_pushButtonInfo_clicked();
     void on_categorComboBox_currentIndexChanged(int index);
     void on_buttonStart_clicked();
     void on_buttonCalib_clicked();
     void sendResult(double);
     void on_categorComboBox_currentIndexChanged(int index);
     void on_buttonStart_clicked();
     void on_buttonCalib_clicked();
     void sendResult(double);
+    void killHelpDialog();
 
 signals:
     void sendresult(QString, double);
 
 signals:
     void sendresult(QString, double);
index 80ea11a..4a47833 100644 (file)
     <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
    </property>
   </widget>
     <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
    </property>
   </widget>
-  <widget class="QWidget" name="layoutWidget">
+  <widget class="QPushButton" name="pushButtonInfo">
    <property name="geometry">
     <rect>
    <property name="geometry">
     <rect>
-     <x>590</x>
+     <x>750</x>
      <y>0</y>
      <y>0</y>
-     <width>201</width>
-     <height>381</height>
+     <width>50</width>
+     <height>50</height>
     </rect>
    </property>
     </rect>
    </property>
-   <layout class="QVBoxLayout" name="verticalLayout">
-    <item>
-     <widget class="QPushButton" name="buttonCalib">
-      <property name="text">
-       <string/>
-      </property>
-      <property name="icon">
-       <iconset resource="graphics.qrc">
-        <normaloff>:/new/prefix1/Graphics/Speedometer_calibrate.png</normaloff>:/new/prefix1/Graphics/Speedometer_calibrate.png</iconset>
-      </property>
-      <property name="iconSize">
-       <size>
-        <width>125</width>
-        <height>125</height>
-       </size>
-      </property>
-     </widget>
-    </item>
-    <item>
-     <widget class="QPushButton" name="buttonStart">
-      <property name="text">
-       <string/>
-      </property>
-      <property name="icon">
-       <iconset resource="graphics.qrc">
-        <normaloff>:/new/prefix1/Graphics/Speedometer_start.png</normaloff>:/new/prefix1/Graphics/Speedometer_start.png</iconset>
-      </property>
-      <property name="iconSize">
-       <size>
-        <width>125</width>
-        <height>125</height>
-       </size>
-      </property>
-     </widget>
-    </item>
-   </layout>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="icon">
+    <iconset resource="graphics.qrc">
+     <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>45</width>
+     <height>45</height>
+    </size>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="buttonStart">
+   <property name="geometry">
+    <rect>
+     <x>591</x>
+     <y>210</y>
+     <width>147</width>
+     <height>135</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="icon">
+    <iconset resource="graphics.qrc">
+     <normaloff>:/new/prefix1/Graphics/Speedometer_start.png</normaloff>:/new/prefix1/Graphics/Speedometer_start.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>125</width>
+     <height>125</height>
+    </size>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="buttonCalib">
+   <property name="geometry">
+    <rect>
+     <x>591</x>
+     <y>35</y>
+     <width>147</width>
+     <height>135</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="icon">
+    <iconset resource="graphics.qrc">
+     <normaloff>:/new/prefix1/Graphics/Speedometer_calibrate.png</normaloff>:/new/prefix1/Graphics/Speedometer_calibrate.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>125</width>
+     <height>125</height>
+    </size>
+   </property>
   </widget>
  </widget>
  <resources>
   </widget>
  </widget>
  <resources>
index 774390b..a5f5d32 100644 (file)
@@ -13,6 +13,7 @@
 #include "math.h"
 #include <QPainter>
 #include <QPicture>
 #include "math.h"
 #include <QPainter>
 #include <QPicture>
+#include <QDebug>
 
 const int DIAGRAM_WIDTH = 400;
 const int DIAGRAM_HEIGHT = 300;
 
 const int DIAGRAM_WIDTH = 400;
 const int DIAGRAM_HEIGHT = 300;
@@ -57,6 +58,9 @@ ResultDialog::ResultDialog(QWidget *parent) :
     ui(new Ui::ResultDialog)
 {
     ui->setupUi(this);
     ui(new Ui::ResultDialog)
 {
     ui->setupUi(this);
+
+    helpAccelerationDialog = NULL;
+
     timeAxelLength = 10;
     resultString = "";
     speedList << "0" << "10" << "20" << "30" << "40" << "50" << "60" << "70" << "80" << "90" << "100" ;
     timeAxelLength = 10;
     resultString = "";
     speedList << "0" << "10" << "20" << "30" << "40" << "50" << "60" << "70" << "80" << "90" << "100" ;
@@ -768,3 +772,30 @@ void ResultDialog::setSendServerButtonEnabled()
 {
     ui->pushButtonSend->setEnabled(true);
 }
 {
     ui->pushButtonSend->setEnabled(true);
 }
+
+/**
+  * This slot function called when ever info button clicked.
+  */
+void ResultDialog::on_pushButtonInfo_clicked()
+{
+    if(!helpAccelerationDialog)
+    {
+        helpAccelerationDialog = new HelpAccelerationDialog;
+    }
+    connect(helpAccelerationDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+    helpAccelerationDialog->show();
+}
+
+/**
+  * This slot function called when ever dialog rejected.
+  */
+void ResultDialog::killHelpDialog()
+{
+    if(helpAccelerationDialog)
+    {
+        qDebug() << "__Result kill: helpAccelerationDialog";
+        delete helpAccelerationDialog;
+        helpAccelerationDialog = NULL;
+    }
+}
+
index 2fac623..752b790 100644 (file)
@@ -11,6 +11,7 @@
 #define RESULTDIALOG_H
 
 #include <QDialog>
 #define RESULTDIALOG_H
 
 #include <QDialog>
+#include <helpaccelerationdialog.h>
 
 
 namespace Ui {
 
 
 namespace Ui {
@@ -22,6 +23,7 @@ class ResultDialog : public QDialog {
 public:
     ResultDialog(QWidget *parent = 0);
     ~ResultDialog();
 public:
     ResultDialog(QWidget *parent = 0);
     ~ResultDialog();
+    HelpAccelerationDialog *helpAccelerationDialog;
 
     void setEnd(int pValue);
     void setValue(int pSpeed, double pTime);
 
     void setEnd(int pValue);
     void setValue(int pSpeed, double pTime);
@@ -55,8 +57,10 @@ private:
     QString resultString;
 
 private slots:
     QString resultString;
 
 private slots:
+    void on_pushButtonInfo_clicked();
     void on_pushButtonNew_clicked();
     void on_pushButtonSend_clicked();
     void on_pushButtonNew_clicked();
     void on_pushButtonSend_clicked();
+    void killHelpDialog();
 };
 
 #endif // RESULTDIALOG_H
 };
 
 #endif // RESULTDIALOG_H
index 8846941..974628a 100644 (file)
     <string>User info label</string>
    </property>
   </widget>
     <string>User info label</string>
    </property>
   </widget>
+  <widget class="QPushButton" name="pushButtonInfo">
+   <property name="geometry">
+    <rect>
+     <x>750</x>
+     <y>0</y>
+     <width>50</width>
+     <height>50</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="icon">
+    <iconset resource="graphics.qrc">
+     <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>45</width>
+     <height>45</height>
+    </size>
+   </property>
+  </widget>
  </widget>
  </widget>
- <resources/>
+ <resources>
+  <include location="graphics.qrc"/>
+ </resources>
  <connections/>
 </ui>
  <connections/>
 </ui>
index e51d8d0..f0806c8 100644 (file)
@@ -174,6 +174,9 @@ RouteDialog::RouteDialog(QWidget *parent) :
 {
     qDebug() << "__RouteDialog";
     ui->setupUi(this);
 {
     qDebug() << "__RouteDialog";
     ui->setupUi(this);
+
+    helpRoutingDialog = NULL;
+
     this->setWindowTitle("Route");
     left = 5; top = 5; right = 495; bottom = 295; // Limits in screen coordinates
 
     this->setWindowTitle("Route");
     left = 5; top = 5; right = 495; bottom = 295; // Limits in screen coordinates
 
@@ -840,3 +843,29 @@ void RouteDialog::checkLogin()
         ui->labelInfoToUser->setText("You're not logged! Please register or log in.");
     }
 }
         ui->labelInfoToUser->setText("You're not logged! Please register or log in.");
     }
 }
+
+/**
+  * This slot function called when ever info button clicked.
+  */
+void RouteDialog::on_pushButtonInfo_clicked()
+{    
+    if(!helpRoutingDialog)
+    {
+        helpRoutingDialog = new HelpRoutingDialog;
+    }
+    connect(helpRoutingDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+    helpRoutingDialog->show();
+}
+
+/**
+  * This slot function called when ever dialog rejected.
+  */
+void RouteDialog::killHelpDialog()
+{
+    if(helpRoutingDialog)
+    {
+        qDebug() << "__Route kill: helpRoutingDialog";
+        delete helpRoutingDialog;
+        helpRoutingDialog = NULL;
+    }
+}
index 85d4aad..dd453dd 100644 (file)
@@ -11,6 +11,7 @@
 #define ROUTEDIALOG_H
 
 #include <QDialog>
 #define ROUTEDIALOG_H
 
 #include <QDialog>
+#include <helproutingdialog.h>
 
 namespace Ui {
     class RouteDialog;
 
 namespace Ui {
     class RouteDialog;
@@ -29,6 +30,7 @@ public:
     int getBottom();
     void setLabelInfoToUser(QString infoText);
     void setSendServerButtonEnabled();
     int getBottom();
     void setLabelInfoToUser(QString infoText);
     void setSendServerButtonEnabled();
+    HelpRoutingDialog *helpRoutingDialog;
 
 signals:
     void sendroute();
 
 signals:
     void sendroute();
@@ -43,8 +45,10 @@ private:
     void checkLogin();
 
 private slots:
     void checkLogin();
 
 private slots:
+    void on_pushButtonInfo_clicked();
     void on_sendPushButton_clicked();
     void on_newPushButton_clicked();
     void on_sendPushButton_clicked();
     void on_newPushButton_clicked();
+    void killHelpDialog();
 };
 
 #endif // ROUTEDIALOG_H
 };
 
 #endif // ROUTEDIALOG_H
index 8063b03..e0d9c77 100644 (file)
@@ -17,7 +17,7 @@
    <property name="geometry">
     <rect>
      <x>670</x>
    <property name="geometry">
     <rect>
      <x>670</x>
-     <y>110</y>
+     <y>150</y>
      <width>90</width>
      <height>90</height>
     </rect>
      <width>90</width>
      <height>90</height>
     </rect>
@@ -40,7 +40,7 @@
    <property name="geometry">
     <rect>
      <x>670</x>
    <property name="geometry">
     <rect>
      <x>670</x>
-     <y>10</y>
+     <y>50</y>
      <width>90</width>
      <height>90</height>
     </rect>
      <width>90</width>
      <height>90</height>
     </rect>
@@ -63,7 +63,7 @@
    <property name="geometry">
     <rect>
      <x>650</x>
    <property name="geometry">
     <rect>
      <x>650</x>
-     <y>210</y>
+     <y>250</y>
      <width>141</width>
      <height>81</height>
     </rect>
      <width>141</width>
      <height>81</height>
     </rect>
     <string>User info</string>
    </property>
   </widget>
     <string>User info</string>
    </property>
   </widget>
+  <widget class="QPushButton" name="pushButtonInfo">
+   <property name="geometry">
+    <rect>
+     <x>750</x>
+     <y>0</y>
+     <width>50</width>
+     <height>50</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="icon">
+    <iconset resource="graphics.qrc">
+     <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>45</width>
+     <height>45</height>
+    </size>
+   </property>
+  </widget>
  </widget>
  <resources>
   <include location="graphics.qrc"/>
  </widget>
  <resources>
   <include location="graphics.qrc"/>
index c67c99c..ba7100a 100644 (file)
@@ -24,6 +24,7 @@ RouteSaveDialog::RouteSaveDialog(QWidget *parent) :
     routeDialog = NULL;
     location = NULL;
     gpsData = NULL;
     routeDialog = NULL;
     location = NULL;
     gpsData = NULL;
+    helpRoutingDialog = NULL;
 
     //Button settings
     buttonStatus = true;
 
     //Button settings
     buttonStatus = true;
@@ -36,6 +37,8 @@ RouteSaveDialog::RouteSaveDialog(QWidget *parent) :
     ui->buttonRouteStartStop->setIcon(*iconRouteStart);
     ui->buttonRouteStartStop->setAutoFillBackground(true);
     ui->buttonRouteStartStop->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     ui->buttonRouteStartStop->setIcon(*iconRouteStart);
     ui->buttonRouteStartStop->setAutoFillBackground(true);
     ui->buttonRouteStartStop->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
+    ui->pushButtonInfo->setAutoFillBackground(true);
+    ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
 
     //Satellite picture and label
     ui->labelRouteSatelliteStatus->setVisible(0);
 
     //Satellite picture and label
     ui->labelRouteSatelliteStatus->setVisible(0);
@@ -266,3 +269,29 @@ void RouteSaveDialog::sendRoute()
 {
     emit sendroute(); //Emit mainwindow clientSendRoute
 }
 {
     emit sendroute(); //Emit mainwindow clientSendRoute
 }
+
+/**
+  * This slot function called when ever info button clicked.
+  */
+void RouteSaveDialog::on_pushButtonInfo_clicked()
+{
+    if(!helpRoutingDialog)
+    {
+        helpRoutingDialog = new HelpRoutingDialog;
+    }
+    connect(helpRoutingDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+    helpRoutingDialog->show();
+}
+
+/**
+  * This slot function called when ever dialog rejected.
+  */
+void RouteSaveDialog::killHelpDialog()
+{
+    if(helpRoutingDialog)
+    {
+        qDebug() << "__Route save kill: helpRoutingDialog";
+        delete helpRoutingDialog;
+        helpRoutingDialog = NULL;
+    }
+}
index 64d1da5..186cbf8 100644 (file)
@@ -17,6 +17,7 @@
 #include <maemo5location.h>
 #include "gpsdata.h"
 #include "routedialog.h"
 #include <maemo5location.h>
 #include "gpsdata.h"
 #include "routedialog.h"
+#include <helproutingdialog.h>
 
 namespace Ui {
     class RouteSaveDialog;
 
 namespace Ui {
     class RouteSaveDialog;
@@ -28,6 +29,7 @@ public:
     RouteSaveDialog(QWidget *parent = 0);
     ~RouteSaveDialog();
     RouteDialog *routeDialog;
     RouteSaveDialog(QWidget *parent = 0);
     ~RouteSaveDialog();
     RouteDialog *routeDialog;
+    HelpRoutingDialog *helpRoutingDialog;
 
 protected:
     void changeEvent(QEvent *e);
 
 protected:
     void changeEvent(QEvent *e);
@@ -46,11 +48,13 @@ private:
     bool buttonStatus;
 
 private slots:
     bool buttonStatus;
 
 private slots:
+    void on_pushButtonInfo_clicked();
     void on_buttonRouteStartStop_clicked();
     void timerSatellitePictureTimeout();
     void timerRoutePictureTimeout();
     void gpsStatus();
     void sendRoute();
     void on_buttonRouteStartStop_clicked();
     void timerSatellitePictureTimeout();
     void timerRoutePictureTimeout();
     void gpsStatus();
     void sendRoute();
+    void killHelpDialog();
 
 signals:
     void sendroute();
 
 signals:
     void sendroute();
index b78556d..4638a5f 100644 (file)
     <string>labelSignalStrength</string>
    </property>
   </widget>
     <string>labelSignalStrength</string>
    </property>
   </widget>
+  <widget class="QPushButton" name="pushButtonInfo">
+   <property name="geometry">
+    <rect>
+     <x>750</x>
+     <y>0</y>
+     <width>50</width>
+     <height>50</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="icon">
+    <iconset resource="graphics.qrc">
+     <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>45</width>
+     <height>45</height>
+    </size>
+   </property>
+  </widget>
  </widget>
  <resources>
   <include location="graphics.qrc"/>
  </widget>
  <resources>
   <include location="graphics.qrc"/>
index 684ccf5..a50a681 100644 (file)
@@ -1,21 +1,25 @@
 /*
  * SettingsDialog class
  *
 /*
  * SettingsDialog class
  *
- * @author     Olavi Pulkkinen <olavi.pulkkinen@fudeco.com>
- * @copyright  (c) 2010 Speed Freak team
- * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ * @author      Olavi Pulkkinen <olavi.pulkkinen@fudeco.com>
+ * @author      Toni Jussila    <toni.jussila@fudeco.com>
+ * @copyright   (c) 2010 Speed Freak team
+ * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
  */
 
 #include "settingsdialog.h"
 #include "ui_settingsdialog.h"
 #include "usersettings.h"
 #include <QMessageBox>
  */
 
 #include "settingsdialog.h"
 #include "ui_settingsdialog.h"
 #include "usersettings.h"
 #include <QMessageBox>
+#include <QDebug>
 
 SettingsDialog::SettingsDialog(QWidget *parent) :
 
 SettingsDialog::SettingsDialog(QWidget *parent) :
-    QDialog(parent),
-    ui(new Ui::SettingsDialog)
+    QDialog(parent), ui(new Ui::SettingsDialog)
 {
     ui->setupUi(this);
 {
     ui->setupUi(this);
+
+    helpSettingsDialog = NULL;
+
     this->setWindowTitle("Settings");
     this->ui->regEMailLineEdit->setText("@");
 
     this->setWindowTitle("Settings");
     this->ui->regEMailLineEdit->setText("@");
 
@@ -35,6 +39,10 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
 
         // Already someone as user - change button text to "Change"
         ui->setUserPushButton->setText("Log out");
 
         // Already someone as user - change button text to "Change"
         ui->setUserPushButton->setText("Log out");
+
+        // Button settings
+        ui->pushButtonInfo->setAutoFillBackground(true);
+        ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     }
 }
 
     }
 }
 
@@ -222,3 +230,29 @@ void SettingsDialog::clearRegisterLineEdits()
     ui->regPasswordLineEdit->setText("");
     ui->regUserNameLineEdit->setText("");
 }
     ui->regPasswordLineEdit->setText("");
     ui->regUserNameLineEdit->setText("");
 }
+
+/**
+  * This slot function called when ever info button clicked.
+  */
+void SettingsDialog::on_pushButtonInfo_clicked()
+{
+    if(!helpSettingsDialog)
+    {
+        helpSettingsDialog = new HelpSettingsDialog;
+    }
+    connect(helpSettingsDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+    helpSettingsDialog->show();
+}
+
+/**
+  * This slot function called when ever dialog rejected.
+  */
+void SettingsDialog::killHelpDialog()
+{
+    if(helpSettingsDialog)
+    {
+        qDebug() << "__Settings kill: helpSettingsDialog";
+        delete helpSettingsDialog;
+        helpSettingsDialog = NULL;
+    }
+}
index 1f7a9fe..4f5858b 100644 (file)
@@ -10,8 +10,8 @@
 #define SETTINGSDIALOG_H
 
 #include <QDialog>
 #define SETTINGSDIALOG_H
 
 #include <QDialog>
-
 #include "instructionsdialog.h"
 #include "instructionsdialog.h"
+#include <helpsettingsdialog.h>
 
 namespace Ui {
     class SettingsDialog;
 
 namespace Ui {
     class SettingsDialog;
@@ -22,6 +22,7 @@ class SettingsDialog : public QDialog {
 public:
     SettingsDialog(QWidget *parent = 0);
     ~SettingsDialog();
 public:
     SettingsDialog(QWidget *parent = 0);
     ~SettingsDialog();
+    HelpSettingsDialog *helpSettingsDialog;
     void setRegUserName(QString username);
     void setRegPassword(QString password);
     void setRegEmail(QString email);
     void setRegUserName(QString username);
     void setRegPassword(QString password);
     void setRegEmail(QString email);
@@ -53,8 +54,10 @@ private:
     QString password;
 
 private slots:
     QString password;
 
 private slots:
+    void on_pushButtonInfo_clicked();
     void on_setUserPushButton_clicked();
     void on_registratePushButton_clicked();
     void on_setUserPushButton_clicked();
     void on_registratePushButton_clicked();
+    void killHelpDialog();
 };
 
 #endif // SETTINGSDIALOG_H
 };
 
 #endif // SETTINGSDIALOG_H
index 255eea9..bf6e945 100644 (file)
     <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
    </property>
   </widget>
     <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
    </property>
   </widget>
-  <zorder>label</zorder>
-  <zorder>setUserLabel</zorder>
-  <zorder>setUserPushButton</zorder>
-  <zorder>registrateLabel</zorder>
-  <zorder>registratePushButton</zorder>
-  <zorder>layoutWidget</zorder>
-  <zorder>labelInfoToUser</zorder>
-  <zorder>layoutWidget</zorder>
+  <widget class="QPushButton" name="pushButtonInfo">
+   <property name="geometry">
+    <rect>
+     <x>750</x>
+     <y>0</y>
+     <width>50</width>
+     <height>50</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="icon">
+    <iconset resource="graphics.qrc">
+     <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>45</width>
+     <height>45</height>
+    </size>
+   </property>
+  </widget>
  </widget>
  <tabstops>
   <tabstop>regUserNameLineEdit</tabstop>
  </widget>
  <tabstops>
   <tabstop>regUserNameLineEdit</tabstop>
index fafff58..3eeb3b4 100644 (file)
 #include "ui_topresultdialog.h"
 
 TopResultDialog::TopResultDialog(QWidget *parent) :
 #include "ui_topresultdialog.h"
 
 TopResultDialog::TopResultDialog(QWidget *parent) :
-    QDialog(parent),
-    ui(new Ui::TopResultDialog)
+    QDialog(parent), ui(new Ui::TopResultDialog)
 {
     ui->setupUi(this);
 {
     ui->setupUi(this);
+
+    helpResultsDialog = NULL;
+
     this->setWindowTitle("Top Results");
 
     //Set the amount of requested top results here, untill there is user input
     this->setWindowTitle("Top Results");
 
     //Set the amount of requested top results here, untill there is user input
@@ -24,6 +26,8 @@ TopResultDialog::TopResultDialog(QWidget *parent) :
     //Button settings
     ui->buttonTopRefresh->setAutoFillBackground(true);
     ui->buttonTopRefresh->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     //Button settings
     ui->buttonTopRefresh->setAutoFillBackground(true);
     ui->buttonTopRefresh->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
+    ui->pushButtonInfo->setAutoFillBackground(true);
+    ui->pushButtonInfo->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
 
     //Clear labels
     ui->labelInfoToUser->setText("");
 
     //Clear labels
     ui->labelInfoToUser->setText("");
@@ -91,3 +95,29 @@ void TopResultDialog::setLabelInfoToUser(QString infoText)
 {
     this->ui->labelInfoToUser->setText(infoText);
 }
 {
     this->ui->labelInfoToUser->setText(infoText);
 }
+
+/**
+  * This slot function called when ever info button clicked.
+  */
+void TopResultDialog::on_pushButtonInfo_clicked()
+{
+    if(!helpResultsDialog)
+    {
+        helpResultsDialog = new HelpResultsDialog;
+    }
+    connect(helpResultsDialog, SIGNAL(rejected()), this, SLOT(killHelpDialog()));
+    helpResultsDialog->show();
+}
+
+/**
+  * This slot function called when ever dialog rejected.
+  */
+void TopResultDialog::killHelpDialog()
+{
+    if(helpResultsDialog)
+    {
+        qDebug() << "__Top result kill: helpResultsDialog";
+        delete helpResultsDialog;
+        helpResultsDialog = NULL;
+    }
+}
index dc49076..3059094 100644 (file)
@@ -11,6 +11,7 @@
 #define TOPRESULTDIALOG_H
 
 #include <QDialog>
 #define TOPRESULTDIALOG_H
 
 #include <QDialog>
+#include <helpresultsdialog.h>
 
 namespace Ui {
     class TopResultDialog;
 
 namespace Ui {
     class TopResultDialog;
@@ -21,6 +22,7 @@ class TopResultDialog : public QDialog {
 public:
     TopResultDialog(QWidget *parent = 0);
     ~TopResultDialog();
 public:
     TopResultDialog(QWidget *parent = 0);
     ~TopResultDialog();
+    HelpResultsDialog *helpResultsDialog;
     void setCompoBoxCategories(QStringList list);
     void showTopList(QString str);
     int getRecentCategoryIndex();
     void setCompoBoxCategories(QStringList list);
     void showTopList(QString str);
     int getRecentCategoryIndex();
@@ -41,9 +43,10 @@ private:
     int limitNr;
 
 private slots:
     int limitNr;
 
 private slots:
+    void on_pushButtonInfo_clicked();
     void on_comboBoxTopCategory_currentIndexChanged(int index);
     void on_buttonTopRefresh_clicked();
     void on_comboBoxTopCategory_currentIndexChanged(int index);
     void on_buttonTopRefresh_clicked();
-
+    void killHelpDialog();
 };
 
 #endif // TOPRESULTDIALOG_H
 };
 
 #endif // TOPRESULTDIALOG_H
index 9089f32..b79ce0d 100644 (file)
@@ -17,7 +17,7 @@
    <property name="geometry">
     <rect>
      <x>650</x>
    <property name="geometry">
     <rect>
      <x>650</x>
-     <y>20</y>
+     <y>70</y>
      <width>130</width>
      <height>130</height>
     </rect>
      <width>130</width>
      <height>130</height>
     </rect>
     <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
    </property>
   </widget>
     <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/sf_2.png</pixmap>
    </property>
   </widget>
+  <widget class="QPushButton" name="pushButtonInfo">
+   <property name="geometry">
+    <rect>
+     <x>750</x>
+     <y>0</y>
+     <width>50</width>
+     <height>50</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="icon">
+    <iconset resource="graphics.qrc">
+     <normaloff>:/new/prefix1/Graphics/info.png</normaloff>:/new/prefix1/Graphics/info.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>45</width>
+     <height>45</height>
+    </size>
+   </property>
+  </widget>
   <zorder>label</zorder>
   <zorder>buttonTopRefresh</zorder>
   <zorder>labelTopList</zorder>
   <zorder>labelCategory</zorder>
   <zorder>comboBoxTopCategory</zorder>
   <zorder>label</zorder>
   <zorder>buttonTopRefresh</zorder>
   <zorder>labelTopList</zorder>
   <zorder>labelCategory</zorder>
   <zorder>comboBoxTopCategory</zorder>
+  <zorder>pushButtonInfo</zorder>
   <zorder>labelInfoToUser</zorder>
  </widget>
  <resources>
   <zorder>labelInfoToUser</zorder>
  </widget>
  <resources>