}
/**
++<<<<<<< HEAD:Client/carmainwindow.cpp
+ *This function is used to set items to speed listview.
+ *@param QStringlist numbers
+ */
+void CarMainWindow::setSpeedListView(QStringList numbers)
+{
+ QAbstractItemModel *model = new StringListModel(numbers);
+ ui->listView->setModel(model);
+}
+
+/**
+ *This function is used to init category combobox.
+ */
+void CarMainWindow::initCategoryCompoBox()
+{
+ categories << "Top 10 1/4 mile" << "Top 10 0-100 km/h" << "Top 10 car";
+ ui->comboBoxTopCategory->addItems(categories);
+}
+
+/**
+ *This function is used to set items to category combobox.
+ *@param QStringlist categories
+ */
+void CarMainWindow::setCategoryCompoBox(QStringList categories)
+{
+ ui->comboBoxTopCategory->addItems(categories);
+}
+
+/**
+ *This slot function is called when ever categories combobox is update.
+ *@param QString category
+ */
+void CarMainWindow::on_comboBoxTopCategory_activated(QString category)
+{
+ //TODO: get top list
+
+ QStringList topList;
+ topList << "1. Pertti 7,5s" << "2. Ville 10,2s";
+
+ QAbstractItemModel *model = new StringListModel(topList);
+ ui->listViewTopList->setModel(model);
+}
++
++/**
+ *This slot function is called when speed is achieved in measure dialog. Opens result dialog.
+ */
+ void CarMainWindow::openResultView()
+ {
+ // Show result dialog.
+ result->show();
+ }