+
+/**
+ *This function is used to set items to category combobox. Top-tab view.
+ *@param
+ */
+void CarMainWindow::setCategoryCompoBox()
+{
+ ui->comboBoxTopCategory->addItems(xmlreader->getTop10List());
+}
+
+/**
+ *This function is used to set items to labelTopList. Top-tab view.
+ *@param QString category
+ */
+void CarMainWindow::setListViewTopList(QString category)
+{
+ 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());
+ }
+ ui->labelTopList->setText(topList);
+}
+
+/**
+ *This slot function is called when speed is achieved in measure dialog. Opens result dialog.
+ */
+void CarMainWindow::openResultView()
+{
+ // Show result dialog.
+ result->show();
+}
+
+/**
+ *This slot function is called when ever refresh button clicked. Top-tab view.
+ */
+void CarMainWindow::on_buttonTopRefresh_clicked()
+{
+ setCategoryCompoBox();
+}
+
+/**
+ *This slot function is called when ever category combobox current index changed. Top-tab view.
+ *@param QString category
+ */
+void CarMainWindow::on_comboBoxTopCategory_currentIndexChanged(QString category)
+{
+ setListViewTopList(category);
+}