Merge branch 'feature/measureOwnTab'
authorJanne Änäkkälä <Janne_anakkala@hotmail.com>
Tue, 9 Mar 2010 07:11:03 +0000 (09:11 +0200)
committerJanne Änäkkälä <Janne_anakkala@hotmail.com>
Tue, 9 Mar 2010 07:11:03 +0000 (09:11 +0200)
Client/UI.pro.user
Client/carmainwindow.cpp
Client/carmainwindow.h
Client/carmainwindow.ui
Client/measuredialog.cpp
Client/ui_carmainwindow.h
Client/ui_resultdialog.h

index 4c6f818..c86a445 100644 (file)
@@ -57,7 +57,7 @@
   <valuemap type="QVariantMap">
    <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
    <value key="QtVersionId" type="int">0</value>
-   <value key="ToolChain" type="int">202</value>
+   <value key="ToolChain" type="int">0</value>
    <value key="addQDumper" type=""></value>
    <value key="buildConfiguration" type="int">2</value>
   </valuemap>
@@ -67,7 +67,7 @@
   <valuemap type="QVariantMap">
    <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
    <value key="QtVersionId" type="int">0</value>
-   <value key="ToolChain" type="int">202</value>
+   <value key="ToolChain" type="int">0</value>
    <value key="addQDumper" type=""></value>
    <value key="buildConfiguration" type="int">0</value>
   </valuemap>
index 167bf33..42b69af 100644 (file)
@@ -10,6 +10,7 @@
   */
 
 #include "carmainwindow.h"
+#include "math.h"
 
 /**
   *Constructor of this class.
@@ -18,8 +19,8 @@
 CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::CarMainWindow)
 {
     ui->setupUi(this);
-    result = new ResultDialog();
-    measure = new MeasureDialog();
+    //result = new ResultDialog();
+    //measure = new MeasureDialog();
     xmlreader = new XmlReader();
 
     initComboBoxStartTabUnits();
@@ -31,7 +32,24 @@ CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::Ca
     manager = new QNetworkAccessManager(this);
     connect(manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(networkResponse(QNetworkReply*)));
     connect(myRegistration,SIGNAL(sendregistration()),this,SLOT(registrate()));
-    connect(result,SIGNAL(sendresult()),this,SLOT(sendXml()));
+    connect(this,SIGNAL(sendresult()),this,SLOT(sendXml()));
+
+    time = 0;
+    speed = 0;
+    timer = new QTimer();
+
+    accelerometer = new Accelerometer();
+    accelerometer->setSampleRate(100);
+    accelerometer->start();
+
+    measures = new Measures();
+    this->initializeMeasures();
+
+    timer->setInterval(1000);
+
+    connect(this->timer, SIGNAL(timeout()), this, SLOT(after_timeout()));
+
+    ui->labelMeasureTabResult->hide();
 
 }
 
@@ -41,8 +59,8 @@ CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::Ca
 CarMainWindow::~CarMainWindow()
 {
     delete ui;
-    delete result;
-    delete measure;
+    //delete result;
+    //delete measure;
     delete xmlreader;
     delete xmlwriter;
     delete manager;
@@ -84,13 +102,14 @@ void CarMainWindow::on_listViewStartTabAccelerationCategories_clicked(QModelInde
 void CarMainWindow::on_autoStartButton_clicked()
 {
 
-    delete measure;
-    measure = NULL;
-    measure = new MeasureDialog();
-
-    connect(measure, SIGNAL(speedAchieved()), this, SLOT(openResultView()));
+    //delete measure;
+    //measure = NULL;
+    //measure = new MeasureDialog();
+   // connect(measure, SIGNAL(speedAchieved()), this, SLOT(openResultView()));
+    timer->start();
     // Show measure dialog.
-    measure->show();
+    //measure->show();
+    ui->tabWidget->setCurrentWidget(this->ui->tabMeasureResult);
 }
 
 /**
@@ -179,9 +198,17 @@ void CarMainWindow::setListViewTopList(QString category)
   */
 void CarMainWindow::openResultView()
 {
-    result->saveMeasuresToArray(measure->measures);
+    //result->saveMeasuresToArray(measure->measures);
     // Show result dialog.
-    result->show();
+    //result->show();
+    QString timeInteger;
+    timeInteger.setNum(this->measures->getTime40kmh());
+    //time = "0 - 40 km/h: ";
+    //time.append(timeInteger);
+    //ui->labelResult40kmh->setText(time);
+    ui->labelMeasureTabResult->show();
+    ui->labelMeasureTabResult->setText(timeInteger);
+    //ui->tabWidget->setCurrentWidget(this->ui->tabMeasureResult);
 }
 
 /**
@@ -353,3 +380,141 @@ void CarMainWindow::on_manualStartButton_clicked()
 {
     sendXml();
 }
+
+/**
+  * This slot function is called when timer gives timeout signal. Checks current speed
+  * and stores times in measure class.
+  */
+void CarMainWindow::after_timeout()
+{
+    QString timeString, speedString;
+    //time++;
+    time = accelerometer->getTotalTime();
+    speed = accelerometer->getCurrentSpeed();
+    //speed = speed +10;
+
+    if (floor(speed) == 10)
+    {
+        measures->setTime10kmh(time);
+    }
+
+    else if (floor(speed) == 20)
+    {
+        measures->setTime20kmh(time);
+    }
+
+    else if (floor(speed) == 30)
+    {
+        measures->setTime30kmh(time);
+    }
+
+    else if (floor(speed) == 40)
+    {
+        measures->setTime40kmh(time);
+    }
+
+    else if (floor(speed) == 50)
+    {
+        measures->setTime50kmh(time);
+    }
+
+    else if (floor(speed) == 60)
+    {
+        measures->setTime60kmh(time);
+    }
+
+    else if (floor(speed) == 70)
+    {
+        measures->setTime70kmh(time);
+    }
+
+    else if (floor(speed) == 80)
+    {
+        measures->setTime80kmh(time);
+    }
+
+    else if (floor(speed) == 90)
+    {
+        measures->setTime90kmh(time);
+    }
+
+    else if (floor(speed) == 100)
+    {
+        measures->setTime100kmh(time);
+    }
+
+    else
+    {
+
+    }
+
+    // If speed is over 40 km/h emits speedAchieved() signal and close this dialog.
+    if (speed >= 40.0)
+    {
+        timer->stop();
+        accelerometer->stop();
+        time = 0;
+        speed = 0;
+        //emit this->speedAchieved();
+        this->openResultView();
+        //this->close();
+
+    }
+
+    // Updates speed and time.
+    else
+    {
+        timeString.setNum(time);
+        speedString.setNum(speed);
+        ui->labelMeasureTabTime->setText(timeString);
+        ui->labelMeasureTabSpeed->setText(speedString);
+
+        timer->start();
+    }
+
+}
+
+/**
+  * Initializes measures class's member variables.
+  */
+void CarMainWindow::initializeMeasures()
+{
+    measures->setTime10kmh(0);
+    measures->setTime20kmh(0);
+    measures->setTime30kmh(0);
+    measures->setTime40kmh(0);
+    measures->setTime50kmh(0);
+    measures->setTime60kmh(0);
+    measures->setTime70kmh(0);
+    measures->setTime80kmh(0);
+    measures->setTime90kmh(0);
+    measures->setTime100kmh(0);
+}
+
+/**
+  * This slot function is called when Abort button is clicked.
+  */
+void CarMainWindow::on_pushButtonMeasureTabAbort_clicked()
+{
+    measures->setTime10kmh(0);
+    measures->setTime20kmh(0);
+    measures->setTime30kmh(0);
+    measures->setTime40kmh(0);
+    measures->setTime50kmh(0);
+    measures->setTime60kmh(0);
+    measures->setTime70kmh(0);
+    measures->setTime80kmh(0);
+    measures->setTime90kmh(0);
+    measures->setTime100kmh(0);
+    timer->stop();
+    accelerometer->stop();
+    time = 0;
+    speed = 0;
+    ui->tabWidget->setCurrentWidget(this->ui->StartTab);
+    //this->close();
+}
+
+void CarMainWindow::on_pushButtonSendResult_clicked()
+{
+    emit sendresult();
+}
index dfb2402..a00516c 100644 (file)
 #include <QBuffer>
 #include <QByteArray>
 #include <QDebug>
-#include "resultdialog.h"
-#include "measuredialog.h"
+//#include "resultdialog.h"
+//#include "measuredialog.h"
 #include "loginwindow.h"
 #include "registration.h"
 #include "xmlwriter.h"
 #include "xmlreader.h"
 #include "ui_carmainwindow.h"
 #include "stringlistmodel.h"
+#include "measures.h"
+#include "accelerometer.h"
 
 namespace Ui {
     class CarMainWindow;
@@ -54,8 +56,8 @@ protected:
 
 private:
     Ui::CarMainWindow *ui;
-    ResultDialog *result;
-    MeasureDialog *measure;
+    //ResultDialog *result;
+    //MeasureDialog *measure;
     XmlReader *xmlreader;
     XmlWriter *xmlwriter;
     QNetworkAccessManager* manager;
@@ -65,12 +67,26 @@ private:
     void initComboBoxStartTabUnits();    //Start-tab view
     void initListViewStartTabAccelerationCategories();   //Start-tab view
 
+    void initializeMeasures();
+
 private:
     QStringList accelerationCategoriesStartTab; //Start-tab view
     QStringList units;  //Start-tab view
     QStringList categories; //Top-tab view
 
+    QTimer *timer;
+    Accelerometer *accelerometer;
+    double time;
+    double speed;
+    Measures *measures;
+
+signals:
+void speedAchieved();
+void sendresult();
+
 private slots:
+    void on_pushButtonSendResult_clicked();
+    void on_pushButtonMeasureTabAbort_clicked();
     void on_manualStartButton_clicked();
     void on_setUserPushButton_clicked();
     void on_registratePushButton_clicked();
@@ -88,6 +104,8 @@ private slots:
     void sendXml();
     void ackOfResult();
     void ackOfRegistration();
+
+    void after_timeout();
 };
 
 #endif // CARMAINWINDOW_H
index 1ccc396..e295657 100644 (file)
     <property name="geometry">
      <rect>
       <x>10</x>
-      <y>10</y>
+      <y>0</y>
       <width>781</width>
       <height>361</height>
      </rect>
     </property>
     <property name="currentIndex">
-     <number>0</number>
+     <number>3</number>
     </property>
     <widget class="QWidget" name="StartTab">
      <attribute name="title">
       </layout>
      </widget>
     </widget>
-    <widget class="QWidget" name="tab">
+    <widget class="QWidget" name="tabTop">
      <attribute name="title">
       <string>Top</string>
      </attribute>
       </property>
      </widget>
     </widget>
+    <widget class="QWidget" name="tabMeasureResult">
+     <attribute name="title">
+      <string>Measure</string>
+     </attribute>
+     <widget class="QPushButton" name="pushButtonMeasureTabAbort">
+      <property name="geometry">
+       <rect>
+        <x>40</x>
+        <y>240</y>
+        <width>161</width>
+        <height>51</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Abort</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="labelMeasureTabHeader">
+      <property name="geometry">
+       <rect>
+        <x>40</x>
+        <y>10</y>
+        <width>261</width>
+        <height>41</height>
+       </rect>
+      </property>
+      <property name="font">
+       <font>
+        <family>Bitstream Charter</family>
+        <weight>75</weight>
+        <bold>true</bold>
+       </font>
+      </property>
+      <property name="text">
+       <string>Accelerate to 40 km/h</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="labelMeasureTabResultHeader">
+      <property name="geometry">
+       <rect>
+        <x>370</x>
+        <y>10</y>
+        <width>101</width>
+        <height>41</height>
+       </rect>
+      </property>
+      <property name="font">
+       <font>
+        <family>Bitstream Charter</family>
+        <weight>75</weight>
+        <bold>true</bold>
+       </font>
+      </property>
+      <property name="text">
+       <string>Results:</string>
+      </property>
+     </widget>
+     <widget class="QPushButton" name="pushButtonSendResult">
+      <property name="geometry">
+       <rect>
+        <x>370</x>
+        <y>240</y>
+        <width>161</width>
+        <height>51</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Send result</string>
+      </property>
+     </widget>
+     <widget class="QWidget" name="">
+      <property name="geometry">
+       <rect>
+        <x>40</x>
+        <y>60</y>
+        <width>171</width>
+        <height>61</height>
+       </rect>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayoutMeasureTabTime">
+       <item>
+        <widget class="QLabel" name="labelMeasureTabTimeHeader">
+         <property name="text">
+          <string>Time:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="labelMeasureTabTime">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="">
+      <property name="geometry">
+       <rect>
+        <x>40</x>
+        <y>160</y>
+        <width>171</width>
+        <height>61</height>
+       </rect>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayoutMeasureTabSpeed">
+       <item>
+        <widget class="QLabel" name="labelMeasureTabSpeedHeader">
+         <property name="text">
+          <string>Speed:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="labelMeasureTabSpeed">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+     <widget class="QWidget" name="">
+      <property name="geometry">
+       <rect>
+        <x>370</x>
+        <y>60</y>
+        <width>151</width>
+        <height>61</height>
+       </rect>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayout_2">
+       <item>
+        <widget class="QLabel" name="labelMeasureTabResultHeader_2">
+         <property name="text">
+          <string>Time:</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLabel" name="labelMeasureTabResult">
+         <property name="text">
+          <string>0</string>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </widget>
    </widget>
    <widget class="QWidget" name="layoutWidget">
     <property name="geometry">
      <x>0</x>
      <y>0</y>
      <width>800</width>
-     <height>27</height>
+     <height>25</height>
     </rect>
    </property>
   </widget>
index 7e65537..02c9ea7 100644 (file)
@@ -1,5 +1,6 @@
 #include "measuredialog.h"
 #include "ui_measuredialog.h"
+#include "math.h"
 
 
 /**
@@ -60,52 +61,52 @@ void MeasureDialog::after_timeout()
     speed = accelerometer->getCurrentSpeed();
     //speed = speed +10;
 
-    if (speed > 9.7 && speed < 10.3)
+    if (floor(speed) == 10)
     {
         measures->setTime10kmh(time);
     }
 
-    else if (speed > 19.7 && speed < 20.3)
+    else if (floor(speed) == 20)
     {
         measures->setTime20kmh(time);
     }
 
-    else if (speed > 29.7 && speed < 30.3)
+    else if (floor(speed) == 30)
     {
         measures->setTime30kmh(time);
     }
 
-    else if (speed > 39.7 && speed < 40.3)
+    else if (floor(speed) == 40)
     {
         measures->setTime40kmh(time);
     }
 
-    else if (speed > 49.7 && speed < 50.3)
+    else if (floor(speed) == 50)
     {
         measures->setTime50kmh(time);
     }
 
-    else if (speed > 59.7 && speed < 60.3)
+    else if (floor(speed) == 60)
     {
         measures->setTime60kmh(time);
     }
 
-    else if (speed > 69.7 && speed < 70.3)
+    else if (floor(speed) == 70)
     {
         measures->setTime70kmh(time);
     }
 
-    else if (speed > 79.7 && speed < 80.3)
+    else if (floor(speed) == 80)
     {
         measures->setTime80kmh(time);
     }
 
-    else if (speed > 89.7 && speed < 90.3)
+    else if (floor(speed) == 90)
     {
         measures->setTime90kmh(time);
     }
 
-    else if (speed > 99.7 && speed < 100.3)
+    else if (floor(speed) == 100)
     {
         measures->setTime100kmh(time);
     }
index fc27fc7..d63ea48 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading ui file 'carmainwindow.ui'
 **
-** Created: Wed Feb 24 13:07:28 2010
+** Created: Mon Mar 8 15:04:52 2010
 **      by: Qt User Interface Compiler version 4.5.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling ui file!
@@ -14,6 +14,8 @@
 #include <QtGui/QAction>
 #include <QtGui/QApplication>
 #include <QtGui/QButtonGroup>
+#include <QtGui/QComboBox>
+#include <QtGui/QHBoxLayout>
 #include <QtGui/QHeaderView>
 #include <QtGui/QLabel>
 #include <QtGui/QLineEdit>
@@ -22,6 +24,7 @@
 #include <QtGui/QMenuBar>
 #include <QtGui/QPushButton>
 #include <QtGui/QStatusBar>
+#include <QtGui/QTabWidget>
 #include <QtGui/QToolBar>
 #include <QtGui/QVBoxLayout>
 #include <QtGui/QWidget>
@@ -32,15 +35,56 @@ class Ui_CarMainWindow
 {
 public:
     QWidget *centralWidget;
-    QListView *listView;
-    QWidget *widget;
+    QTabWidget *tabWidget;
+    QWidget *StartTab;
+    QWidget *layoutWidget;
     QVBoxLayout *verticalLayout;
     QPushButton *autoStartButton;
     QPushButton *manualStartButton;
-    QWidget *widget1;
+    QListView *listViewStartTabAccelerationCategories;
+    QWidget *layoutWidget1;
     QVBoxLayout *verticalLayout_2;
-    QLabel *label;
-    QLineEdit *lineEdit;
+    QLabel *startLabel;
+    QLineEdit *lineEditStartTabMin;
+    QLabel *stopLabel;
+    QLineEdit *lineEditStartTabMax;
+    QLabel *unitLabel;
+    QComboBox *comboBoxStartTabUnits;
+    QWidget *tabTop;
+    QPushButton *buttonTopRefresh;
+    QListView *listViewTopList;
+    QWidget *layoutWidget2;
+    QVBoxLayout *verticalLayout_3;
+    QLabel *labelCategory;
+    QComboBox *comboBoxTopCategory;
+    QLabel *labelTopList;
+    QWidget *settingsTab;
+    QLabel *userNameLabel;
+    QPushButton *setUserPushButton;
+    QWidget *tabMeasureResult;
+    QPushButton *pushButtonMeasureTabAbort;
+    QLabel *labelMeasureTabHeader;
+    QLabel *labelMeasureTabResultHeader;
+    QPushButton *pushButtonSendResult;
+    QWidget *widget;
+    QHBoxLayout *horizontalLayoutMeasureTabTime;
+    QLabel *labelMeasureTabTimeHeader;
+    QLabel *labelMeasureTabTime;
+    QWidget *widget1;
+    QHBoxLayout *horizontalLayoutMeasureTabSpeed;
+    QLabel *labelMeasureTabSpeedHeader;
+    QLabel *labelMeasureTabSpeed;
+    QWidget *widget2;
+    QHBoxLayout *horizontalLayout_2;
+    QLabel *labelMeasureTabResultHeader_2;
+    QLabel *labelMeasureTabResult;
+    QWidget *layoutWidget3;
+    QHBoxLayout *horizontalLayout;
+    QPushButton *view1Button;
+    QPushButton *view2Button;
+    QPushButton *view3Button;
+    QPushButton *view4Button;
+    QPushButton *registratePushButton;
     QMenuBar *menuBar;
     QToolBar *mainToolBar;
     QStatusBar *statusBar;
@@ -52,18 +96,20 @@ public:
         CarMainWindow->resize(800, 480);
         centralWidget = new QWidget(CarMainWindow);
         centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
-        listView = new QListView(centralWidget);
-        listView->setObjectName(QString::fromUtf8("listView"));
-        listView->setGeometry(QRect(10, 0, 256, 101));
-        widget = new QWidget(centralWidget);
-        widget->setObjectName(QString::fromUtf8("widget"));
-        widget->setGeometry(QRect(650, 340, 147, 78));
-        verticalLayout = new QVBoxLayout(widget);
+        tabWidget = new QTabWidget(centralWidget);
+        tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
+        tabWidget->setGeometry(QRect(10, 0, 781, 361));
+        StartTab = new QWidget();
+        StartTab->setObjectName(QString::fromUtf8("StartTab"));
+        layoutWidget = new QWidget(StartTab);
+        layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
+        layoutWidget->setGeometry(QRect(590, 220, 171, 91));
+        verticalLayout = new QVBoxLayout(layoutWidget);
         verticalLayout->setSpacing(6);
         verticalLayout->setMargin(11);
         verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
         verticalLayout->setContentsMargins(0, 0, 0, 0);
-        autoStartButton = new QPushButton(widget);
+        autoStartButton = new QPushButton(layoutWidget);
         autoStartButton->setObjectName(QString::fromUtf8("autoStartButton"));
         QFont font;
         font.setFamily(QString::fromUtf8("Bitstream Charter"));
@@ -74,34 +120,217 @@ public:
 
         verticalLayout->addWidget(autoStartButton);
 
-        manualStartButton = new QPushButton(widget);
+        manualStartButton = new QPushButton(layoutWidget);
         manualStartButton->setObjectName(QString::fromUtf8("manualStartButton"));
         manualStartButton->setFont(font);
 
         verticalLayout->addWidget(manualStartButton);
 
-        widget1 = new QWidget(centralWidget);
-        widget1->setObjectName(QString::fromUtf8("widget1"));
-        widget1->setGeometry(QRect(340, 6, 146, 201));
-        verticalLayout_2 = new QVBoxLayout(widget1);
+        listViewStartTabAccelerationCategories = new QListView(StartTab);
+        listViewStartTabAccelerationCategories->setObjectName(QString::fromUtf8("listViewStartTabAccelerationCategories"));
+        listViewStartTabAccelerationCategories->setGeometry(QRect(0, 10, 261, 301));
+        layoutWidget1 = new QWidget(StartTab);
+        layoutWidget1->setObjectName(QString::fromUtf8("layoutWidget1"));
+        layoutWidget1->setGeometry(QRect(270, 10, 311, 301));
+        verticalLayout_2 = new QVBoxLayout(layoutWidget1);
         verticalLayout_2->setSpacing(6);
         verticalLayout_2->setMargin(11);
         verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
         verticalLayout_2->setContentsMargins(0, 0, 0, 0);
-        label = new QLabel(widget1);
-        label->setObjectName(QString::fromUtf8("label"));
+        startLabel = new QLabel(layoutWidget1);
+        startLabel->setObjectName(QString::fromUtf8("startLabel"));
+
+        verticalLayout_2->addWidget(startLabel);
+
+        lineEditStartTabMin = new QLineEdit(layoutWidget1);
+        lineEditStartTabMin->setObjectName(QString::fromUtf8("lineEditStartTabMin"));
+
+        verticalLayout_2->addWidget(lineEditStartTabMin);
+
+        stopLabel = new QLabel(layoutWidget1);
+        stopLabel->setObjectName(QString::fromUtf8("stopLabel"));
+
+        verticalLayout_2->addWidget(stopLabel);
+
+        lineEditStartTabMax = new QLineEdit(layoutWidget1);
+        lineEditStartTabMax->setObjectName(QString::fromUtf8("lineEditStartTabMax"));
+
+        verticalLayout_2->addWidget(lineEditStartTabMax);
+
+        unitLabel = new QLabel(layoutWidget1);
+        unitLabel->setObjectName(QString::fromUtf8("unitLabel"));
+
+        verticalLayout_2->addWidget(unitLabel);
+
+        comboBoxStartTabUnits = new QComboBox(layoutWidget1);
+        comboBoxStartTabUnits->setObjectName(QString::fromUtf8("comboBoxStartTabUnits"));
+
+        verticalLayout_2->addWidget(comboBoxStartTabUnits);
+
+        tabWidget->addTab(StartTab, QString());
+        tabTop = new QWidget();
+        tabTop->setObjectName(QString::fromUtf8("tabTop"));
+        buttonTopRefresh = new QPushButton(tabTop);
+        buttonTopRefresh->setObjectName(QString::fromUtf8("buttonTopRefresh"));
+        buttonTopRefresh->setGeometry(QRect(20, 270, 169, 37));
+        buttonTopRefresh->setFont(font);
+        listViewTopList = new QListView(tabTop);
+        listViewTopList->setObjectName(QString::fromUtf8("listViewTopList"));
+        listViewTopList->setGeometry(QRect(360, 10, 411, 311));
+        QFont font1;
+        font1.setFamily(QString::fromUtf8("Bitstream Charter"));
+        font1.setPointSize(10);
+        listViewTopList->setFont(font1);
+        listViewTopList->setFlow(QListView::LeftToRight);
+        layoutWidget2 = new QWidget(tabTop);
+        layoutWidget2->setObjectName(QString::fromUtf8("layoutWidget2"));
+        layoutWidget2->setGeometry(QRect(10, 10, 341, 141));
+        verticalLayout_3 = new QVBoxLayout(layoutWidget2);
+        verticalLayout_3->setSpacing(6);
+        verticalLayout_3->setMargin(11);
+        verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3"));
+        verticalLayout_3->setContentsMargins(0, 0, 0, 0);
+        labelCategory = new QLabel(layoutWidget2);
+        labelCategory->setObjectName(QString::fromUtf8("labelCategory"));
+        QFont font2;
+        font2.setFamily(QString::fromUtf8("Bitstream Charter"));
+        font2.setPointSize(16);
+        labelCategory->setFont(font2);
+
+        verticalLayout_3->addWidget(labelCategory);
+
+        comboBoxTopCategory = new QComboBox(layoutWidget2);
+        comboBoxTopCategory->setObjectName(QString::fromUtf8("comboBoxTopCategory"));
+
+        verticalLayout_3->addWidget(comboBoxTopCategory);
 
-        verticalLayout_2->addWidget(label);
+        labelTopList = new QLabel(tabTop);
+        labelTopList->setObjectName(QString::fromUtf8("labelTopList"));
+        labelTopList->setGeometry(QRect(380, 10, 371, 311));
+        QFont font3;
+        font3.setPointSize(9);
+        labelTopList->setFont(font3);
+        labelTopList->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter);
+        tabWidget->addTab(tabTop, QString());
+        settingsTab = new QWidget();
+        settingsTab->setObjectName(QString::fromUtf8("settingsTab"));
+        userNameLabel = new QLabel(settingsTab);
+        userNameLabel->setObjectName(QString::fromUtf8("userNameLabel"));
+        userNameLabel->setGeometry(QRect(20, 30, 141, 17));
+        setUserPushButton = new QPushButton(settingsTab);
+        setUserPushButton->setObjectName(QString::fromUtf8("setUserPushButton"));
+        setUserPushButton->setGeometry(QRect(20, 60, 93, 27));
+        tabWidget->addTab(settingsTab, QString());
+        tabMeasureResult = new QWidget();
+        tabMeasureResult->setObjectName(QString::fromUtf8("tabMeasureResult"));
+        pushButtonMeasureTabAbort = new QPushButton(tabMeasureResult);
+        pushButtonMeasureTabAbort->setObjectName(QString::fromUtf8("pushButtonMeasureTabAbort"));
+        pushButtonMeasureTabAbort->setGeometry(QRect(40, 240, 161, 51));
+        labelMeasureTabHeader = new QLabel(tabMeasureResult);
+        labelMeasureTabHeader->setObjectName(QString::fromUtf8("labelMeasureTabHeader"));
+        labelMeasureTabHeader->setGeometry(QRect(40, 10, 261, 41));
+        QFont font4;
+        font4.setFamily(QString::fromUtf8("Bitstream Charter"));
+        font4.setBold(true);
+        font4.setWeight(75);
+        labelMeasureTabHeader->setFont(font4);
+        labelMeasureTabResultHeader = new QLabel(tabMeasureResult);
+        labelMeasureTabResultHeader->setObjectName(QString::fromUtf8("labelMeasureTabResultHeader"));
+        labelMeasureTabResultHeader->setGeometry(QRect(370, 10, 101, 41));
+        labelMeasureTabResultHeader->setFont(font4);
+        pushButtonSendResult = new QPushButton(tabMeasureResult);
+        pushButtonSendResult->setObjectName(QString::fromUtf8("pushButtonSendResult"));
+        pushButtonSendResult->setGeometry(QRect(370, 240, 161, 51));
+        widget = new QWidget(tabMeasureResult);
+        widget->setObjectName(QString::fromUtf8("widget"));
+        widget->setGeometry(QRect(40, 60, 171, 61));
+        horizontalLayoutMeasureTabTime = new QHBoxLayout(widget);
+        horizontalLayoutMeasureTabTime->setSpacing(6);
+        horizontalLayoutMeasureTabTime->setMargin(11);
+        horizontalLayoutMeasureTabTime->setObjectName(QString::fromUtf8("horizontalLayoutMeasureTabTime"));
+        horizontalLayoutMeasureTabTime->setContentsMargins(0, 0, 0, 0);
+        labelMeasureTabTimeHeader = new QLabel(widget);
+        labelMeasureTabTimeHeader->setObjectName(QString::fromUtf8("labelMeasureTabTimeHeader"));
+
+        horizontalLayoutMeasureTabTime->addWidget(labelMeasureTabTimeHeader);
+
+        labelMeasureTabTime = new QLabel(widget);
+        labelMeasureTabTime->setObjectName(QString::fromUtf8("labelMeasureTabTime"));
+
+        horizontalLayoutMeasureTabTime->addWidget(labelMeasureTabTime);
+
+        widget1 = new QWidget(tabMeasureResult);
+        widget1->setObjectName(QString::fromUtf8("widget1"));
+        widget1->setGeometry(QRect(40, 160, 171, 61));
+        horizontalLayoutMeasureTabSpeed = new QHBoxLayout(widget1);
+        horizontalLayoutMeasureTabSpeed->setSpacing(6);
+        horizontalLayoutMeasureTabSpeed->setMargin(11);
+        horizontalLayoutMeasureTabSpeed->setObjectName(QString::fromUtf8("horizontalLayoutMeasureTabSpeed"));
+        horizontalLayoutMeasureTabSpeed->setContentsMargins(0, 0, 0, 0);
+        labelMeasureTabSpeedHeader = new QLabel(widget1);
+        labelMeasureTabSpeedHeader->setObjectName(QString::fromUtf8("labelMeasureTabSpeedHeader"));
+
+        horizontalLayoutMeasureTabSpeed->addWidget(labelMeasureTabSpeedHeader);
+
+        labelMeasureTabSpeed = new QLabel(widget1);
+        labelMeasureTabSpeed->setObjectName(QString::fromUtf8("labelMeasureTabSpeed"));
+
+        horizontalLayoutMeasureTabSpeed->addWidget(labelMeasureTabSpeed);
+
+        widget2 = new QWidget(tabMeasureResult);
+        widget2->setObjectName(QString::fromUtf8("widget2"));
+        widget2->setGeometry(QRect(370, 60, 151, 61));
+        horizontalLayout_2 = new QHBoxLayout(widget2);
+        horizontalLayout_2->setSpacing(6);
+        horizontalLayout_2->setMargin(11);
+        horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2"));
+        horizontalLayout_2->setContentsMargins(0, 0, 0, 0);
+        labelMeasureTabResultHeader_2 = new QLabel(widget2);
+        labelMeasureTabResultHeader_2->setObjectName(QString::fromUtf8("labelMeasureTabResultHeader_2"));
+
+        horizontalLayout_2->addWidget(labelMeasureTabResultHeader_2);
 
-        lineEdit = new QLineEdit(widget1);
-        lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
+        labelMeasureTabResult = new QLabel(widget2);
+        labelMeasureTabResult->setObjectName(QString::fromUtf8("labelMeasureTabResult"));
 
-        verticalLayout_2->addWidget(lineEdit);
+        horizontalLayout_2->addWidget(labelMeasureTabResult);
 
+        tabWidget->addTab(tabMeasureResult, QString());
+        layoutWidget3 = new QWidget(centralWidget);
+        layoutWidget3->setObjectName(QString::fromUtf8("layoutWidget3"));
+        layoutWidget3->setGeometry(QRect(10, 380, 781, 31));
+        horizontalLayout = new QHBoxLayout(layoutWidget3);
+        horizontalLayout->setSpacing(6);
+        horizontalLayout->setMargin(11);
+        horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
+        horizontalLayout->setContentsMargins(0, 0, 0, 0);
+        view1Button = new QPushButton(layoutWidget3);
+        view1Button->setObjectName(QString::fromUtf8("view1Button"));
+
+        horizontalLayout->addWidget(view1Button);
+
+        view2Button = new QPushButton(layoutWidget3);
+        view2Button->setObjectName(QString::fromUtf8("view2Button"));
+
+        horizontalLayout->addWidget(view2Button);
+
+        view3Button = new QPushButton(layoutWidget3);
+        view3Button->setObjectName(QString::fromUtf8("view3Button"));
+
+        horizontalLayout->addWidget(view3Button);
+
+        view4Button = new QPushButton(layoutWidget3);
+        view4Button->setObjectName(QString::fromUtf8("view4Button"));
+
+        horizontalLayout->addWidget(view4Button);
+
+        registratePushButton = new QPushButton(centralWidget);
+        registratePushButton->setObjectName(QString::fromUtf8("registratePushButton"));
+        registratePushButton->setGeometry(QRect(690, 0, 93, 27));
         CarMainWindow->setCentralWidget(centralWidget);
         menuBar = new QMenuBar(CarMainWindow);
         menuBar->setObjectName(QString::fromUtf8("menuBar"));
-        menuBar->setGeometry(QRect(0, 0, 800, 27));
+        menuBar->setGeometry(QRect(0, 0, 800, 25));
         CarMainWindow->setMenuBar(menuBar);
         mainToolBar = new QToolBar(CarMainWindow);
         mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
@@ -112,15 +341,44 @@ public:
 
         retranslateUi(CarMainWindow);
 
+        tabWidget->setCurrentIndex(3);
+
+
         QMetaObject::connectSlotsByName(CarMainWindow);
     } // setupUi
 
     void retranslateUi(QMainWindow *CarMainWindow)
     {
-        CarMainWindow->setWindowTitle(QApplication::translate("CarMainWindow", "CarMainWindow", 0, QApplication::UnicodeUTF8));
+        CarMainWindow->setWindowTitle(QApplication::translate("CarMainWindow", "Speed freak", 0, QApplication::UnicodeUTF8));
         autoStartButton->setText(QApplication::translate("CarMainWindow", "Auto start", 0, QApplication::UnicodeUTF8));
         manualStartButton->setText(QApplication::translate("CarMainWindow", "Manual start", 0, QApplication::UnicodeUTF8));
-        label->setText(QApplication::translate("CarMainWindow", "TextLabel", 0, QApplication::UnicodeUTF8));
+        startLabel->setText(QApplication::translate("CarMainWindow", "Start:", 0, QApplication::UnicodeUTF8));
+        stopLabel->setText(QApplication::translate("CarMainWindow", "Stop:", 0, QApplication::UnicodeUTF8));
+        unitLabel->setText(QApplication::translate("CarMainWindow", "Unit:", 0, QApplication::UnicodeUTF8));
+        tabWidget->setTabText(tabWidget->indexOf(StartTab), QApplication::translate("CarMainWindow", "Start", 0, QApplication::UnicodeUTF8));
+        buttonTopRefresh->setText(QApplication::translate("CarMainWindow", "Refresh list", 0, QApplication::UnicodeUTF8));
+        labelCategory->setText(QApplication::translate("CarMainWindow", "Category:", 0, QApplication::UnicodeUTF8));
+        labelTopList->setText(QApplication::translate("CarMainWindow", "TopList", 0, QApplication::UnicodeUTF8));
+        tabWidget->setTabText(tabWidget->indexOf(tabTop), QApplication::translate("CarMainWindow", "Top", 0, QApplication::UnicodeUTF8));
+        userNameLabel->setText(QApplication::translate("CarMainWindow", "User:", 0, QApplication::UnicodeUTF8));
+        setUserPushButton->setText(QApplication::translate("CarMainWindow", "Set User", 0, QApplication::UnicodeUTF8));
+        tabWidget->setTabText(tabWidget->indexOf(settingsTab), QApplication::translate("CarMainWindow", "Settings", 0, QApplication::UnicodeUTF8));
+        pushButtonMeasureTabAbort->setText(QApplication::translate("CarMainWindow", "Abort", 0, QApplication::UnicodeUTF8));
+        labelMeasureTabHeader->setText(QApplication::translate("CarMainWindow", "Accelerate to 40 km/h", 0, QApplication::UnicodeUTF8));
+        labelMeasureTabResultHeader->setText(QApplication::translate("CarMainWindow", "Results:", 0, QApplication::UnicodeUTF8));
+        pushButtonSendResult->setText(QApplication::translate("CarMainWindow", "Send result", 0, QApplication::UnicodeUTF8));
+        labelMeasureTabTimeHeader->setText(QApplication::translate("CarMainWindow", "Time:", 0, QApplication::UnicodeUTF8));
+        labelMeasureTabTime->setText(QApplication::translate("CarMainWindow", "0", 0, QApplication::UnicodeUTF8));
+        labelMeasureTabSpeedHeader->setText(QApplication::translate("CarMainWindow", "Speed:", 0, QApplication::UnicodeUTF8));
+        labelMeasureTabSpeed->setText(QApplication::translate("CarMainWindow", "0", 0, QApplication::UnicodeUTF8));
+        labelMeasureTabResultHeader_2->setText(QApplication::translate("CarMainWindow", "Time:", 0, QApplication::UnicodeUTF8));
+        labelMeasureTabResult->setText(QApplication::translate("CarMainWindow", "0", 0, QApplication::UnicodeUTF8));
+        tabWidget->setTabText(tabWidget->indexOf(tabMeasureResult), QApplication::translate("CarMainWindow", "Measure", 0, QApplication::UnicodeUTF8));
+        view1Button->setText(QApplication::translate("CarMainWindow", "View1", 0, QApplication::UnicodeUTF8));
+        view2Button->setText(QApplication::translate("CarMainWindow", "View2", 0, QApplication::UnicodeUTF8));
+        view3Button->setText(QApplication::translate("CarMainWindow", "View3", 0, QApplication::UnicodeUTF8));
+        view4Button->setText(QApplication::translate("CarMainWindow", "View4", 0, QApplication::UnicodeUTF8));
+        registratePushButton->setText(QApplication::translate("CarMainWindow", "Registrate", 0, QApplication::UnicodeUTF8));
         Q_UNUSED(CarMainWindow);
     } // retranslateUi
 
index d5a800a..ddcd2c8 100644 (file)
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading ui file 'resultdialog.ui'
 **
-** Created: Fri Mar 5 08:43:19 2010
+** Created: Mon Mar 8 14:37:37 2010
 **      by: Qt User Interface Compiler version 4.5.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling ui file!
@@ -17,6 +17,7 @@
 #include <QtGui/QDialog>
 #include <QtGui/QHeaderView>
 #include <QtGui/QLabel>
+#include <QtGui/QPushButton>
 
 QT_BEGIN_NAMESPACE
 
@@ -49,6 +50,7 @@ public:
     QLabel *labelXLine;
     QLabel *labelX10;
     QLabel *labelX4;
+    QPushButton *pushButtonSend;
 
     void setupUi(QDialog *ResultDialog)
     {
@@ -158,6 +160,9 @@ public:
         labelX4->setObjectName(QString::fromUtf8("labelX4"));
         labelX4->setGeometry(QRect(160, 350, 31, 17));
         labelX4->setFont(font);
+        pushButtonSend = new QPushButton(ResultDialog);
+        pushButtonSend->setObjectName(QString::fromUtf8("pushButtonSend"));
+        pushButtonSend->setGeometry(QRect(402, 330, 101, 27));
 
         retranslateUi(ResultDialog);
 
@@ -193,6 +198,7 @@ public:
         labelXLine->setText(QApplication::translate("ResultDialog", "X", 0, QApplication::UnicodeUTF8));
         labelX10->setText(QApplication::translate("ResultDialog", "10", 0, QApplication::UnicodeUTF8));
         labelX4->setText(QApplication::translate("ResultDialog", "4", 0, QApplication::UnicodeUTF8));
+        pushButtonSend->setText(QApplication::translate("ResultDialog", "Send results", 0, QApplication::UnicodeUTF8));
         Q_UNUSED(ResultDialog);
     } // retranslateUi