Display top performer in certain category.
[speedfreak] / Client / carmainwindow.h
1 #ifndef CARMAINWINDOW_H
2 #define CARMAINWINDOW_H
3
4 /**
5   *This class
6   *@author Toni Jussila
7   *@version 0.0.1
8   */
9
10 #include <QMainWindow>
11 #include <QModelIndex>
12 #include <QStringList>
13 #include "resultdialog.h"
14 #include "measuredialog.h"
15
16 namespace Ui {
17     class CarMainWindow;
18 }
19
20 class CarMainWindow : public QMainWindow {
21     Q_OBJECT
22 public:
23     CarMainWindow(QWidget *parent = 0);
24     ~CarMainWindow();
25
26     void setUnitCompoBox(QStringList units);
27     void setSpeedListView(QStringList numbers);
28     void setCategoryCompoBox(QStringList categories);
29
30 protected:
31     void changeEvent(QEvent *e);
32
33 private:
34     Ui::CarMainWindow *ui;
35     ResultDialog *result;
36     MeasureDialog *measure;
37
38     void initUnitCompoBox();
39     void initSpeedListView();
40     void initCategoryCompoBox();
41
42 private:
43     QStringList numbers;
44     QStringList units;
45     QStringList categories;
46
47 private slots:
48     void on_comboBoxTopCategory_activated(QString );
49     void on_autoStartButton_clicked();
50     void on_listView_clicked(QModelIndex index);
51     void updateUnitCompoBox(QString unit);
52 };
53
54 #endif // CARMAINWINDOW_H