Merge branch 'package' master
authorToni Jussila <toni.jussila@gmail.com>
Mon, 31 May 2010 09:15:13 +0000 (12:15 +0300)
committerToni Jussila <toni.jussila@gmail.com>
Mon, 31 May 2010 09:15:13 +0000 (12:15 +0300)
Client/Graphics/userspic.png [new file with mode: 0644]
Client/graphics.qrc
Client/helpdialog.cpp
Client/helpdialog.h
Client/helpdialog.ui
Client/helpusersdialog.cpp [new file with mode: 0644]
Client/helpusersdialog.h [new file with mode: 0644]
Client/helpusersdialog.ui [new file with mode: 0644]
Client/speedfreak.pro

diff --git a/Client/Graphics/userspic.png b/Client/Graphics/userspic.png
new file mode 100644 (file)
index 0000000..97233ec
Binary files /dev/null and b/Client/Graphics/userspic.png differ
index 069f511..792be43 100644 (file)
@@ -30,5 +30,6 @@
         <file>Graphics/route_load.png</file>
         <file>Graphics/users.png</file>
         <file>Graphics/users_selected.png</file>
+        <file>Graphics/userspic.png</file>
     </qresource>
 </RCC>
index e5e3dea..016829e 100644 (file)
@@ -24,6 +24,7 @@ HelpDialog::HelpDialog(QWidget *parent) :
     helpRoutingDialog = NULL;
     creditsDialog = NULL;
     helpSettingsDialog = NULL;
+    helpUsersDialog = NULL;
 }
 
 /**
@@ -150,4 +151,24 @@ void HelpDialog::killHelpDialogs()
         delete helpSettingsDialog;
         helpSettingsDialog = NULL;
     }
+
+    if(helpUsersDialog)
+    {
+        qDebug() << "__Help kill: helpUsersDialog";
+        delete helpUsersDialog;
+        helpUsersDialog = NULL;
+    }
+}
+
+/**
+  * This slot function called when ever help users button clicked.
+  */
+void HelpDialog::on_pushButtonHelpUsers_clicked()
+{
+    if(!helpUsersDialog)
+    {
+        helpUsersDialog = new HelpUsersDialog;
+    }
+    connect(helpUsersDialog, SIGNAL(rejected()), this, SLOT(killHelpDialogs()));
+    helpUsersDialog->show();
 }
index de88a27..be23a1c 100644 (file)
@@ -16,6 +16,7 @@
 #include <helproutingdialog.h>
 #include <helpsettingsdialog.h>
 #include "creditsdialog.h"
+#include <helpusersdialog.h>
 
 namespace Ui {
     class HelpDialog;
@@ -32,6 +33,7 @@ public:
    HelpRoutingDialog *helpRoutingDialog;
    CreditsDialog *creditsDialog;
    HelpSettingsDialog *helpSettingsDialog;
+   HelpUsersDialog *helpUsersDialog;
 
 protected:
     void changeEvent(QEvent *e);
@@ -41,6 +43,7 @@ private:
 
 
 private slots:
+    void on_pushButtonHelpUsers_clicked();
     void on_pushButtonHelpSettings_clicked();
     void on_pushButtonCredits_clicked();
     void on_pushButtonHelpRoute_clicked();
index 5b21f08..9a2c0f4 100644 (file)
@@ -20,7 +20,7 @@
    <property name="geometry">
     <rect>
      <x>230</x>
-     <y>30</y>
+     <y>10</y>
      <width>231</width>
      <height>41</height>
     </rect>
@@ -38,9 +38,9 @@
    <property name="geometry">
     <rect>
      <x>140</x>
-     <y>20</y>
-     <width>61</width>
-     <height>61</height>
+     <y>10</y>
+     <width>50</width>
+     <height>50</height>
     </rect>
    </property>
    <property name="text">
@@ -56,8 +56,8 @@
    </property>
    <property name="iconSize">
     <size>
-     <width>60</width>
-     <height>60</height>
+     <width>50</width>
+     <height>50</height>
     </size>
    </property>
   </widget>
@@ -65,9 +65,9 @@
    <property name="geometry">
     <rect>
      <x>140</x>
-     <y>90</y>
-     <width>61</width>
-     <height>61</height>
+     <y>70</y>
+     <width>50</width>
+     <height>50</height>
     </rect>
    </property>
    <property name="text">
@@ -79,8 +79,8 @@
    </property>
    <property name="iconSize">
     <size>
-     <width>60</width>
-     <height>60</height>
+     <width>50</width>
+     <height>50</height>
     </size>
    </property>
   </widget>
@@ -88,9 +88,9 @@
    <property name="geometry">
     <rect>
      <x>140</x>
-     <y>160</y>
-     <width>61</width>
-     <height>61</height>
+     <y>130</y>
+     <width>50</width>
+     <height>50</height>
     </rect>
    </property>
    <property name="text">
    </property>
    <property name="iconSize">
     <size>
-     <width>60</width>
-     <height>60</height>
+     <width>50</width>
+     <height>50</height>
     </size>
    </property>
   </widget>
    <property name="geometry">
     <rect>
      <x>140</x>
-     <y>230</y>
-     <width>61</width>
-     <height>61</height>
+     <y>190</y>
+     <width>50</width>
+     <height>50</height>
     </rect>
    </property>
    <property name="text">
    </property>
    <property name="iconSize">
     <size>
-     <width>55</width>
-     <height>55</height>
+     <width>50</width>
+     <height>50</height>
     </size>
    </property>
   </widget>
    <property name="geometry">
     <rect>
      <x>230</x>
-     <y>100</y>
+     <y>80</y>
      <width>261</width>
      <height>41</height>
     </rect>
    <property name="geometry">
     <rect>
      <x>230</x>
-     <y>170</y>
+     <y>140</y>
      <width>171</width>
      <height>41</height>
     </rect>
    <property name="geometry">
     <rect>
      <x>230</x>
-     <y>240</y>
+     <y>190</y>
      <width>171</width>
      <height>41</height>
     </rect>
    <property name="geometry">
     <rect>
      <x>140</x>
-     <y>300</y>
-     <width>55</width>
-     <height>55</height>
+     <y>310</y>
+     <width>50</width>
+     <height>50</height>
     </rect>
    </property>
    <property name="text">
     <bool>true</bool>
    </property>
   </widget>
+  <widget class="QLabel" name="labelHelpUsers">
+   <property name="geometry">
+    <rect>
+     <x>230</x>
+     <y>250</y>
+     <width>171</width>
+     <height>41</height>
+    </rect>
+   </property>
+   <property name="font">
+    <font>
+     <family>Bitstream Charter</family>
+    </font>
+   </property>
+   <property name="text">
+    <string>Users view</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="pushButtonHelpUsers">
+   <property name="geometry">
+    <rect>
+     <x>140</x>
+     <y>250</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/users.png</normaloff>:/new/prefix1/Graphics/users.png</iconset>
+   </property>
+   <property name="iconSize">
+    <size>
+     <width>50</width>
+     <height>50</height>
+    </size>
+   </property>
+  </widget>
  </widget>
  <resources>
   <include location="graphics.qrc"/>
diff --git a/Client/helpusersdialog.cpp b/Client/helpusersdialog.cpp
new file mode 100644 (file)
index 0000000..1e6ade4
--- /dev/null
@@ -0,0 +1,26 @@
+#include "helpusersdialog.h"
+#include "ui_helpusersdialog.h"
+
+HelpUsersDialog::HelpUsersDialog(QWidget *parent) :
+    QDialog(parent),
+    ui(new Ui::HelpUsersDialog)
+{
+    ui->setupUi(this);
+}
+
+HelpUsersDialog::~HelpUsersDialog()
+{
+    delete ui;
+}
+
+void HelpUsersDialog::changeEvent(QEvent *e)
+{
+    QDialog::changeEvent(e);
+    switch (e->type()) {
+    case QEvent::LanguageChange:
+        ui->retranslateUi(this);
+        break;
+    default:
+        break;
+    }
+}
diff --git a/Client/helpusersdialog.h b/Client/helpusersdialog.h
new file mode 100644 (file)
index 0000000..f497b7a
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef HELPUSERSDIALOG_H
+#define HELPUSERSDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+    class HelpUsersDialog;
+}
+
+class HelpUsersDialog : public QDialog {
+    Q_OBJECT
+public:
+    HelpUsersDialog(QWidget *parent = 0);
+    ~HelpUsersDialog();
+
+protected:
+    void changeEvent(QEvent *e);
+
+private:
+    Ui::HelpUsersDialog *ui;
+};
+
+#endif // HELPUSERSDIALOG_H
diff --git a/Client/helpusersdialog.ui b/Client/helpusersdialog.ui
new file mode 100644 (file)
index 0000000..950f3b5
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>HelpUsersDialog</class>
+ <widget class="QDialog" name="HelpUsersDialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>800</width>
+    <height>380</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Help for users view </string>
+  </property>
+  <widget class="QLabel" name="labelInfo1">
+   <property name="geometry">
+    <rect>
+     <x>20</x>
+     <y>20</y>
+     <width>431</width>
+     <height>321</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string>Users view lists all registered users
+and by clicking the wanted username
+it gives information about user. </string>
+   </property>
+  </widget>
+  <widget class="QLabel" name="labelUsersPic">
+   <property name="geometry">
+    <rect>
+     <x>490</x>
+     <y>80</y>
+     <width>291</width>
+     <height>211</height>
+    </rect>
+   </property>
+   <property name="text">
+    <string/>
+   </property>
+   <property name="pixmap">
+    <pixmap resource="graphics.qrc">:/new/prefix1/Graphics/userspic.png</pixmap>
+   </property>
+   <property name="scaledContents">
+    <bool>true</bool>
+   </property>
+   <property name="textInteractionFlags">
+    <set>Qt::LinksAccessibleByMouse</set>
+   </property>
+  </widget>
+ </widget>
+ <resources>
+  <include location="graphics.qrc"/>
+ </resources>
+ <connections/>
+</ui>
index b5682e5..6b0ea01 100644 (file)
@@ -42,7 +42,8 @@ SOURCES += main.cpp \
     profiledialog.cpp \
        filereader.cpp \
     usersdialog.cpp \
-    registerdialog.cpp
+    registerdialog.cpp \
+    helpusersdialog.cpp
 HEADERS += mainwindow.h \
     creditsdialog.h \
     routedialog.h \
@@ -75,7 +76,8 @@ HEADERS += mainwindow.h \
     profiledialog.h \
        filereader.h \
     usersdialog.h \
-    registerdialog.h
+    registerdialog.h \
+    helpusersdialog.h
 FORMS += mainwindow.ui \
     creditsdialog.ui \
     routedialog.ui \
@@ -94,8 +96,9 @@ FORMS += mainwindow.ui \
     helproutingdialog.ui \
     helpsettingsdialog.ui \
     profiledialog.ui \
-       usersdialog.ui \
-    registerdialog.ui
+    usersdialog.ui \
+    registerdialog.ui \
+    helpusersdialog.ui
 RESOURCES += graphics.qrc
 contains(QT_CONFIG, hildon):CONFIG += hildon
 CONFIG += link_pkgconfig