+
+/**
+ * This slot function opens the settings dialog
+ */
+void MainWindow::on_pushButtonSettings_clicked()
+{
+ settingsDialog->show();
+}
+
+/**
+ * This slot function opens the acceleration dialog
+ */
+void MainWindow::on_pushButtonAccelerate_clicked()
+{
+ if(!accstart)
+ accstart = new accelerationstart(this);
+ accstart->show();
+}
+
+/**
+ * This slot function opens the top results dialog
+ */
+void MainWindow::on_pushButtonResults_clicked()
+{
+ topResultDialog->show();
+}
+
+/**
+ *This slot function is called when ever mytTopResultDialog emits signal refreshCategoryList button clicked.
+ */
+void MainWindow::clientRequestCategoryList()
+{
+ httpClient->requestCategories();
+}
+
+/**
+ *This slot function is called when ever mytTopResultDialog emits signal refreshTopList button clicked.
+ */
+void MainWindow::clientRequestTopList(int index)
+{
+ QString limit = QString::number(topResultDialog->getLimitNr());
+ httpClient->requestTopList(httpClient->myXmlreader->myCategoryList->getRecentCategory(index), limit);
+}
+
+/**
+ *This function is used to set items to category combobox. Top-tab view.
+ *@param
+ */
+void MainWindow::setCategoryCompoBox()
+{
+ topResultDialog->setCompoBoxCategories(httpClient->myXmlreader->myCategoryList->getCategoryList());
+}
+
+/**
+ *This function prcesses UI updating after a new top10List has been received.
+ *@todo Check where limitNr is taken, fixed or user input, see on_comboBoxTopCategory_currentIndexChanged.
+ */
+void MainWindow::showTop10()
+{
+ int ind = topResultDialog->getRecentCategoryIndex();
+ setListViewTopList(httpClient->myXmlreader->myCategoryList->getRecentCategory(ind), topResultDialog->getLimitNr());
+}
+
+/**
+ *This function is used to set items to labelTopList. Top-tab view.
+ *@param Category
+ *@param Size, number of results.
+ */
+void MainWindow::setListViewTopList(QString category, int size)
+{
+ QString topList;
+ topList.append(httpClient->myXmlreader->myCategoryList->getTopList(category, size));
+ topResultDialog->showTopList(topList);
+}
+
+void MainWindow::clientRegUserToServer()
+{
+ httpClient->requestRegistration();
+}
+
+/**
+ * This function performs login to server
+ */
+void MainWindow::clientUserLogin()
+{
+ httpClient->checkLogin();
+}
+
+/**
+ * This function send route to server
+ */
+void MainWindow::clientSendRoute()
+{
+ httpClient->sendRouteXml();
+}
+
+/**
+ * This function send acceleration data to server
+ */
+void MainWindow::clientSendResult()
+{
+ qDebug() << "_clientSendResult";
+ if(accstart) {
+ qDebug() << "_clientSendResult, calling server";
+ httpClient->sendResultXml(accstart->getMeasureCategory(), resultDialog->getResult());
+ }
+}