Welcome dialog added.
authorToni Jussila <toni.jussila@fudeco.com>
Thu, 11 Mar 2010 11:58:40 +0000 (13:58 +0200)
committerToni Jussila <toni.jussila@fudeco.com>
Thu, 11 Mar 2010 11:58:40 +0000 (13:58 +0200)
Merge branch 'feature/welcome'

Conflicts:
Client/UI.pro
Client/carmainwindow.cpp

Client/UI.pro
Client/carmainwindow.cpp
Client/carmainwindow.h
Client/carmainwindow.ui
Client/categorylist.cpp [new file with mode: 0644]
Client/categorylist.h [new file with mode: 0644]
Client/ui_carmainwindow.h
Client/xmlreader.cpp
Client/xmlreader.h
documents/UI_Design.odt

index 44825ab..88304df 100644 (file)
@@ -22,7 +22,9 @@ SOURCES += main.cpp \
     xmlwriter.cpp \
     xmlreader.cpp \
     httpclient.cpp \
+    categorylist.cpp \
     welcomedialog.cpp
+
 HEADERS += carmainwindow.h \
     resultdialog.h \
     stringlistmodel.h \
@@ -35,7 +37,9 @@ HEADERS += carmainwindow.h \
     xmlwriter.h \
     xmlreader.h \
     httpclient.h \
+    categorylist.h \
     welcomedialog.h
+
 FORMS += carmainwindow.ui \
     resultdialog.ui \
     measuredialog.ui \
index ac5f953..0a8c350 100644 (file)
@@ -36,6 +36,8 @@ CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::Ca
     manager = new QNetworkAccessManager(this);
     connect(myRegistration,SIGNAL(sendregistration()),this,SLOT(registrate()));
 
+    categorylist = new CategoryList();
+
     time = 0;
     speed = 0;
     timer = new QTimer();
@@ -53,7 +55,7 @@ CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::Ca
 
     ui->labelMeasureTabResult->hide();
 
-    this->setWindowTitle("Speed freak");
+    this->setWindowTitle("Speed Freak");
 
 }
 
@@ -68,6 +70,7 @@ CarMainWindow::~CarMainWindow()
     delete xmlreader;
     delete xmlwriter;
     delete manager;
+    delete categorylist;
     delete welcomeDialog;
 }
 
@@ -171,31 +174,17 @@ void CarMainWindow::setListViewStartTabAccelerationCategories(QStringList accele
   */
 void CarMainWindow::setCategoryCompoBox()
 {
-    ui->comboBoxTopCategory->addItems(xmlreader->getTop10List());
+    ui->comboBoxTopCategory->addItems(categorylist->getCategoryList());
 }
 
 /**
   *This function is used to set items to labelTopList. Top-tab view.
   *@param QString category
   */
-void CarMainWindow::setListViewTopList(QString category)
+void CarMainWindow::setListViewTopList(QString category, int size)
 {
     QString topList;
-
-    if (category == "acceleration-0-100")
-    {
-        topList.append(xmlreader->getTop10AccelerationList());
-    }
-
-    else if (category == "Speed")
-    {
-        topList.append(xmlreader->getTop10SpeedList());
-    }
-
-    else if (category == "G-force")
-    {
-        topList.append(xmlreader->getTop10GforceList());
-    }
+    topList.append( categorylist->getTopList(category, size));
     ui->labelTopList->setText(topList);
 }
 
@@ -231,17 +220,22 @@ void CarMainWindow::on_registratePushButton_clicked()
   */
 void CarMainWindow::on_buttonTopRefresh_clicked()
 {
-    //setCategoryCompoBox();
-    requestTopList();
+    requestCategories();
+    setCategoryCompoBox();
 }
 
 /**
   *This slot function is called when ever category combobox current index changed. Top-tab view.
   *@param QString category
+  *@todo Check where limitNr is taken.
   */
 void CarMainWindow::on_comboBoxTopCategory_currentIndexChanged(QString category)
 {
-    setListViewTopList(category);
+    int limitNr = 5;                    //replace with real value?
+    QString limit = QString::number(limitNr);
+    category = "acceleration-0-100";    //replace with real value from category list/top window
+    requestTopList(category, limit);
+    setListViewTopList(category,10);
 }
 
 /**
@@ -250,7 +244,7 @@ void CarMainWindow::on_comboBoxTopCategory_currentIndexChanged(QString category)
   */
 void CarMainWindow::on_comboBoxTopCategory_activated(QString category)
 {
-    setListViewTopList(category);
+    setListViewTopList(category,10);
 }
 
 /**
@@ -265,7 +259,6 @@ void CarMainWindow::on_setUserPushButton_clicked()
   *@brief Sends registration information to the server in xml format.
   *Reads user name, password and emaol address from resuldialogs internal variables.
   *@todo Replace msg box with better reaction to server`s responce.
-  *@todo Write error handling.
   */
 void CarMainWindow::registrate()
 {
@@ -276,6 +269,7 @@ void CarMainWindow::registrate()
     QUrl qurl("http://api.speedfreak-app.com/api/register");
     QNetworkRequest request(qurl);
     qDebug() << qurl.toString();
+    QNetworkReply *currentDownload;
 
     regbuffer->open(QBuffer::ReadWrite);
     xmlwriter->writeRegistering(regbuffer,
@@ -285,91 +279,106 @@ void CarMainWindow::registrate()
     //Tmp msgbox - later server responce
     QMessageBox::about(this,"Registrate",this->myRegistration->getUserName() + this->myRegistration->getPassword() + this->myRegistration->getEmail());
 
-    manager->post(request, ("data=" + regbuffer->data()));
+    currentDownload = manager->post(request, ("xml=" + regbuffer->data()));
     qDebug() << "carmainwindow: regbuffer->data(): " << regbuffer->data();
 
-    //ackOfRegistration function gets called when HTTP request is completed
-    connect(manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(ackOfRegistration(QNetworkReply*)));
-    //connect(manager,SIGNAL(sslErrors(QNetworkReply*)),this,SLOT(errorFromServer(QNetworkReply*)));
+    connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfRegistration()));
+    connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(errorFromServer(QNetworkReply::NetworkError)));
+
     regbuffer->close();
 }
 
+
 /**
-  *@brief Sends result(s) to the server in xml format with authentication information in the header.
-  *@todo Write error handling.
+  *@brief Sends result(s) to the server in xml format.
+  *Send authentication information in the header.
+  *@todo Read category elsewhere.
   */
-void CarMainWindow::sendXml()
+void CarMainWindow::sendResultXml()
 {
-    qDebug() << "_sendXml";
+    qDebug() << "_sendResultXml";
 
     QBuffer *xmlbuffer = new QBuffer();
     QString category_name = "acceleration-0-100";    //replace with real value from category list
 
-    QString credentials = this->myRegistration->getUserName() + ":" + this->myRegistration->getPassword();
-    credentials = "Basic " + credentials.toAscii().toBase64();
-
     QUrl qurl("http://api.speedfreak-app.com/api/update/" + category_name);
     qDebug() << qurl.toString();
     QNetworkRequest request(qurl);
-    request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
+    QNetworkReply *currentDownload;
 
     xmlbuffer->open(QBuffer::ReadWrite);
     xmlwriter->writeResult(xmlbuffer);
     qDebug() << "carmainwindow: xmlbuffer->data(): " << xmlbuffer->data();
 
-    manager->post(request, ("data=" + xmlbuffer->data()));
-    //connect(manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(ackOfResult(QNetworkReply*)));
-    //connect(manager,SIGNAL(sslErrors(QNetworkReply*)),this,SLOT(errorFromServer(QNetworkReply*)));
+    QString credentials = this->myRegistration->getUserName() + ":" + this->myRegistration->getPassword();
+    credentials = "Basic " + credentials.toAscii().toBase64();
+    request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
 
-    //QNetworkReply *currentDownload;
-    //QString data("abcdefg");
-    //currentDownload = manager->post(request,"data=" + QUrl::toPercentEncoding(data));   //testing
-    //currentDownload = manager->post(request, ("data=" + xmlbuffer->data()));
-    //ackOfResult function gets called when HTTP request is completed
-    //connect(currentDownload, SIGNAL(finished()), SLOT(ackOfResult()));
+    currentDownload = manager->post(request, ("xml=" + xmlbuffer->data()));
+    connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfResult()));
+    connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(errorFromServer(QNetworkReply::NetworkError)));
 
     xmlbuffer->close();
 }
 
 /**
-  *@brief Sends request to the server for a top list with authentication information in the header.
-  *@todo Write error handling.
-  *@todo Replace with real value from category list and limitNr
+  *@brief Request the Top10List of certain category from the server.
+  *Send authentication information in the header.
+  *@param Category of results.
+  *@param Limit, the number of results.
   */
-void CarMainWindow::requestTopList()
+void CarMainWindow::requestTopList(QString category, QString limit)
 {
     qDebug() << "_requestTopList" ;
 
     QString urlBase = "http://api.speedfreak-app.com/api/results/";
-    QString category_name = "acceleration-0-100";    //replace with real value from category list/top window
-    int limitNr = 5;
-    QString limit = QString::number(limitNr);
+    QUrl qurl(urlBase + category + "/" + limit);
+    qDebug() << qurl.toString();
+    QNetworkRequest request(qurl);
+    QNetworkReply *currentDownload;
 
     QString credentials = this->myRegistration->getUserName() + ":" + this->myRegistration->getPassword();
     credentials = "Basic " + credentials.toAscii().toBase64();
+    request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
+
+    currentDownload = manager->post(request, ("data=" ));
+    connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfToplist()));
+    connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(errorFromServer(QNetworkReply::NetworkError)));
+}
+
+
+/**
+  *@brief Request categories list from the server.
+  *Send authentication information in the header.
+  */
+void CarMainWindow::requestCategories()
+{
+    qDebug() << "_requestCategories" ;
 
-    QUrl qurl(urlBase + category_name + "/" + limit);
+    QUrl qurl("http://api.speedfreak-app.com/api/categories/");
     qDebug() << qurl.toString();
     QNetworkRequest request(qurl);
+    QNetworkReply *currentDownload;
 
+    QString credentials = this->myRegistration->getUserName() + ":" + this->myRegistration->getPassword();
+    credentials = "Basic " + credentials.toAscii().toBase64();
     request.setRawHeader(QByteArray("Authorization"),credentials.toAscii());
-    manager->post(request, ("data=" ));
-    //connect(manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(networkResponse(QNetworkReply*)));
-    //connect(manager,SIGNAL(sslErrors(QNetworkReply*)),this,SLOT(errorFromServer(QNetworkReply*)));
 
-    //QNetworkReply *currentDownload;
-    //currentDownload = manager->post(request, ("data=" ));
-    //ackOfResult function gets called when HTTP request is completed
-    //connect(currentDownload, SIGNAL(error()),SLOT(errorFromServer()));
+    currentDownload = manager->post(request, ("data=" ));
+    connect(currentDownload,SIGNAL(finished()),this,SLOT(ackOfCategories()));
+    connect(currentDownload,SIGNAL(error(QNetworkReply::NetworkError)),this,SLOT(errorFromServer(QNetworkReply::NetworkError)));
 }
 
+
 /**
   *@brief React to servers responce after result has been sent.
-  *@todo Implement function and write error handling.
+  *@todo Implement consequencies of reply.
   */
-void CarMainWindow::ackOfResult(QNetworkReply* reply)
+void CarMainWindow::ackOfResult()
 {
     qDebug() << "_ackOfResult";
+
+    QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
     qDebug() << reply->readAll();
     QNetworkReply::NetworkError errorcode;
     errorcode = reply->error();
@@ -381,13 +390,16 @@ void CarMainWindow::ackOfResult(QNetworkReply* reply)
     }
 }
 
+
 /**
   *@brief React to servers responce after registration has been sent.
-  *@todo Implement function and write error handling.
+  *@todo Implement consequencies of reply.
   */
-void CarMainWindow::ackOfRegistration(QNetworkReply* reply)
+void CarMainWindow::ackOfRegistration()
 {
     qDebug() << "_ackOfRegistration";
+
+    QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
     qDebug() << reply->readAll();
     QNetworkReply::NetworkError errorcode;
     errorcode = reply->error();
@@ -399,13 +411,35 @@ void CarMainWindow::ackOfRegistration(QNetworkReply* reply)
     }
 }
 
-void CarMainWindow::errorFromServer(QNetworkReply* reply)
+
+/**
+  *@brief React to servers responce after request for categories has been sent.
+  *@todo Implement reply`s feeding to categories list.
+  */
+void CarMainWindow::ackOfCategories()
 {
-    qDebug() << "_errorFromServer";
-    QNetworkReply::NetworkError errorcode;
+    qDebug() << "_ackOfCategories";
 
+    QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
+    qDebug() << reply->readAll();
+    QNetworkReply::NetworkError errorcode;
     errorcode = reply->error();
     if(errorcode != 0) {
+        qDebug() <<  "errorcode:" << errorcode << reply->errorString();
+    }
+    else {
+        qDebug() << "errorcode=0";
+    }
+}
+
+/**
+  *@brief Reports errors, when server has sent error signal.
+  */
+void CarMainWindow::errorFromServer(QNetworkReply::NetworkError errorcode)
+{
+    qDebug() << "_errorFromServer";
+
+    if(errorcode != 0) {
         qDebug() << errorcode;
     }
     else {
@@ -413,12 +447,16 @@ void CarMainWindow::errorFromServer(QNetworkReply* reply)
     }
 }
 
+
 /**
-  *This slot function is called when the server has finished guery.
+  *@brief React to servers responce after request of TopList in certain category has been sent.
+  *@todo Implement routing reply`s contents to UI.
   */
-void CarMainWindow::networkResponse(QNetworkReply *reply)
+void CarMainWindow::ackOfToplist()
 {
-    qDebug() << "_networkResponse";
+    qDebug() << "_ackOfToplist";
+
+    QNetworkReply* reply = qobject_cast<QNetworkReply*>(sender());
     xmlreader->xmlRead(reply);
     qDebug() << reply->readAll();
     QNetworkReply::NetworkError errorcode;
@@ -431,6 +469,7 @@ void CarMainWindow::networkResponse(QNetworkReply *reply)
     }
 }
 
+
 /**
   *@brief Just for development, for the real button is not shown until
   *measurin started and there are results.
@@ -438,7 +477,7 @@ void CarMainWindow::networkResponse(QNetworkReply *reply)
   */
 void CarMainWindow::on_manualStartButton_clicked()
 {
-    sendXml();
+
 }
 
 /**
@@ -576,7 +615,7 @@ void CarMainWindow::on_pushButtonMeasureTabAbort_clicked()
 
 void CarMainWindow::on_pushButtonSendResult_clicked()
 {
-    sendXml();
+    sendResultXml();
     ui->pushButtonSendResult->setEnabled(false);
 }
 
index 5c389fd..8c7afa8 100644 (file)
@@ -36,6 +36,7 @@
 #include "stringlistmodel.h"
 #include "measures.h"
 #include "accelerometer.h"
+#include "categorylist.h"
 
 namespace Ui {
     class CarMainWindow;
@@ -49,7 +50,7 @@ public:
 
     void setComboBoxStartTabUnits(QStringList units);    //Start-tab view
     void setListViewStartTabAccelerationCategories(QStringList numbers); //Start-tab view
-    void setListViewTopList(QString category);  //Top-tab view
+    void setListViewTopList(QString category, int size);  //Top-tab view
     void setCategoryCompoBox(); //Top-tab
 
 protected:
@@ -75,6 +76,7 @@ private:
     QStringList accelerationCategoriesStartTab; //Start-tab view
     QStringList units;  //Start-tab view
     QStringList categories; //Top-tab view
+    CategoryList *categorylist;
 
     QTimer *timer;
     Accelerometer *accelerometer;
@@ -83,8 +85,8 @@ private:
     Measures *measures;
 
 signals:
-void speedAchieved();
-void userNameChanged();
+    void speedAchieved();
+    void userNameChanged();
 
 private slots:
     void on_pushButtonSendResult_clicked();
@@ -94,7 +96,6 @@ private slots:
     void on_registratePushButton_clicked();
     void on_comboBoxTopCategory_activated(QString );
     //void on_pushButton_clicked();
-    void networkResponse(QNetworkReply*);
     void on_comboBoxTopCategory_currentIndexChanged(QString category); //Top-tab view
     void on_listViewStartTabAccelerationCategories_clicked(QModelIndex index); //Start-tab view
     void updateComboBoxStartTabUnits(QString unit);  //Start-tab view
@@ -102,12 +103,14 @@ private slots:
     void on_buttonTopRefresh_clicked(); //Top-tab view: button
     void on_autoStartButton_clicked();  //Start-tab view: button
     void registrate();
-    void sendXml();
-    void requestTopList();
-    void ackOfResult(QNetworkReply* reply);
-    void ackOfRegistration(QNetworkReply* reply);
-    void errorFromServer(QNetworkReply* reply);
-
+    void sendResultXml();
+    void requestTopList(QString category, QString limit);
+    void requestCategories();
+    void ackOfResult();
+    void ackOfRegistration();
+    void ackOfCategories();
+    void ackOfToplist();
+    void errorFromServer(QNetworkReply::NetworkError);
     void after_timeout();
     void updateUserName();
 };
index ad01fd9..3d56709 100644 (file)
@@ -24,7 +24,7 @@
      </rect>
     </property>
     <property name="currentIndex">
-     <number>1</number>
+     <number>3</number>
     </property>
     <widget class="QWidget" name="StartTab">
      <attribute name="title">
       <property name="font">
        <font>
         <family>Bitstream Charter</family>
-        <pointsize>14</pointsize>
+        <pointsize>24</pointsize>
         <weight>75</weight>
         <bold>true</bold>
        </font>
       <property name="font">
        <font>
         <family>Bitstream Charter</family>
-        <pointsize>14</pointsize>
+        <pointsize>24</pointsize>
         <weight>75</weight>
         <bold>true</bold>
        </font>
       <property name="font">
        <font>
         <family>Bitstream Charter</family>
-        <pointsize>14</pointsize>
+        <pointsize>24</pointsize>
         <weight>75</weight>
         <bold>true</bold>
        </font>
diff --git a/Client/categorylist.cpp b/Client/categorylist.cpp
new file mode 100644 (file)
index 0000000..3226bbf
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Categorylist
+ *
+ * @author     Olavi Pulkkinen <olavi.pulkkinena@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
+#include "categorylist.h"
+
+/**
+  *Constructor of this class.
+  */
+CategoryList::CategoryList()
+{
+    categoryList << "Speed" << "acceleration-0-40" << "acceleration-0-100" << "G-force"; // OLPU
+    //top10AccelerationList << "acc-tulos1\nacc-tulos2\nacc-tulos3\nacc-tulos4\nacc-tulos5\nacc-tulos6\nacc-tulos7\nacc-tulos8\nacc-tulos9\nacc-tulos10";
+}
+
+/**
+  *Destructor of this class. Should be used to release all allocated resources.
+  */
+CategoryList::~CategoryList()
+{
+}
+
+/**
+  *This is return function.
+  *@todo Read real top 10 category list
+  *@return QStringList categoryList
+  */
+QStringList CategoryList::getCategoryList()
+{
+    return categoryList;
+}
+
+/**
+  *This function is used to get items to top list of current category.
+  *@param QString category
+  *@param int size
+  */
+QString CategoryList::getTopList( QString category, int size)
+{
+    if (category == "acceleration-0-100")
+    {
+        //topList.append(xmlreader->getTop10AccelerationList());
+        //return top10AccelerationList;
+        return "acc-tulos1\nacc-tulos2\nacc-tulos3\nacc-tulos4\nacc-tulos5\nacc-tulos6\nacc-tulos7\nacc-tulos8\nacc-tulos9\nacc-tulos10";
+
+    }
+    else if (category == "acceleration-0-40")
+    {
+                //topList.append(xmlreader->getTop10AccelerationList());
+                //return top10AccelerationList;
+                return "acc-40-tulos1\nacc-40-tulos2\nacc-40-tulos3\nacc-40-tulos4\nacc-40-tulos5\nacc-40-tulos6\nacc-40-tulos7\nacc-40-tulos8\nacc-40-tulos9\nacc-40-tulos10";
+
+    }
+    else if (category == "Speed")
+    {
+        //topList.append(xmlreader->getTop10SpeedList());
+        //return top10SpeedList;
+        return "speed-tulos1\nspeed-tulos2\nspeed-tulos3\nspeed-tulos4\nspeed-tulos5\nspeed-tulos6\nspeed-tulos7\nspeed-tulos8\nspeed-tulos9\nspeed-tulos10";
+    }
+    else if (category == "G-force")
+    {
+        //topList.append(xmlreader->getTop10GforceList());
+        //return top10GforceList;
+        return "g-tulos1\ng-tulos2\ng-tulos3\ng-tulos4\ng-tulos5\ng-tulos6\ng-tulos7\ng-tulos8\ng-tulos9\ng-tulos10";
+
+    }
+}
+
diff --git a/Client/categorylist.h b/Client/categorylist.h
new file mode 100644 (file)
index 0000000..c96faea
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Categorylist
+ *
+ * @author     Olavi Pulkkinen <olavi.pulkkinena@fudeco.com>
+ * @copyright  (c) 2010 Speed Freak team
+ * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
+#ifndef CATEGORYLIST_H
+#define CATEGORYLIST_H
+
+#include <QStringList>
+
+class CategoryList : public QObject
+{
+public:
+    CategoryList();
+    ~CategoryList();
+    QStringList getCategoryList();
+    QString getTopList( QString category, int size);
+
+private:
+    QStringList categoryList;
+    QString top10AccelerationList;
+    QString top10SpeedList;
+    QString top10GforceList;
+};
+
+#endif // CATEGORYLIST_H
index a5b5232..12db29f 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading ui file 'carmainwindow.ui'
 **
-** Created: Thu Mar 11 08:28:04 2010
+** Created: Thu Mar 11 09:55:16 2010
 **      by: Qt User Interface Compiler version 4.5.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling ui file!
@@ -145,7 +145,7 @@ public:
         tabTop->setObjectName(QString::fromUtf8("tabTop"));
         buttonTopRefresh = new QPushButton(tabTop);
         buttonTopRefresh->setObjectName(QString::fromUtf8("buttonTopRefresh"));
-        buttonTopRefresh->setGeometry(QRect(20, 206, 221, 71));
+        buttonTopRefresh->setGeometry(QRect(10, 210, 221, 71));
         buttonTopRefresh->setFont(font);
         listViewTopList = new QListView(tabTop);
         listViewTopList->setObjectName(QString::fromUtf8("listViewTopList"));
@@ -228,7 +228,7 @@ public:
         labelMeasureTabTime->setGeometry(QRect(129, 60, 71, 61));
         QFont font6;
         font6.setFamily(QString::fromUtf8("Bitstream Charter"));
-        font6.setPointSize(14);
+        font6.setPointSize(24);
         font6.setBold(true);
         font6.setWeight(75);
         labelMeasureTabTime->setFont(font6);
@@ -266,7 +266,7 @@ public:
 
         retranslateUi(CarMainWindow);
 
-        tabWidget->setCurrentIndex(0);
+        tabWidget->setCurrentIndex(3);
 
 
         QMetaObject::connectSlotsByName(CarMainWindow);
index 1ac3918..393cd41 100644 (file)
@@ -122,39 +122,3 @@ void XmlReader::xmlShow()
     file.close();
 }
 
-/**
-  *This is return function.
-  *@todo Read real top 10 category list
-  *@return QStringList top10List
-  */
-QStringList XmlReader::getTop10List()
-{
-    return top10List;
-}
-
-/**
-  *This is return function.
-  *@return QString top10AccelerationList
-  */
-QString XmlReader::getTop10AccelerationList()
-{
-    return top10AccelerationList;
-}
-
-/**
-  *This is return function.
-  *@return QString top10SpeedList
-  */
-QString XmlReader::getTop10SpeedList()
-{
-    return top10SpeedList;
-}
-
-/**
-  *This is return function.
-  *@return QString top10GforceList
-  */
-QString XmlReader::getTop10GforceList()
-{
-    return top10GforceList;
-}
index 4cf31dd..921ceb2 100644 (file)
@@ -19,14 +19,10 @@ class XmlReader : public QObject
 public:
     XmlReader();
     ~XmlReader();
-    QStringList getTop10List();
-    QString getTop10AccelerationList();
-    QString getTop10SpeedList();
-    QString getTop10GforceList(); 
 
 private:
     QXmlStreamReader xmlreader;
-    QStringList top10List;
+    QStringList top10List;              // Next 4 to be removed. Categorylist now in own class.
     QString top10AccelerationList;
     QString top10SpeedList;
     QString top10GforceList;
index 1aecd5d..3af43a8 100644 (file)
Binary files a/documents/UI_Design.odt and b/documents/UI_Design.odt differ