--- /dev/null
+# -------------------------------------------------
+# Project created by QtCreator 2010-02-23T14:17:30
+# -------------------------------------------------
+QT += network \
+ xml
+TARGET = UI
+TEMPLATE = app
+SOURCES += main.cpp \
+ carmainwindow.cpp \
+ resultdialog.cpp \
+ stringlistmodel.cpp \
+ measuredialog.cpp
+HEADERS += carmainwindow.h \
+ resultdialog.h \
+ stringlistmodel.h \
+ measuredialog.h
+FORMS += carmainwindow.ui \
+ resultdialog.ui \
+ measuredialog.ui
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>RunConfiguration0-BaseEnvironmentBase</variable>
+ <value type="int">2</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-CommandLineArguments</variable>
+ <valuelist type="QVariantList"/>
+ </data>
+ <data>
+ <variable>RunConfiguration0-ProFile</variable>
+ <value type="QString">UI.pro</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-RunConfiguration.name</variable>
+ <value type="QString">UI</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UseDyldImageSuffix</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UseTerminal</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserEnvironmentChanges</variable>
+ <valuelist type="QVariantList"/>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserSetName</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserSetWorkingDirectory</variable>
+ <value type="bool">false</value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-UserWorkingDirectory</variable>
+ <value type="QString"></value>
+ </data>
+ <data>
+ <variable>RunConfiguration0-type</variable>
+ <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+ </data>
+ <data>
+ <variable>activeRunConfiguration</variable>
+ <value type="int">0</value>
+ </data>
+ <data>
+ <variable>activebuildconfiguration</variable>
+ <value type="QString">Debug</value>
+ </data>
+ <data>
+ <variable>buildConfiguration-Debug</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="QtVersionId" type="int">0</value>
+ <value key="ToolChain" type="int">0</value>
+ <value key="addQDumper" type=""></value>
+ <value key="buildConfiguration" type="int">2</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildConfiguration-Release</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ <value key="QtVersionId" type="int">0</value>
+ <value key="addQDumper" type=""></value>
+ <value key="buildConfiguration" type="int">0</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-buildstep1</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Debug-cleanstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
+ <value key="cleanConfig" type="bool">true</value>
+ <valuelist key="makeargs" type="QVariantList">
+ <value type="QString">clean</value>
+ </valuelist>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-buildstep1</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfiguration-Release-cleanstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildconfigurations</variable>
+ <valuelist type="QVariantList">
+ <value type="QString">Debug</value>
+ <value type="QString">Release</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>buildstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+ <value key="mkspec" type="QString"></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildstep1</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>buildsteps</variable>
+ <valuelist type="QVariantList">
+ <value type="QString">trolltech.qt4projectmanager.qmake</value>
+ <value type="QString">trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>cleanstep0</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
+ <value key="clean" type="bool">true</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>cleansteps</variable>
+ <valuelist type="QVariantList">
+ <value type="QString">trolltech.qt4projectmanager.make</value>
+ </valuelist>
+ </data>
+ <data>
+ <variable>defaultFileEncoding</variable>
+ <value type="QByteArray">System</value>
+ </data>
+ <data>
+ <variable>project</variable>
+ <valuemap type="QVariantMap"/>
+ </data>
+</qtcreator>
--- /dev/null
+#include "accelerometer.h"
+#include "math.h"
+
+#include <QFile>
+#include <QString>
+#include <QRegExp>
+#include <QTimer>
+
+#define kFilteringFactor 0.1
+#define kGravity 9.81
+
+static int sampleIndex=0;
+
+Accelerometer::Accelerometer()
+{
+ QTimer *timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(processData()));
+ sampleRate = 100;
+ timer->start(sampleRate);
+ now.restart();
+
+ initValues();
+}
+
+Accelerometer::~Accelerometer() {
+}
+
+void Accelerometer::start() {
+ timer->start(sampleRate);
+ now.restart();
+}
+
+void Accelerometer::initValues() {
+ accelerationX=0;
+ accelerationY=0;
+ accelerationZ=0;
+ trueAccelerationX=0;
+ trueAccelerationY=0;
+ trueAccelerationZ=0;
+ previousAccelerationX=0;
+ previousAccelerationY=0;
+ previousAccelerationZ=0;
+ previousSpeed=0;
+ currentSpeed=0;
+ currentAcceleration=0;
+ previousAcceleration=0;
+ totalAcceleration=0;
+ intervalTime=0;
+ totalTime=0;
+ distanceTraveled=0;
+ lastDistanceTraveled=0;
+ averageSpeed=0;
+ sampleRate=0;
+}
+
+void Accelerometer::stop() {
+ timer->stop();
+}
+
+void Accelerometer::setSampleRate(int pSampleRate) {
+ sampleRate = pSampleRate;
+}
+
+int Accelerometer::getSampleRate() {
+ return sampleRate;
+}
+
+qreal Accelerometer::getCurrentAcceleration() {
+ return currentAcceleration;
+}
+
+qreal Accelerometer::getPreviousTotalAcceleration() {
+ return previousAcceleration;
+}
+
+qreal Accelerometer::getTotalAcceleration() {
+ return totalAcceleration;
+}
+
+qreal Accelerometer::getDistanceTraveled() {
+ return distanceTraveled;
+}
+
+qreal Accelerometer::getLastDistanceTraveled() {
+ return lastDistanceTraveled;
+}
+
+qreal Accelerometer::getAverageSpeed() {
+ return averageSpeed;
+}
+
+qreal Accelerometer::getTrueAccelerationX() {
+ return trueAccelerationX;
+}
+
+qreal Accelerometer::getTrueAccelerationY() {
+ return trueAccelerationY;
+}
+
+qreal Accelerometer::getTrueAccelerationZ() {
+ return trueAccelerationZ;
+}
+
+qreal Accelerometer::getPreviousSpeed() {
+ return previousSpeed;
+}
+
+qreal Accelerometer::getCurrentSpeed() {
+ return currentSpeed;
+}
+
+qreal Accelerometer::getintervalTime() {
+ return intervalTime;
+}
+
+/**
+ * Processes Accelerometer data
+ *
+ */
+void Accelerometer::processData()
+{
+ QFile file("/sys/class/i2c-adapter/i2c-3/3-001d/coord");
+ if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+ return;
+
+ // Read data, parse with regular expressions and process it
+ QByteArray line = file.readLine();
+ QRegExp rx("([0-9-]+) ([0-9-]+) ([0-9-]+)");
+ rx.indexIn(line);
+
+ smoothData(rx.cap(1).toInt(), rx.cap(2).toInt(), rx.cap(3).toInt());
+
+ trueAccelerationX = (accelerationX - previousAccelerationX)/1000*kGravity;
+ trueAccelerationY = (accelerationY - previousAccelerationY)/1000*kGravity;
+ trueAccelerationZ = (accelerationZ - previousAccelerationZ)/1000*kGravity;
+
+ previousAccelerationX = accelerationX;
+ previousAccelerationY = accelerationY;
+ previousAccelerationZ = accelerationZ;
+
+ currentAcceleration = sqrt(trueAccelerationX * trueAccelerationX +
+ trueAccelerationY * trueAccelerationY +
+ trueAccelerationZ * trueAccelerationZ );
+
+ totalAcceleration = currentAcceleration - previousAcceleration;
+
+ totalAcceleration = fabs(totalAcceleration);
+
+ previousAcceleration = currentAcceleration;
+
+ // v = v0 + at
+ // x = x0 + v0t + (at^2)/2
+ // v = (v + v0)/2
+
+ intervalTime = now.restart();
+ intervalTime = intervalTime/1000; // millisecs to secs
+ totalTime = totalTime + intervalTime;
+
+ // filter noise
+ // TODO: do this in smoothdata: implement a better filter.
+ if (totalAcceleration > 0.02) {
+ currentSpeed = ( previousSpeed + ( totalAcceleration * intervalTime ) / 2 );
+ } else {
+ currentSpeed = 0;
+ }
+
+ // filter noise
+ if (currentSpeed > 0.02) {
+ distanceTraveled = ( lastDistanceTraveled + ( ( currentSpeed + previousSpeed ) * intervalTime) / 2 );
+ } else {
+ //distanceTraveled = 0;
+ }
+
+ averageSpeed = distanceTraveled / totalTime;
+
+ previousSpeed = currentSpeed;
+ lastDistanceTraveled = distanceTraveled;
+
+ file.close();
+}
+
+/**
+ * Smooths Accelerometer data
+ *
+ * @param x Accelerometers x-axis raw input
+ * @param y Accelerometers y-axis raw input
+ * @param z Accelerometers z-axis raw input
+ */
+void Accelerometer::smoothData(qreal x, qreal y, qreal z) {
+ accelerationX = x;
+ accelerationY = y;
+ accelerationZ = z;
+ if(sampleIndex>0) {
+ accelerationX = previousAccelerationX + (accelerationX-previousAccelerationX) * kFilteringFactor;
+ accelerationY = previousAccelerationY + (accelerationY-previousAccelerationY) * kFilteringFactor;
+ accelerationZ = previousAccelerationZ + (accelerationZ-previousAccelerationZ) * kFilteringFactor;
+ }
+ sampleIndex++;
+}
--- /dev/null
+#ifndef ACCELEROMETER_H
+#define ACCELEROMETER_H
+
+#include <QObject>
+#include <QTime>
+#include <QTimer>
+
+class Accelerometer : public QObject
+{
+ Q_OBJECT
+public:
+ Accelerometer();
+ ~Accelerometer();
+
+ void start();
+ void stop();
+
+ void initValues();
+
+ void setSampleRate(int pSampleRate);
+ int getSampleRate();
+
+ qreal getTrueAccelerationX();
+ qreal getTrueAccelerationY();
+ qreal getTrueAccelerationZ();
+ qreal getPreviousSpeed();
+ qreal getCurrentSpeed();
+
+ qreal getDistanceTraveled();
+ qreal getLastDistanceTraveled();
+ qreal getAverageSpeed();
+
+ qreal getCurrentAcceleration();
+ qreal getTotalAcceleration();
+ qreal getPreviousTotalAcceleration();
+
+ qreal getintervalTime();
+
+private slots:
+ void processData();
+ void smoothData(qreal x, qreal y, qreal z);
+
+private:
+ qreal accelerationX, accelerationY, accelerationZ;
+ qreal trueAccelerationX,trueAccelerationY,trueAccelerationZ;
+ qreal previousAccelerationX,previousAccelerationY,previousAccelerationZ;
+ qreal previousSpeed, currentSpeed;
+ qreal currentAcceleration, previousAcceleration, totalAcceleration;
+ QTime now;
+ QTimer *timer;
+ double intervalTime;
+ double totalTime;
+ double distanceTraveled,lastDistanceTraveled,averageSpeed;
+ double sampleRate;
+};
+
+#endif // ACCELEROMETER_H
--- /dev/null
+#include "calculate.h"
+#include <math.h>
+
+#include <QFile>
+#include <QString>
+#include <QTimer>
+#include <QRegExp>
+
+const double G_ACCELERATION = 9.80665;
+const double SECONDS_IN_HOUR = 3600;
+
+Calculate::Calculate() {
+
+ this->reset();
+
+}
+
+Calculate::~Calculate() {
+}
+
+void Calculate::reset() {
+
+ averageSpeed = 0;
+ currentSpeed = 0;
+ distanceTraveled = 0;
+ lastAcceleration = 0;
+ lastDistance = 0;
+ lastSpeed = 0;
+ numOfIterations = 0;
+ totalTime = 0;
+}
+
+/* Getters and setters
+ */
+
+double Calculate::AverageSpeed()
+{
+ return averageSpeed;
+}
+void Calculate::AverageSpeed(double value)
+{
+ averageSpeed = value;
+}
+double Calculate::CurrentSpeed()
+{
+ return currentSpeed;
+}
+void Calculate::CurrentSpeed(double value)
+{
+ currentSpeed = value;
+}
+double Calculate::DistanceTraveled()
+{
+ return distanceTraveled;
+}
+void Calculate::DistanceTraveled(double value)
+{
+ distanceTraveled = value;
+}
+double Calculate::LastAcceleration()
+{
+ return lastAcceleration;
+}
+void Calculate::LastAcceleration(double value)
+{
+ lastAcceleration = value;
+}
+double Calculate::LastDistance()
+{
+ return lastDistance;
+}
+void Calculate::LastDistance(double value)
+{
+ lastDistance = value;
+}
+double Calculate::LastSpeed()
+{
+ return lastSpeed;
+}
+void Calculate::LastSpeed(double value)
+{
+ lastSpeed = value;
+}
+long Calculate::NumOfIterations()
+{
+ return numOfIterations;
+}
+void Calculate::NumOfIterations(long value)
+{
+ numOfIterations = value;
+}
+double Calculate::TotalTime()
+{
+ return totalTime;
+}
+void Calculate::TotalTime(double value)
+{
+ totalTime = value;
+}
+
+/*
+ This is a main function for calculating various parameters. Accelerometer
+ provides currentAcceleration and calling function measures time (seconds).
+ This function should be called 20-30 times/second to minimize
+ calculation error.
+
+ To be added: params like horsepower.
+ */
+void Calculate::CalculateParameters(double currentAcceleration, double seconds)
+{
+ numOfIterations++;
+ totalTime = (totalTime + seconds);
+
+ // v=v0 + a*t
+ // v(n) = v(n-1)+(a(n) + a(n-1))*(seconds)/2
+
+ /* First integration of acceleration provides speed
+ */
+ currentSpeed = (lastSpeed + (((currentAcceleration + lastAcceleration) * seconds) / 2));
+
+ /* Second integration: distance.
+ */
+ distanceTraveled = (lastDistance + (((currentSpeed + lastSpeed) * seconds) / 2));
+
+ /* Average speed
+ */
+ averageSpeed = (distanceTraveled / totalTime);
+
+ lastSpeed = currentSpeed;
+ lastAcceleration = currentAcceleration;
+ lastDistance = distanceTraveled;
+}
+
+
+
+
+
+
--- /dev/null
+#ifndef CALCULATE_H
+#define CALCULATE_H
+
+#include <QObject>
+#include <QTime>
+
+class Calculate : public QObject
+{
+ Q_OBJECT
+
+public:
+ Calculate();
+ ~Calculate();
+
+ void reset();
+ void CalculateParameters(double currentAcceleration, double seconds);
+
+ double AverageSpeed();
+ void AverageSpeed(double value);
+
+ double CurrentSpeed();
+ void CurrentSpeed(double value);
+
+ double DistanceTraveled();
+ void DistanceTraveled(double value);
+
+ double LastAcceleration();
+ void LastAcceleration(double value);
+
+ double LastCheckpoint();
+ void LastCheckpoint(double value);
+
+ double LastDistance();
+ void LastDistance(double value);
+
+ double LastSpeed();
+ void LastSpeed(double value);
+
+ long NumOfIterations();
+ void NumOfIterations(long value);
+
+ double TotalTime();
+ void TotalTime(double value);
+
+private:
+ double averageSpeed;
+ double currentSpeed;
+ double distanceTraveled;
+ double lastAcceleration;
+ double lastCheckpoint;
+ double lastDistance;
+ double lastSpeed;
+ long numOfIterations;
+ double totalTime;
+
+
+};
+
+#endif // CALCULATE_H
--- /dev/null
+#include "carmainwindow.h"
+#include "ui_carmainwindow.h"
+#include "stringlistmodel.h"
+#include <QStandardItemModel>
+#include <QStringList>
+#include <QString>
+
+/**
+ *Constructor of this class.
+ *@param QWidget pointer to parent object. By default the value is NULL.
+ */
+CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::CarMainWindow)
+{
+ ui->setupUi(this);
+ result = new ResultDialog();
+ measure = new MeasureDialog();
+
+ initUnitCompoBox();
+ initSpeedListView();
+}
+
+/**
+ *Destructor of this class. Should be used to release all allocated resources.
+ */
+CarMainWindow::~CarMainWindow()
+{
+ delete ui;
+}
+
+/**
+ *This function is used to .
+ *@param
+ */
+void CarMainWindow::changeEvent(QEvent *e)
+{
+ QMainWindow::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ *This slot function is called when ever list view is update.
+ *@param QModelIndex index.
+ */
+void CarMainWindow::on_listView_clicked(QModelIndex index)
+{
+ QString str = index.data().toString();
+ QStringList list = str.split("-");
+ QStringList list2 = list[1].split(" ");
+
+ ui->minLineEdit->setText(list[0]);
+ ui->maxLineEdit->setText(list2[0]);
+ updateUnitCompoBox(list2[1]);
+}
+
+/**
+ *This slot function is called when ever auto start button clicked.
+ */
+void CarMainWindow::on_autoStartButton_clicked()
+{
+ result->show();
+}
+
+/**
+ *This slot function is called when ever list view is update.
+ *@param QString unit.
+ */
+void CarMainWindow::updateUnitCompoBox(QString unit)
+{
+ ui->unitComboBox->setCurrentIndex(ui->unitComboBox->findText(unit, Qt::MatchExactly));
+}
+
+/**
+ *This function is used to init combobox.
+ */
+void CarMainWindow::initUnitCompoBox()
+{
+ units << "km/h" << "km" << "h" << "m" << "min" << "mil" << "in" << "ft" << "yrd";
+ ui->unitComboBox->addItems(units);
+}
+
+/**
+ *This function is used to init listview.
+ */
+void CarMainWindow::initSpeedListView()
+{
+ numbers << "0-100 km/h" << "0-1/4 mil" << "0-50 km" << "50-100 mil" << "0-100 m" << "0-50 ft" << "0-50 yrd" << "0-500 in";
+ QAbstractItemModel *model = new StringListModel(numbers);
+ ui->listView->setModel(model);
+}
--- /dev/null
+#ifndef CARMAINWINDOW_H
+#define CARMAINWINDOW_H
+
+/**
+ *This class
+ *@author Toni Jussila
+ *@version 0.0.1
+ */
+
+#include <QMainWindow>
+#include "resultdialog.h"
+#include "measuredialog.h"
+#include <QModelIndex>
+
+namespace Ui {
+ class CarMainWindow;
+}
+
+class CarMainWindow : public QMainWindow {
+ Q_OBJECT
+public:
+ CarMainWindow(QWidget *parent = 0);
+ ~CarMainWindow();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::CarMainWindow *ui;
+ ResultDialog *result;
+ void initUnitCompoBox();
+ void initSpeedListView();
+ MeasureDialog *measure;
+
+
+private:
+ QStringList numbers;
+ QStringList units;
+
+private slots:
+ void on_autoStartButton_clicked();
+ void on_listView_clicked(QModelIndex index);
+ void updateUnitCompoBox(QString unit);
+};
+
+#endif // CARMAINWINDOW_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>CarMainWindow</class>
+ <widget class="QMainWindow" name="CarMainWindow">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>CarMainWindow</string>
+ </property>
+ <widget class="QWidget" name="centralWidget">
+ <widget class="QTabWidget" name="tabWidget">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>0</y>
+ <width>781</width>
+ <height>365</height>
+ </rect>
+ </property>
+ <property name="currentIndex">
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="StartTab">
+ <attribute name="title">
+ <string>Start</string>
+ </attribute>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>590</x>
+ <y>220</y>
+ <width>171</width>
+ <height>91</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QPushButton" name="autoStartButton">
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>16</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Auto start</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="manualStartButton">
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>16</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Manual start</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QListView" name="listView">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>10</y>
+ <width>261</width>
+ <height>301</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QWidget" name="">
+ <property name="geometry">
+ <rect>
+ <x>270</x>
+ <y>10</y>
+ <width>311</width>
+ <height>301</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="startLabel">
+ <property name="text">
+ <string>Start:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="minLineEdit"/>
+ </item>
+ <item>
+ <widget class="QLabel" name="stopLabel">
+ <property name="text">
+ <string>Stop:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="maxLineEdit"/>
+ </item>
+ <item>
+ <widget class="QLabel" name="unitLabel">
+ <property name="text">
+ <string>Unit:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="unitComboBox"/>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="settingsTab">
+ <attribute name="title">
+ <string>Settings</string>
+ </attribute>
+ </widget>
+ </widget>
+ <widget class="QWidget" name="">
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>370</y>
+ <width>781</width>
+ <height>41</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="view1Button">
+ <property name="text">
+ <string>View1</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="view2Button">
+ <property name="text">
+ <string>View2</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="view3Button">
+ <property name="text">
+ <string>View3</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="view4Button">
+ <property name="text">
+ <string>View4</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ <widget class="QMenuBar" name="menuBar">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>27</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QToolBar" name="mainToolBar">
+ <attribute name="toolBarArea">
+ <enum>TopToolBarArea</enum>
+ </attribute>
+ <attribute name="toolBarBreak">
+ <bool>false</bool>
+ </attribute>
+ </widget>
+ <widget class="QStatusBar" name="statusBar"/>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+#include <QtGui/QApplication>
+#include <QStyleFactory>
+#include "carmainwindow.h"
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ CarMainWindow w;
+ w.show();
+ return a.exec();
+}
--- /dev/null
+#include "measuredialog.h"
+#include "ui_measuredialog.h"
+
+MeasureDialog::MeasureDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::MeasureDialog)
+{
+ ui->setupUi(this);
+}
+
+MeasureDialog::~MeasureDialog()
+{
+ delete ui;
+}
+
+void MeasureDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
--- /dev/null
+#ifndef MEASUREDIALOG_H
+#define MEASUREDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+ class MeasureDialog;
+}
+
+class MeasureDialog : public QDialog {
+ Q_OBJECT
+public:
+ MeasureDialog(QWidget *parent = 0);
+ ~MeasureDialog();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::MeasureDialog *ui;
+};
+
+#endif // MEASUREDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>MeasureDialog</class>
+ <widget class="QDialog" name="MeasureDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <widget class="QLabel" name="label_7">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>40</y>
+ <width>361</width>
+ <height>51</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Selected measurement: 0 - 100 km/h</string>
+ </property>
+ </widget>
+ <widget class="QWidget" name="layoutWidget">
+ <property name="geometry">
+ <rect>
+ <x>110</x>
+ <y>120</y>
+ <width>271</width>
+ <height>151</height>
+ </rect>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Time:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Speed:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Distance:</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>14 s</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>86 km/h</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>120 m</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QPushButton" name="pushButtonAbort">
+ <property name="geometry">
+ <rect>
+ <x>200</x>
+ <y>300</y>
+ <width>93</width>
+ <height>27</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Abort</string>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+#include "resultdialog.h"
+#include "ui_resultdialog.h"
+#include <QPainter>
+
+const QPoint diagramStemStart(50, 350);
+const QPoint diagramStemEnd(50, 30);
+
+const QPoint diagramHorizontalStart(50, 350);
+const QPoint diagramHorizontalEnd(450, 350);
+
+const int diagramGap = 30;
+
+
+// Test arrays for changing speeds and times to the points in diagram
+static const int speedArray[10] = {12, 34, 56, 78, 90, 100, 104, 100, 90, 80};
+static const int timeArray[10] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 12};
+
+
+
+// Test point array for the diagram.
+QPoint points[10];
+
+ResultDialog::ResultDialog(QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::ResultDialog)
+{
+ ui->setupUi(this);
+
+ QString time, timeInteger;
+ timeInteger.setNum(timeArray[9]);
+ time = "0 - 100 km/h: ";
+ time.append(timeInteger);
+ ui->labelResult->setText(time);
+
+ timeInteger.setNum(timeArray[8]);
+ time = "0 - 90 km/h: ";
+ time.append(timeInteger);
+ ui->labelResult_2->setText(time);
+
+ timeInteger.setNum(timeArray[7]);
+ time = "0 - 80 km/h: ";
+ time.append(timeInteger);
+ ui->labelResult_3->setText(time);
+
+ timeInteger.setNum(timeArray[6]);
+ time = "0 - 70 km/h: ";
+ time.append(timeInteger);
+ ui->labelResult_4->setText(time);
+
+ timeInteger.setNum(timeArray[5]);
+ time = "0 - 60 km/h: ";
+ time.append(timeInteger);
+ ui->labelResult_5->setText(time);
+
+ timeInteger.setNum(timeArray[4]);
+ time = "0 - 50 km/h: ";
+ time.append(timeInteger);
+ ui->labelResult_6->setText(time);
+
+ timeInteger.setNum(timeArray[3]);
+ time = "0 - 40 km/h: ";
+ time.append(timeInteger);
+ ui->labelResult_7->setText(time);
+
+ for(int i = 0; i < 10; i++)
+ {
+ points[i] = changeMeasuresToDiagramPoint(speedArray[i], timeArray[i]);
+ }
+ // ui->labelXLine->setText(ui->labelXLine->text().append(": time/ s"));
+ // ui->labelYLine->setText(ui->labelYLine->text().append(": speed/ km/h"));
+}
+
+ResultDialog::~ResultDialog()
+{
+ delete ui;
+}
+
+void ResultDialog::changeEvent(QEvent *e)
+{
+ QDialog::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * Draws speed diagram to the UI
+ *
+ */
+void ResultDialog::paintEvent(QPaintEvent *)
+{
+ QPainter painter(this);
+
+ painter.setRenderHint(QPainter::Antialiasing, true);
+ painter.setPen(QPen((Qt::white),2));
+ painter.setBrush(QBrush((Qt::yellow), Qt::SolidPattern));
+ painter.drawLine(diagramStemStart, diagramStemEnd);
+ painter.drawLine(diagramHorizontalStart, diagramHorizontalEnd);
+
+ int currentX = diagramStemStart.x();
+ int currentY = diagramStemStart.y();
+
+ // Draws diagram's X-axel
+ for(int i = 0; i<13; i++)
+ {
+ currentX += diagramGap;
+ painter.drawLine(currentX, currentY, currentX, currentY - 10);
+ }
+
+ currentX = diagramStemStart.x();
+ currentY = diagramStemStart.y();
+
+ // Draws diagram's Y-axel
+ for(int i = 0; i<10; i++)
+ {
+ currentY -= diagramGap;
+ painter.drawLine(currentX, currentY, currentX+10, currentY);
+ }
+
+ painter.drawPolyline(points, 10);
+
+}
+
+/**
+ *Change the given speed and time to the point for the diagram.
+ *@param aSpeed is speed which need to change, aTime is time in seconds which need to change.
+ *@return point is calculated from aSpeed and aTime.
+ **/
+QPoint ResultDialog::changeMeasuresToDiagramPoint(int aSpeed, int aTime)
+{
+ QPoint point;
+
+ int speedAsPixels;
+ int timeAsPixels;
+ speedAsPixels = 300*aSpeed/100;
+ timeAsPixels = 300*aTime/10;
+ point.setY(diagramStemStart.y()-speedAsPixels);
+ point.setX(diagramStemStart.x()+timeAsPixels);
+
+ return point;
+}
--- /dev/null
+#ifndef RESULTDIALOG_H
+#define RESULTDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+ class ResultDialog;
+}
+
+class ResultDialog : public QDialog {
+ Q_OBJECT
+public:
+ ResultDialog(QWidget *parent = 0);
+ ~ResultDialog();
+
+protected:
+ void changeEvent(QEvent *e);
+ void paintEvent(QPaintEvent *);
+
+private:
+ QPoint changeMeasuresToDiagramPoint(int aSpeed, int aTime);
+
+private:
+ Ui::ResultDialog *ui;
+};
+
+#endif // RESULTDIALOG_H
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ResultDialog</class>
+ <widget class="QDialog" name="ResultDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>480</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Dialog</string>
+ </property>
+ <widget class="QLabel" name="labelResult_4">
+ <property name="geometry">
+ <rect>
+ <x>520</x>
+ <y>120</y>
+ <width>191</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>0 - 50 km/h: 5,6 s</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelResult_7">
+ <property name="geometry">
+ <rect>
+ <x>520</x>
+ <y>240</y>
+ <width>191</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>0 - 20 km/h: 1,1 s</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelResult">
+ <property name="geometry">
+ <rect>
+ <x>520</x>
+ <y>10</y>
+ <width>191</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>0 - 100 km/h: 9,8 s</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelResult_6">
+ <property name="geometry">
+ <rect>
+ <x>520</x>
+ <y>200</y>
+ <width>191</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>0 - 30 km/h: 3,2 s</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelResult_5">
+ <property name="geometry">
+ <rect>
+ <x>520</x>
+ <y>160</y>
+ <width>191</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>0 - 40 km/h:4,5 s</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelResult_3">
+ <property name="geometry">
+ <rect>
+ <x>520</x>
+ <y>80</y>
+ <width>191</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>0 - 60 km/h: 6,9 s</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelResult_2">
+ <property name="geometry">
+ <rect>
+ <x>520</x>
+ <y>40</y>
+ <width>191</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>0 - 80 km/h: 8,6 s</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY2">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>280</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>20</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY6">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>160</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>60</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY1">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>310</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>10</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY10">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>40</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>100</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY3">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>250</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>30</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelYLine">
+ <property name="geometry">
+ <rect>
+ <x>5</x>
+ <y>10</y>
+ <width>171</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY4">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>220</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>40</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY7">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>130</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>70</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY8">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>100</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>80</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY5">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>190</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>50</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelY9">
+ <property name="geometry">
+ <rect>
+ <x>20</x>
+ <y>70</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>90</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX1">
+ <property name="geometry">
+ <rect>
+ <x>70</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX3">
+ <property name="geometry">
+ <rect>
+ <x>130</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>3</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX5">
+ <property name="geometry">
+ <rect>
+ <x>190</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>5</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX9">
+ <property name="geometry">
+ <rect>
+ <x>310</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>9</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX7">
+ <property name="geometry">
+ <rect>
+ <x>250</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>7</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX2">
+ <property name="geometry">
+ <rect>
+ <x>100</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>2</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX6">
+ <property name="geometry">
+ <rect>
+ <x>220</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>6</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX8">
+ <property name="geometry">
+ <rect>
+ <x>280</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>8</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelXLine">
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>360</y>
+ <width>170</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX10">
+ <property name="geometry">
+ <rect>
+ <x>340</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>10</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="labelX4">
+ <property name="geometry">
+ <rect>
+ <x>160</x>
+ <y>350</y>
+ <width>31</width>
+ <height>17</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <family>Bitstream Charter</family>
+ <pointsize>8</pointsize>
+ </font>
+ </property>
+ <property name="text">
+ <string>4</string>
+ </property>
+ </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
--- /dev/null
+#include "stringlistmodel.h"
+
+int StringListModel::rowCount(const QModelIndex &parent) const
+{
+ return stringList.count();
+}
+
+QVariant StringListModel::data(const QModelIndex &index, int role) const
+{
+ if (!index.isValid())
+ return QVariant();
+
+ if (index.row() < 0 || index.row() >= stringList.size())
+ return QVariant();
+
+ if (role == Qt::DisplayRole)
+ return stringList.at(index.row());
+ else
+ return QVariant();
+}
+QVariant StringListModel::headerData(int section, Qt::Orientation orientation, int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ if (orientation == Qt::Horizontal)
+ return QString("Column %1").arg(section);
+ else
+ return QString("Row %1").arg(section);
+}
--- /dev/null
+#ifndef STRINGLISTMODEL_H
+#define STRINGLISTMODEL_H
+#include <QAbstractListModel>
+#include <QObject>
+#include <QStringList>
+
+class StringListModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ StringListModel(const QStringList &strings, QObject *parent = 0):QAbstractListModel(parent), stringList(strings) {}
+ int rowCount(const QModelIndex &parent = QModelIndex()) const;
+ QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+
+private:
+ QStringList stringList;
+};
+
+#endif // STRINGLISTMODEL_H
--- /dev/null
+/********************************************************************************
+** Form generated from reading ui file 'carmainwindow.ui'
+**
+** Created: Wed Feb 24 13:07:28 2010
+** by: Qt User Interface Compiler version 4.5.3
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef UI_CARMAINWINDOW_H
+#define UI_CARMAINWINDOW_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+#include <QtGui/QLineEdit>
+#include <QtGui/QListView>
+#include <QtGui/QMainWindow>
+#include <QtGui/QMenuBar>
+#include <QtGui/QPushButton>
+#include <QtGui/QStatusBar>
+#include <QtGui/QToolBar>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_CarMainWindow
+{
+public:
+ QWidget *centralWidget;
+ QListView *listView;
+ QWidget *widget;
+ QVBoxLayout *verticalLayout;
+ QPushButton *autoStartButton;
+ QPushButton *manualStartButton;
+ QWidget *widget1;
+ QVBoxLayout *verticalLayout_2;
+ QLabel *label;
+ QLineEdit *lineEdit;
+ QMenuBar *menuBar;
+ QToolBar *mainToolBar;
+ QStatusBar *statusBar;
+
+ void setupUi(QMainWindow *CarMainWindow)
+ {
+ if (CarMainWindow->objectName().isEmpty())
+ CarMainWindow->setObjectName(QString::fromUtf8("CarMainWindow"));
+ 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);
+ verticalLayout->setSpacing(6);
+ verticalLayout->setMargin(11);
+ verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
+ verticalLayout->setContentsMargins(0, 0, 0, 0);
+ autoStartButton = new QPushButton(widget);
+ autoStartButton->setObjectName(QString::fromUtf8("autoStartButton"));
+ QFont font;
+ font.setFamily(QString::fromUtf8("Bitstream Charter"));
+ font.setPointSize(16);
+ font.setBold(true);
+ font.setWeight(75);
+ autoStartButton->setFont(font);
+
+ verticalLayout->addWidget(autoStartButton);
+
+ manualStartButton = new QPushButton(widget);
+ 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);
+ 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"));
+
+ verticalLayout_2->addWidget(label);
+
+ lineEdit = new QLineEdit(widget1);
+ lineEdit->setObjectName(QString::fromUtf8("lineEdit"));
+
+ verticalLayout_2->addWidget(lineEdit);
+
+ CarMainWindow->setCentralWidget(centralWidget);
+ menuBar = new QMenuBar(CarMainWindow);
+ menuBar->setObjectName(QString::fromUtf8("menuBar"));
+ menuBar->setGeometry(QRect(0, 0, 800, 27));
+ CarMainWindow->setMenuBar(menuBar);
+ mainToolBar = new QToolBar(CarMainWindow);
+ mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
+ CarMainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
+ statusBar = new QStatusBar(CarMainWindow);
+ statusBar->setObjectName(QString::fromUtf8("statusBar"));
+ CarMainWindow->setStatusBar(statusBar);
+
+ retranslateUi(CarMainWindow);
+
+ QMetaObject::connectSlotsByName(CarMainWindow);
+ } // setupUi
+
+ void retranslateUi(QMainWindow *CarMainWindow)
+ {
+ CarMainWindow->setWindowTitle(QApplication::translate("CarMainWindow", "CarMainWindow", 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));
+ Q_UNUSED(CarMainWindow);
+ } // retranslateUi
+
+};
+
+namespace Ui {
+ class CarMainWindow: public Ui_CarMainWindow {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_CARMAINWINDOW_H
--- /dev/null
+/********************************************************************************
+** Form generated from reading ui file 'resultdialog.ui'
+**
+** Created: Wed Feb 24 13:07:28 2010
+** by: Qt User Interface Compiler version 4.5.3
+**
+** WARNING! All changes made in this file will be lost when recompiling ui file!
+********************************************************************************/
+
+#ifndef UI_RESULTDIALOG_H
+#define UI_RESULTDIALOG_H
+
+#include <QtCore/QVariant>
+#include <QtGui/QAction>
+#include <QtGui/QApplication>
+#include <QtGui/QButtonGroup>
+#include <QtGui/QDialog>
+#include <QtGui/QHeaderView>
+#include <QtGui/QLabel>
+
+QT_BEGIN_NAMESPACE
+
+class Ui_ResultDialog
+{
+public:
+ QLabel *labelResult_4;
+ QLabel *labelResult_7;
+ QLabel *labelResult;
+ QLabel *labelResult_6;
+ QLabel *labelResult_5;
+ QLabel *labelResult_3;
+ QLabel *labelResult_2;
+ QLabel *labelY2;
+ QLabel *labelY6;
+ QLabel *labelY1;
+ QLabel *labelY10;
+ QLabel *labelY3;
+ QLabel *labelYLine;
+ QLabel *labelY4;
+ QLabel *labelY7;
+ QLabel *labelY8;
+ QLabel *labelY5;
+ QLabel *labelY9;
+ QLabel *labelX1;
+ QLabel *labelX3;
+ QLabel *labelX5;
+ QLabel *labelX9;
+ QLabel *labelX7;
+ QLabel *labelX2;
+ QLabel *labelX6;
+ QLabel *labelX8;
+ QLabel *labelXLine;
+ QLabel *labelX10;
+ QLabel *labelX4;
+
+ void setupUi(QDialog *ResultDialog)
+ {
+ if (ResultDialog->objectName().isEmpty())
+ ResultDialog->setObjectName(QString::fromUtf8("ResultDialog"));
+ ResultDialog->resize(800, 480);
+ labelResult_4 = new QLabel(ResultDialog);
+ labelResult_4->setObjectName(QString::fromUtf8("labelResult_4"));
+ labelResult_4->setGeometry(QRect(520, 120, 191, 31));
+ labelResult_7 = new QLabel(ResultDialog);
+ labelResult_7->setObjectName(QString::fromUtf8("labelResult_7"));
+ labelResult_7->setGeometry(QRect(520, 240, 191, 31));
+ labelResult = new QLabel(ResultDialog);
+ labelResult->setObjectName(QString::fromUtf8("labelResult"));
+ labelResult->setGeometry(QRect(520, 10, 191, 31));
+ labelResult_6 = new QLabel(ResultDialog);
+ labelResult_6->setObjectName(QString::fromUtf8("labelResult_6"));
+ labelResult_6->setGeometry(QRect(520, 200, 191, 31));
+ labelResult_5 = new QLabel(ResultDialog);
+ labelResult_5->setObjectName(QString::fromUtf8("labelResult_5"));
+ labelResult_5->setGeometry(QRect(520, 160, 191, 31));
+ labelResult_3 = new QLabel(ResultDialog);
+ labelResult_3->setObjectName(QString::fromUtf8("labelResult_3"));
+ labelResult_3->setGeometry(QRect(520, 80, 191, 31));
+ labelResult_2 = new QLabel(ResultDialog);
+ labelResult_2->setObjectName(QString::fromUtf8("labelResult_2"));
+ labelResult_2->setGeometry(QRect(520, 40, 191, 31));
+ labelY2 = new QLabel(ResultDialog);
+ labelY2->setObjectName(QString::fromUtf8("labelY2"));
+ labelY2->setGeometry(QRect(20, 280, 31, 17));
+ QFont font;
+ font.setFamily(QString::fromUtf8("Bitstream Charter"));
+ font.setPointSize(8);
+ labelY2->setFont(font);
+ labelY6 = new QLabel(ResultDialog);
+ labelY6->setObjectName(QString::fromUtf8("labelY6"));
+ labelY6->setGeometry(QRect(20, 160, 31, 17));
+ labelY6->setFont(font);
+ labelY1 = new QLabel(ResultDialog);
+ labelY1->setObjectName(QString::fromUtf8("labelY1"));
+ labelY1->setGeometry(QRect(20, 310, 31, 17));
+ labelY1->setFont(font);
+ labelY10 = new QLabel(ResultDialog);
+ labelY10->setObjectName(QString::fromUtf8("labelY10"));
+ labelY10->setGeometry(QRect(20, 40, 31, 17));
+ labelY10->setFont(font);
+ labelY3 = new QLabel(ResultDialog);
+ labelY3->setObjectName(QString::fromUtf8("labelY3"));
+ labelY3->setGeometry(QRect(20, 250, 31, 17));
+ labelY3->setFont(font);
+ labelYLine = new QLabel(ResultDialog);
+ labelYLine->setObjectName(QString::fromUtf8("labelYLine"));
+ labelYLine->setGeometry(QRect(5, 10, 171, 17));
+ labelYLine->setFont(font);
+ labelY4 = new QLabel(ResultDialog);
+ labelY4->setObjectName(QString::fromUtf8("labelY4"));
+ labelY4->setGeometry(QRect(20, 220, 31, 17));
+ labelY4->setFont(font);
+ labelY7 = new QLabel(ResultDialog);
+ labelY7->setObjectName(QString::fromUtf8("labelY7"));
+ labelY7->setGeometry(QRect(20, 130, 31, 17));
+ labelY7->setFont(font);
+ labelY8 = new QLabel(ResultDialog);
+ labelY8->setObjectName(QString::fromUtf8("labelY8"));
+ labelY8->setGeometry(QRect(20, 100, 31, 17));
+ labelY8->setFont(font);
+ labelY5 = new QLabel(ResultDialog);
+ labelY5->setObjectName(QString::fromUtf8("labelY5"));
+ labelY5->setGeometry(QRect(20, 190, 31, 17));
+ labelY5->setFont(font);
+ labelY9 = new QLabel(ResultDialog);
+ labelY9->setObjectName(QString::fromUtf8("labelY9"));
+ labelY9->setGeometry(QRect(20, 70, 31, 17));
+ labelY9->setFont(font);
+ labelX1 = new QLabel(ResultDialog);
+ labelX1->setObjectName(QString::fromUtf8("labelX1"));
+ labelX1->setGeometry(QRect(70, 350, 31, 17));
+ labelX1->setFont(font);
+ labelX3 = new QLabel(ResultDialog);
+ labelX3->setObjectName(QString::fromUtf8("labelX3"));
+ labelX3->setGeometry(QRect(130, 350, 31, 17));
+ labelX3->setFont(font);
+ labelX5 = new QLabel(ResultDialog);
+ labelX5->setObjectName(QString::fromUtf8("labelX5"));
+ labelX5->setGeometry(QRect(190, 350, 31, 17));
+ labelX5->setFont(font);
+ labelX9 = new QLabel(ResultDialog);
+ labelX9->setObjectName(QString::fromUtf8("labelX9"));
+ labelX9->setGeometry(QRect(310, 350, 31, 17));
+ labelX9->setFont(font);
+ labelX7 = new QLabel(ResultDialog);
+ labelX7->setObjectName(QString::fromUtf8("labelX7"));
+ labelX7->setGeometry(QRect(250, 350, 31, 17));
+ labelX7->setFont(font);
+ labelX2 = new QLabel(ResultDialog);
+ labelX2->setObjectName(QString::fromUtf8("labelX2"));
+ labelX2->setGeometry(QRect(100, 350, 31, 17));
+ labelX2->setFont(font);
+ labelX6 = new QLabel(ResultDialog);
+ labelX6->setObjectName(QString::fromUtf8("labelX6"));
+ labelX6->setGeometry(QRect(220, 350, 31, 17));
+ labelX6->setFont(font);
+ labelX8 = new QLabel(ResultDialog);
+ labelX8->setObjectName(QString::fromUtf8("labelX8"));
+ labelX8->setGeometry(QRect(280, 350, 31, 17));
+ labelX8->setFont(font);
+ labelXLine = new QLabel(ResultDialog);
+ labelXLine->setObjectName(QString::fromUtf8("labelXLine"));
+ labelXLine->setGeometry(QRect(50, 360, 170, 17));
+ labelXLine->setFont(font);
+ labelX10 = new QLabel(ResultDialog);
+ labelX10->setObjectName(QString::fromUtf8("labelX10"));
+ labelX10->setGeometry(QRect(340, 350, 31, 17));
+ labelX10->setFont(font);
+ labelX4 = new QLabel(ResultDialog);
+ labelX4->setObjectName(QString::fromUtf8("labelX4"));
+ labelX4->setGeometry(QRect(160, 350, 31, 17));
+ labelX4->setFont(font);
+
+ retranslateUi(ResultDialog);
+
+ QMetaObject::connectSlotsByName(ResultDialog);
+ } // setupUi
+
+ void retranslateUi(QDialog *ResultDialog)
+ {
+ ResultDialog->setWindowTitle(QApplication::translate("ResultDialog", "Dialog", 0, QApplication::UnicodeUTF8));
+ labelResult_4->setText(QApplication::translate("ResultDialog", "0 - 50 km/h: 5,6 s", 0, QApplication::UnicodeUTF8));
+ labelResult_7->setText(QApplication::translate("ResultDialog", "0 - 20 km/h: 1,1 s", 0, QApplication::UnicodeUTF8));
+ labelResult->setText(QApplication::translate("ResultDialog", "0 - 100 km/h: 9,8 s", 0, QApplication::UnicodeUTF8));
+ labelResult_6->setText(QApplication::translate("ResultDialog", "0 - 30 km/h: 3,2 s", 0, QApplication::UnicodeUTF8));
+ labelResult_5->setText(QApplication::translate("ResultDialog", "0 - 40 km/h:4,5 s", 0, QApplication::UnicodeUTF8));
+ labelResult_3->setText(QApplication::translate("ResultDialog", "0 - 60 km/h: 6,9 s", 0, QApplication::UnicodeUTF8));
+ labelResult_2->setText(QApplication::translate("ResultDialog", "0 - 80 km/h: 8,6 s", 0, QApplication::UnicodeUTF8));
+ labelY2->setText(QApplication::translate("ResultDialog", "20", 0, QApplication::UnicodeUTF8));
+ labelY6->setText(QApplication::translate("ResultDialog", "60", 0, QApplication::UnicodeUTF8));
+ labelY1->setText(QApplication::translate("ResultDialog", "10", 0, QApplication::UnicodeUTF8));
+ labelY10->setText(QApplication::translate("ResultDialog", "100", 0, QApplication::UnicodeUTF8));
+ labelY3->setText(QApplication::translate("ResultDialog", "30", 0, QApplication::UnicodeUTF8));
+ labelYLine->setText(QApplication::translate("ResultDialog", "Y", 0, QApplication::UnicodeUTF8));
+ labelY4->setText(QApplication::translate("ResultDialog", "40", 0, QApplication::UnicodeUTF8));
+ labelY7->setText(QApplication::translate("ResultDialog", "70", 0, QApplication::UnicodeUTF8));
+ labelY8->setText(QApplication::translate("ResultDialog", "80", 0, QApplication::UnicodeUTF8));
+ labelY5->setText(QApplication::translate("ResultDialog", "50", 0, QApplication::UnicodeUTF8));
+ labelY9->setText(QApplication::translate("ResultDialog", "90", 0, QApplication::UnicodeUTF8));
+ labelX1->setText(QApplication::translate("ResultDialog", "1", 0, QApplication::UnicodeUTF8));
+ labelX3->setText(QApplication::translate("ResultDialog", "3", 0, QApplication::UnicodeUTF8));
+ labelX5->setText(QApplication::translate("ResultDialog", "5", 0, QApplication::UnicodeUTF8));
+ labelX9->setText(QApplication::translate("ResultDialog", "9", 0, QApplication::UnicodeUTF8));
+ labelX7->setText(QApplication::translate("ResultDialog", "7", 0, QApplication::UnicodeUTF8));
+ labelX2->setText(QApplication::translate("ResultDialog", "2", 0, QApplication::UnicodeUTF8));
+ labelX6->setText(QApplication::translate("ResultDialog", "6", 0, QApplication::UnicodeUTF8));
+ labelX8->setText(QApplication::translate("ResultDialog", "8", 0, QApplication::UnicodeUTF8));
+ 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));
+ Q_UNUSED(ResultDialog);
+ } // retranslateUi
+
+};
+
+namespace Ui {
+ class ResultDialog: public Ui_ResultDialog {};
+} // namespace Ui
+
+QT_END_NAMESPACE
+
+#endif // UI_RESULTDIALOG_H
+++ /dev/null
-#############################################################################
-# Makefile for building: UI
-# Generated by qmake (2.01a) (Qt 4.5.3) on: Fri Feb 26 11:59:23 2010
-# Project: UI.pro
-# Template: app
-# Command: /usr/bin/qmake -unix -o Makefile UI.pro
-#############################################################################
-
-####### Compiler, tools and options
-
-CC = gcc
-CXX = g++
-DEFINES = -DQT_NO_DEBUG -DQT_XML_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS = -pipe -O3 -g -Wall -W -D_REENTRANT $(DEFINES)
-CXXFLAGS = -pipe -O3 -g -Wall -W -D_REENTRANT $(DEFINES)
-INCPATH = -I/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/linux-g++-opengl -I. -I/targets/FREMANTLE_X86/usr/include/qt4/QtCore -I/targets/FREMANTLE_X86/usr/include/qt4/QtNetwork -I/targets/FREMANTLE_X86/usr/include/qt4/QtGui -I/targets/FREMANTLE_X86/usr/include/qt4/QtXml -I/targets/FREMANTLE_X86/usr/include/qt4 -I. -I.
-LINK = g++
-LFLAGS = -Wl,-O1
-LIBS = $(SUBLIBS) -L/usr/lib -Wl,-rpath-link=/usr/lib -lQtXml -lQtGui -lQtNetwork -lQtCore -lpthread
-AR = ar cqs
-RANLIB =
-QMAKE = /usr/bin/qmake
-TAR = tar -cf
-COMPRESS = gzip -9f
-COPY = cp -f
-SED = sed
-COPY_FILE = $(COPY)
-COPY_DIR = $(COPY) -r
-INSTALL_FILE = install -m 644 -p
-INSTALL_DIR = $(COPY_DIR)
-INSTALL_PROGRAM = install -m 755 -p
-DEL_FILE = rm -f
-SYMLINK = ln -sf
-DEL_DIR = rmdir
-MOVE = mv -f
-CHK_DIR_EXISTS= test -d
-MKDIR = mkdir -p
-
-####### Output directory
-
-OBJECTS_DIR = ./
-
-####### Files
-
-SOURCES = main.cpp \
- carmainwindow.cpp \
- resultdialog.cpp \
- stringlistmodel.cpp \
- measuredialog.cpp moc_carmainwindow.cpp \
- moc_resultdialog.cpp \
- moc_stringlistmodel.cpp \
- moc_measuredialog.cpp
-OBJECTS = main.o \
- carmainwindow.o \
- resultdialog.o \
- stringlistmodel.o \
- measuredialog.o \
- moc_carmainwindow.o \
- moc_resultdialog.o \
- moc_stringlistmodel.o \
- moc_measuredialog.o
-DIST = /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/g++.conf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/unix.conf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/linux.conf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/qconfig.pri \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt_functions.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt_config.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/default_pre.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/release.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/default_post.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/warn_on.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/unix/thread.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/moc.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/resources.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/uic.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/yacc.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/lex.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/include_source_dir.prf \
- UI.pro
-QMAKE_TARGET = UI
-DESTDIR =
-TARGET = UI
-
-first: all
-####### Implicit rules
-
-.SUFFIXES: .o .c .cpp .cc .cxx .C
-
-.cpp.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.cc.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.cxx.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.C.o:
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
-
-.c.o:
- $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
-
-####### Build rules
-
-all: Makefile $(TARGET)
-
-$(TARGET): ui_carmainwindow.h ui_resultdialog.h ui_measuredialog.h $(OBJECTS)
- $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
-
-Makefile: UI.pro /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/linux-g++-opengl/qmake.conf /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/g++.conf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/unix.conf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/linux.conf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/qconfig.pri \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt_functions.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt_config.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/exclusive_builds.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/default_pre.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/release.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/default_post.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/warn_on.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/unix/thread.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/moc.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/resources.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/uic.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/yacc.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/lex.prf \
- /targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/include_source_dir.prf \
- /usr/lib/libQtXml.prl \
- /usr/lib/libQtGui.prl \
- /usr/lib/libQtNetwork.prl \
- /usr/lib/libQtCore.prl
- $(QMAKE) -unix -o Makefile UI.pro
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/g++.conf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/unix.conf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/common/linux.conf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/qconfig.pri:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt_functions.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt_config.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/exclusive_builds.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/default_pre.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/release.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/default_post.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/warn_on.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/qt.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/unix/thread.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/moc.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/resources.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/uic.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/yacc.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/lex.prf:
-/targets/FREMANTLE_X86/usr/share/qt4/mkspecs/features/include_source_dir.prf:
-/usr/lib/libQtXml.prl:
-/usr/lib/libQtGui.prl:
-/usr/lib/libQtNetwork.prl:
-/usr/lib/libQtCore.prl:
-qmake: FORCE
- @$(QMAKE) -unix -o Makefile UI.pro
-
-dist:
- @$(CHK_DIR_EXISTS) .tmp/UI1.0.0 || $(MKDIR) .tmp/UI1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/UI1.0.0/ && $(COPY_FILE) --parents carmainwindow.h resultdialog.h stringlistmodel.h measuredialog.h .tmp/UI1.0.0/ && $(COPY_FILE) --parents main.cpp carmainwindow.cpp resultdialog.cpp stringlistmodel.cpp measuredialog.cpp .tmp/UI1.0.0/ && $(COPY_FILE) --parents carmainwindow.ui resultdialog.ui measuredialog.ui .tmp/UI1.0.0/ && (cd `dirname .tmp/UI1.0.0` && $(TAR) UI1.0.0.tar UI1.0.0 && $(COMPRESS) UI1.0.0.tar) && $(MOVE) `dirname .tmp/UI1.0.0`/UI1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/UI1.0.0
-
-
-clean:compiler_clean
- -$(DEL_FILE) $(OBJECTS)
- -$(DEL_FILE) *~ core *.core
-
-
-####### Sub-libraries
-
-distclean: clean
- -$(DEL_FILE) $(TARGET)
- -$(DEL_FILE) Makefile
-
-
-mocclean: compiler_moc_header_clean compiler_moc_source_clean
-
-mocables: compiler_moc_header_make_all compiler_moc_source_make_all
-
-compiler_moc_header_make_all: moc_carmainwindow.cpp moc_resultdialog.cpp moc_stringlistmodel.cpp moc_measuredialog.cpp
-compiler_moc_header_clean:
- -$(DEL_FILE) moc_carmainwindow.cpp moc_resultdialog.cpp moc_stringlistmodel.cpp moc_measuredialog.cpp
-moc_carmainwindow.cpp: resultdialog.h \
- measuredialog.h \
- carmainwindow.h
- /usr/bin/moc $(DEFINES) $(INCPATH) carmainwindow.h -o moc_carmainwindow.cpp
-
-moc_resultdialog.cpp: resultdialog.h
- /usr/bin/moc $(DEFINES) $(INCPATH) resultdialog.h -o moc_resultdialog.cpp
-
-moc_stringlistmodel.cpp: stringlistmodel.h
- /usr/bin/moc $(DEFINES) $(INCPATH) stringlistmodel.h -o moc_stringlistmodel.cpp
-
-moc_measuredialog.cpp: measuredialog.h
- /usr/bin/moc $(DEFINES) $(INCPATH) measuredialog.h -o moc_measuredialog.cpp
-
-compiler_rcc_make_all:
-compiler_rcc_clean:
-compiler_image_collection_make_all: qmake_image_collection.cpp
-compiler_image_collection_clean:
- -$(DEL_FILE) qmake_image_collection.cpp
-compiler_moc_source_make_all:
-compiler_moc_source_clean:
-compiler_uic_make_all: ui_carmainwindow.h ui_resultdialog.h ui_measuredialog.h
-compiler_uic_clean:
- -$(DEL_FILE) ui_carmainwindow.h ui_resultdialog.h ui_measuredialog.h
-ui_carmainwindow.h: carmainwindow.ui
- /usr/bin/uic carmainwindow.ui -o ui_carmainwindow.h
-
-ui_resultdialog.h: resultdialog.ui
- /usr/bin/uic resultdialog.ui -o ui_resultdialog.h
-
-ui_measuredialog.h: measuredialog.ui
- /usr/bin/uic measuredialog.ui -o ui_measuredialog.h
-
-compiler_yacc_decl_make_all:
-compiler_yacc_decl_clean:
-compiler_yacc_impl_make_all:
-compiler_yacc_impl_clean:
-compiler_lex_make_all:
-compiler_lex_clean:
-compiler_clean: compiler_moc_header_clean compiler_uic_clean
-
-####### Compile
-
-main.o: main.cpp carmainwindow.h \
- resultdialog.h \
- measuredialog.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
-
-carmainwindow.o: carmainwindow.cpp carmainwindow.h \
- resultdialog.h \
- measuredialog.h \
- ui_carmainwindow.h \
- stringlistmodel.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o carmainwindow.o carmainwindow.cpp
-
-resultdialog.o: resultdialog.cpp resultdialog.h \
- ui_resultdialog.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o resultdialog.o resultdialog.cpp
-
-stringlistmodel.o: stringlistmodel.cpp stringlistmodel.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o stringlistmodel.o stringlistmodel.cpp
-
-measuredialog.o: measuredialog.cpp measuredialog.h \
- ui_measuredialog.h
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o measuredialog.o measuredialog.cpp
-
-moc_carmainwindow.o: moc_carmainwindow.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_carmainwindow.o moc_carmainwindow.cpp
-
-moc_resultdialog.o: moc_resultdialog.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_resultdialog.o moc_resultdialog.cpp
-
-moc_stringlistmodel.o: moc_stringlistmodel.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_stringlistmodel.o moc_stringlistmodel.cpp
-
-moc_measuredialog.o: moc_measuredialog.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_measuredialog.o moc_measuredialog.cpp
-
-####### Install
-
-install: FORCE
-
-uninstall: FORCE
-
-FORCE:
-
+++ /dev/null
-# -------------------------------------------------
-# Project created by QtCreator 2010-02-23T14:17:30
-# -------------------------------------------------
-QT += network \
- xml
-TARGET = UI
-TEMPLATE = app
-SOURCES += main.cpp \
- carmainwindow.cpp \
- resultdialog.cpp \
- stringlistmodel.cpp \
- measuredialog.cpp
-HEADERS += carmainwindow.h \
- resultdialog.h \
- stringlistmodel.h \
- measuredialog.h
-FORMS += carmainwindow.ui \
- resultdialog.ui \
- measuredialog.ui
+++ /dev/null
-<!DOCTYPE QtCreatorProject>
-<qtcreator>
- <data>
- <variable>RunConfiguration0-BaseEnvironmentBase</variable>
- <value type="int">2</value>
- </data>
- <data>
- <variable>RunConfiguration0-CommandLineArguments</variable>
- <valuelist type="QVariantList"/>
- </data>
- <data>
- <variable>RunConfiguration0-ProFile</variable>
- <value type="QString">UI.pro</value>
- </data>
- <data>
- <variable>RunConfiguration0-RunConfiguration.name</variable>
- <value type="QString">UI</value>
- </data>
- <data>
- <variable>RunConfiguration0-UseDyldImageSuffix</variable>
- <value type="bool">false</value>
- </data>
- <data>
- <variable>RunConfiguration0-UseTerminal</variable>
- <value type="bool">false</value>
- </data>
- <data>
- <variable>RunConfiguration0-UserEnvironmentChanges</variable>
- <valuelist type="QVariantList"/>
- </data>
- <data>
- <variable>RunConfiguration0-UserSetName</variable>
- <value type="bool">false</value>
- </data>
- <data>
- <variable>RunConfiguration0-UserSetWorkingDirectory</variable>
- <value type="bool">false</value>
- </data>
- <data>
- <variable>RunConfiguration0-UserWorkingDirectory</variable>
- <value type="QString"></value>
- </data>
- <data>
- <variable>RunConfiguration0-type</variable>
- <value type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
- </data>
- <data>
- <variable>activeRunConfiguration</variable>
- <value type="int">0</value>
- </data>
- <data>
- <variable>activebuildconfiguration</variable>
- <value type="QString">Debug</value>
- </data>
- <data>
- <variable>buildConfiguration-Debug</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
- <value key="QtVersionId" type="int">0</value>
- <value key="ToolChain" type="int">0</value>
- <value key="addQDumper" type=""></value>
- <value key="buildConfiguration" type="int">2</value>
- </valuemap>
- </data>
- <data>
- <variable>buildConfiguration-Release</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
- <value key="QtVersionId" type="int">0</value>
- <value key="ToolChain" type="int">0</value>
- <value key="addQDumper" type=""></value>
- <value key="buildConfiguration" type="int">0</value>
- </valuemap>
- </data>
- <data>
- <variable>buildconfiguration-Debug-buildstep0</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
- <valuelist key="abstractProcess.Environment" type="QVariantList">
- <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-iApTuAtgqn,guid=2239cacdce415f352a4eeda94b861f5b</value>
- <value type="QString">DESKTOP_SESSION=gnome</value>
- <value type="QString">DISPLAY=:0.0</value>
- <value type="QString">GDMSESSION=gnome</value>
- <value type="QString">GDM_KEYBOARD_LAYOUT=fi classic</value>
- <value type="QString">GDM_LANG=en_US.UTF-8</value>
- <value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
- <value type="QString">GNOME_KEYRING_SOCKET=/tmp/keyring-fMk2uW/socket</value>
- <value type="QString">GTK_MODULES=canberra-gtk-module</value>
- <value type="QString">GTK_RC_FILES=/etc/gtk/gtkrc:/home/user/.gtkrc-1.2-gnome2</value>
- <value type="QString">HOME=/home/user</value>
- <value type="QString">LANG=en_US.UTF-8</value>
- <value type="QString">LD_LIBRARY_PATH=/home/user/qtsdk-2010.01/lib/qtcreator:</value>
- <value type="QString">LOGNAME=user</value>
- <value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-user</value>
- <value type="QString">PATH=/home/user/qtsdk-2010.01/qt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
- <value type="QString">PWD=/home/user</value>
- <value type="QString">QTDIR=/home/user/qtsdk-2010.01/qt</value>
- <value type="QString">SESSION_MANAGER=local/user-laptop:@/tmp/.ICE-unix/1129,unix/user-laptop:/tmp/.ICE-unix/1129</value>
- <value type="QString">SHELL=/bin/bash</value>
- <value type="QString">SPEECHD_PORT=7560</value>
- <value type="QString">SSH_AGENT_PID=1268</value>
- <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-fMk2uW/socket.ssh</value>
- <value type="QString">USER=user</value>
- <value type="QString">USERNAME=user</value>
- <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-user-xrQeED/database</value>
- <value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
- <value type="QString">XDG_SESSION_COOKIE=00bbe2341ff06d9bc0c5bd3f4b55f0d4-1267081048.673670-701847465</value>
- </valuelist>
- <valuelist key="abstractProcess.arguments" type="QVariantList">
- <value type="QString">/scratchbox/users/user/home/user/Projektit/car/UI/UI.pro</value>
- <value type="QString">-spec</value>
- <value type="QString">linux-g++</value>
- <value type="QString">-r</value>
- <value type="QString">CONFIG+=debug</value>
- </valuelist>
- <value key="abstractProcess.command" type="QString">/home/user/qtsdk-2010.01/qt/bin/qmake</value>
- <value key="abstractProcess.enabled" type="bool">true</value>
- <value key="abstractProcess.workingDirectory" type="QString">/scratchbox/users/user/home/user/Projektit/car/UI</value>
- </valuemap>
- </data>
- <data>
- <variable>buildconfiguration-Debug-buildstep1</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
- <valuelist key="abstractProcess.Environment" type="QVariantList">
- <value type="QString">DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-iApTuAtgqn,guid=2239cacdce415f352a4eeda94b861f5b</value>
- <value type="QString">DESKTOP_SESSION=gnome</value>
- <value type="QString">DISPLAY=:0.0</value>
- <value type="QString">GDMSESSION=gnome</value>
- <value type="QString">GDM_KEYBOARD_LAYOUT=fi classic</value>
- <value type="QString">GDM_LANG=en_US.UTF-8</value>
- <value type="QString">GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
- <value type="QString">GNOME_KEYRING_SOCKET=/tmp/keyring-fMk2uW/socket</value>
- <value type="QString">GTK_MODULES=canberra-gtk-module</value>
- <value type="QString">GTK_RC_FILES=/etc/gtk/gtkrc:/home/user/.gtkrc-1.2-gnome2</value>
- <value type="QString">HOME=/home/user</value>
- <value type="QString">LANG=en_US.UTF-8</value>
- <value type="QString">LD_LIBRARY_PATH=/home/user/qtsdk-2010.01/lib/qtcreator:</value>
- <value type="QString">LOGNAME=user</value>
- <value type="QString">ORBIT_SOCKETDIR=/tmp/orbit-user</value>
- <value type="QString">PATH=/home/user/qtsdk-2010.01/qt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games</value>
- <value type="QString">PWD=/home/user</value>
- <value type="QString">QTDIR=/home/user/qtsdk-2010.01/qt</value>
- <value type="QString">SESSION_MANAGER=local/user-laptop:@/tmp/.ICE-unix/1129,unix/user-laptop:/tmp/.ICE-unix/1129</value>
- <value type="QString">SHELL=/bin/bash</value>
- <value type="QString">SPEECHD_PORT=7560</value>
- <value type="QString">SSH_AGENT_PID=1268</value>
- <value type="QString">SSH_AUTH_SOCK=/tmp/keyring-fMk2uW/socket.ssh</value>
- <value type="QString">USER=user</value>
- <value type="QString">USERNAME=user</value>
- <value type="QString">XAUTHORITY=/var/run/gdm/auth-for-user-xrQeED/database</value>
- <value type="QString">XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/</value>
- <value type="QString">XDG_SESSION_COOKIE=00bbe2341ff06d9bc0c5bd3f4b55f0d4-1267081048.673670-701847465</value>
- </valuelist>
- <value key="abstractProcess.IgnoreReturnValue" type="bool">false</value>
- <valuelist key="abstractProcess.arguments" type="QVariantList">
- <value type="QString">-w</value>
- </valuelist>
- <value key="abstractProcess.command" type="QString">/usr/bin/make</value>
- <value key="abstractProcess.enabled" type="bool">true</value>
- <value key="abstractProcess.workingDirectory" type="QString">/scratchbox/users/user/home/user/Projektit/car/UI</value>
- </valuemap>
- </data>
- <data>
- <variable>buildconfiguration-Debug-cleanstep0</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Debug</value>
- <value key="cleanConfig" type="bool">true</value>
- <valuelist key="makeargs" type="QVariantList">
- <value type="QString">clean</value>
- </valuelist>
- </valuemap>
- </data>
- <data>
- <variable>buildconfiguration-Release-buildstep0</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
- </valuemap>
- </data>
- <data>
- <variable>buildconfiguration-Release-buildstep1</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
- </valuemap>
- </data>
- <data>
- <variable>buildconfiguration-Release-cleanstep0</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString">Release</value>
- </valuemap>
- </data>
- <data>
- <variable>buildconfigurations</variable>
- <valuelist type="QVariantList">
- <value type="QString">Debug</value>
- <value type="QString">Release</value>
- </valuelist>
- </data>
- <data>
- <variable>buildstep0</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
- <value key="mkspec" type="QString"></value>
- </valuemap>
- </data>
- <data>
- <variable>buildstep1</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
- </valuemap>
- </data>
- <data>
- <variable>buildsteps</variable>
- <valuelist type="QVariantList">
- <value type="QString">trolltech.qt4projectmanager.qmake</value>
- <value type="QString">trolltech.qt4projectmanager.make</value>
- </valuelist>
- </data>
- <data>
- <variable>cleanstep0</variable>
- <valuemap type="QVariantMap">
- <value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString"></value>
- <value key="clean" type="bool">true</value>
- </valuemap>
- </data>
- <data>
- <variable>cleansteps</variable>
- <valuelist type="QVariantList">
- <value type="QString">trolltech.qt4projectmanager.make</value>
- </valuelist>
- </data>
- <data>
- <variable>defaultFileEncoding</variable>
- <value type="QByteArray">System</value>
- </data>
- <data>
- <variable>project</variable>
- <valuemap type="QVariantMap"/>
- </data>
-</qtcreator>
+++ /dev/null
-#include "accelerometer.h"
-#include "math.h"
-
-#include <QFile>
-#include <QString>
-#include <QRegExp>
-#include <QTimer>
-
-#define kFilteringFactor 0.1
-#define kGravity 9.81
-
-static int sampleIndex=0;
-
-Accelerometer::Accelerometer()
-{
- QTimer *timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), this, SLOT(processData()));
- sampleRate = 100;
- timer->start(sampleRate);
- now.restart();
-
- initValues();
-}
-
-Accelerometer::~Accelerometer() {
-}
-
-void Accelerometer::start() {
- timer->start(sampleRate);
- now.restart();
-}
-
-void Accelerometer::initValues() {
- accelerationX=0;
- accelerationY=0;
- accelerationZ=0;
- trueAccelerationX=0;
- trueAccelerationY=0;
- trueAccelerationZ=0;
- previousAccelerationX=0;
- previousAccelerationY=0;
- previousAccelerationZ=0;
- previousSpeed=0;
- currentSpeed=0;
- currentAcceleration=0;
- previousAcceleration=0;
- totalAcceleration=0;
- intervalTime=0;
- totalTime=0;
- distanceTraveled=0;
- lastDistanceTraveled=0;
- averageSpeed=0;
- sampleRate=0;
-}
-
-void Accelerometer::stop() {
- timer->stop();
-}
-
-void Accelerometer::setSampleRate(int pSampleRate) {
- sampleRate = pSampleRate;
-}
-
-int Accelerometer::getSampleRate() {
- return sampleRate;
-}
-
-qreal Accelerometer::getCurrentAcceleration() {
- return currentAcceleration;
-}
-
-qreal Accelerometer::getPreviousTotalAcceleration() {
- return previousAcceleration;
-}
-
-qreal Accelerometer::getTotalAcceleration() {
- return totalAcceleration;
-}
-
-qreal Accelerometer::getDistanceTraveled() {
- return distanceTraveled;
-}
-
-qreal Accelerometer::getLastDistanceTraveled() {
- return lastDistanceTraveled;
-}
-
-qreal Accelerometer::getAverageSpeed() {
- return averageSpeed;
-}
-
-qreal Accelerometer::getTrueAccelerationX() {
- return trueAccelerationX;
-}
-
-qreal Accelerometer::getTrueAccelerationY() {
- return trueAccelerationY;
-}
-
-qreal Accelerometer::getTrueAccelerationZ() {
- return trueAccelerationZ;
-}
-
-qreal Accelerometer::getPreviousSpeed() {
- return previousSpeed;
-}
-
-qreal Accelerometer::getCurrentSpeed() {
- return currentSpeed;
-}
-
-qreal Accelerometer::getintervalTime() {
- return intervalTime;
-}
-
-/**
- * Processes Accelerometer data
- *
- */
-void Accelerometer::processData()
-{
- QFile file("/sys/class/i2c-adapter/i2c-3/3-001d/coord");
- if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
- return;
-
- // Read data, parse with regular expressions and process it
- QByteArray line = file.readLine();
- QRegExp rx("([0-9-]+) ([0-9-]+) ([0-9-]+)");
- rx.indexIn(line);
-
- smoothData(rx.cap(1).toInt(), rx.cap(2).toInt(), rx.cap(3).toInt());
-
- trueAccelerationX = (accelerationX - previousAccelerationX)/1000*kGravity;
- trueAccelerationY = (accelerationY - previousAccelerationY)/1000*kGravity;
- trueAccelerationZ = (accelerationZ - previousAccelerationZ)/1000*kGravity;
-
- previousAccelerationX = accelerationX;
- previousAccelerationY = accelerationY;
- previousAccelerationZ = accelerationZ;
-
- currentAcceleration = sqrt(trueAccelerationX * trueAccelerationX +
- trueAccelerationY * trueAccelerationY +
- trueAccelerationZ * trueAccelerationZ );
-
- totalAcceleration = currentAcceleration - previousAcceleration;
-
- totalAcceleration = fabs(totalAcceleration);
-
- previousAcceleration = currentAcceleration;
-
- // v = v0 + at
- // x = x0 + v0t + (at^2)/2
- // v = (v + v0)/2
-
- intervalTime = now.restart();
- intervalTime = intervalTime/1000; // millisecs to secs
- totalTime = totalTime + intervalTime;
-
- // filter noise
- // TODO: do this in smoothdata: implement a better filter.
- if (totalAcceleration > 0.02) {
- currentSpeed = ( previousSpeed + ( totalAcceleration * intervalTime ) / 2 );
- } else {
- currentSpeed = 0;
- }
-
- // filter noise
- if (currentSpeed > 0.02) {
- distanceTraveled = ( lastDistanceTraveled + ( ( currentSpeed + previousSpeed ) * intervalTime) / 2 );
- } else {
- //distanceTraveled = 0;
- }
-
- averageSpeed = distanceTraveled / totalTime;
-
- previousSpeed = currentSpeed;
- lastDistanceTraveled = distanceTraveled;
-
- file.close();
-}
-
-/**
- * Smooths Accelerometer data
- *
- * @param x Accelerometers x-axis raw input
- * @param y Accelerometers y-axis raw input
- * @param z Accelerometers z-axis raw input
- */
-void Accelerometer::smoothData(qreal x, qreal y, qreal z) {
- accelerationX = x;
- accelerationY = y;
- accelerationZ = z;
- if(sampleIndex>0) {
- accelerationX = previousAccelerationX + (accelerationX-previousAccelerationX) * kFilteringFactor;
- accelerationY = previousAccelerationY + (accelerationY-previousAccelerationY) * kFilteringFactor;
- accelerationZ = previousAccelerationZ + (accelerationZ-previousAccelerationZ) * kFilteringFactor;
- }
- sampleIndex++;
-}
+++ /dev/null
-#ifndef ACCELEROMETER_H
-#define ACCELEROMETER_H
-
-#include <QObject>
-#include <QTime>
-#include <QTimer>
-
-class Accelerometer : public QObject
-{
- Q_OBJECT
-public:
- Accelerometer();
- ~Accelerometer();
-
- void start();
- void stop();
-
- void initValues();
-
- void setSampleRate(int pSampleRate);
- int getSampleRate();
-
- qreal getTrueAccelerationX();
- qreal getTrueAccelerationY();
- qreal getTrueAccelerationZ();
- qreal getPreviousSpeed();
- qreal getCurrentSpeed();
-
- qreal getDistanceTraveled();
- qreal getLastDistanceTraveled();
- qreal getAverageSpeed();
-
- qreal getCurrentAcceleration();
- qreal getTotalAcceleration();
- qreal getPreviousTotalAcceleration();
-
- qreal getintervalTime();
-
-private slots:
- void processData();
- void smoothData(qreal x, qreal y, qreal z);
-
-private:
- qreal accelerationX, accelerationY, accelerationZ;
- qreal trueAccelerationX,trueAccelerationY,trueAccelerationZ;
- qreal previousAccelerationX,previousAccelerationY,previousAccelerationZ;
- qreal previousSpeed, currentSpeed;
- qreal currentAcceleration, previousAcceleration, totalAcceleration;
- QTime now;
- QTimer *timer;
- double intervalTime;
- double totalTime;
- double distanceTraveled,lastDistanceTraveled,averageSpeed;
- double sampleRate;
-};
-
-#endif // ACCELEROMETER_H
+++ /dev/null
-#include "calculate.h"
-#include <math.h>
-
-#include <QFile>
-#include <QString>
-#include <QTimer>
-#include <QRegExp>
-
-const double G_ACCELERATION = 9.80665;
-const double SECONDS_IN_HOUR = 3600;
-
-Calculate::Calculate() {
-
- this->reset();
-
-}
-
-Calculate::~Calculate() {
-}
-
-void Calculate::reset() {
-
- averageSpeed = 0;
- currentSpeed = 0;
- distanceTraveled = 0;
- lastAcceleration = 0;
- lastDistance = 0;
- lastSpeed = 0;
- numOfIterations = 0;
- totalTime = 0;
-}
-
-/* Getters and setters
- */
-
-double Calculate::AverageSpeed()
-{
- return averageSpeed;
-}
-void Calculate::AverageSpeed(double value)
-{
- averageSpeed = value;
-}
-double Calculate::CurrentSpeed()
-{
- return currentSpeed;
-}
-void Calculate::CurrentSpeed(double value)
-{
- currentSpeed = value;
-}
-double Calculate::DistanceTraveled()
-{
- return distanceTraveled;
-}
-void Calculate::DistanceTraveled(double value)
-{
- distanceTraveled = value;
-}
-double Calculate::LastAcceleration()
-{
- return lastAcceleration;
-}
-void Calculate::LastAcceleration(double value)
-{
- lastAcceleration = value;
-}
-double Calculate::LastDistance()
-{
- return lastDistance;
-}
-void Calculate::LastDistance(double value)
-{
- lastDistance = value;
-}
-double Calculate::LastSpeed()
-{
- return lastSpeed;
-}
-void Calculate::LastSpeed(double value)
-{
- lastSpeed = value;
-}
-long Calculate::NumOfIterations()
-{
- return numOfIterations;
-}
-void Calculate::NumOfIterations(long value)
-{
- numOfIterations = value;
-}
-double Calculate::TotalTime()
-{
- return totalTime;
-}
-void Calculate::TotalTime(double value)
-{
- totalTime = value;
-}
-
-/*
- This is a main function for calculating various parameters. Accelerometer
- provides currentAcceleration and calling function measures time (seconds).
- This function should be called 20-30 times/second to minimize
- calculation error.
-
- To be added: params like horsepower.
- */
-void Calculate::CalculateParameters(double currentAcceleration, double seconds)
-{
- numOfIterations++;
- totalTime = (totalTime + seconds);
-
- // v=v0 + a*t
- // v(n) = v(n-1)+(a(n) + a(n-1))*(seconds)/2
-
- /* First integration of acceleration provides speed
- */
- currentSpeed = (lastSpeed + (((currentAcceleration + lastAcceleration) * seconds) / 2));
-
- /* Second integration: distance.
- */
- distanceTraveled = (lastDistance + (((currentSpeed + lastSpeed) * seconds) / 2));
-
- /* Average speed
- */
- averageSpeed = (distanceTraveled / totalTime);
-
- lastSpeed = currentSpeed;
- lastAcceleration = currentAcceleration;
- lastDistance = distanceTraveled;
-}
-
-
-
-
-
-
+++ /dev/null
-#ifndef CALCULATE_H
-#define CALCULATE_H
-
-#include <QObject>
-#include <QTime>
-
-class Calculate : public QObject
-{
- Q_OBJECT
-
-public:
- Calculate();
- ~Calculate();
-
- void reset();
- void CalculateParameters(double currentAcceleration, double seconds);
-
- double AverageSpeed();
- void AverageSpeed(double value);
-
- double CurrentSpeed();
- void CurrentSpeed(double value);
-
- double DistanceTraveled();
- void DistanceTraveled(double value);
-
- double LastAcceleration();
- void LastAcceleration(double value);
-
- double LastCheckpoint();
- void LastCheckpoint(double value);
-
- double LastDistance();
- void LastDistance(double value);
-
- double LastSpeed();
- void LastSpeed(double value);
-
- long NumOfIterations();
- void NumOfIterations(long value);
-
- double TotalTime();
- void TotalTime(double value);
-
-private:
- double averageSpeed;
- double currentSpeed;
- double distanceTraveled;
- double lastAcceleration;
- double lastCheckpoint;
- double lastDistance;
- double lastSpeed;
- long numOfIterations;
- double totalTime;
-
-
-};
-
-#endif // CALCULATE_H
+++ /dev/null
-#include "carmainwindow.h"
-#include "ui_carmainwindow.h"
-#include "stringlistmodel.h"
-#include <QStandardItemModel>
-#include <QStringList>
-#include <QString>
-
-/**
- *Constructor of this class.
- *@param QWidget pointer to parent object. By default the value is NULL.
- */
-CarMainWindow::CarMainWindow(QWidget *parent):QMainWindow(parent), ui(new Ui::CarMainWindow)
-{
- ui->setupUi(this);
- result = new ResultDialog();
- measure = new MeasureDialog();
-
- initUnitCompoBox();
- initSpeedListView();
-}
-
-/**
- *Destructor of this class. Should be used to release all allocated resources.
- */
-CarMainWindow::~CarMainWindow()
-{
- delete ui;
-}
-
-/**
- *This function is used to .
- *@param
- */
-void CarMainWindow::changeEvent(QEvent *e)
-{
- QMainWindow::changeEvent(e);
- switch (e->type()) {
- case QEvent::LanguageChange:
- ui->retranslateUi(this);
- break;
- default:
- break;
- }
-}
-
-/**
- *This slot function is called when ever list view is update.
- *@param QModelIndex index.
- */
-void CarMainWindow::on_listView_clicked(QModelIndex index)
-{
- QString str = index.data().toString();
- QStringList list = str.split("-");
- QStringList list2 = list[1].split(" ");
-
- ui->minLineEdit->setText(list[0]);
- ui->maxLineEdit->setText(list2[0]);
- updateUnitCompoBox(list2[1]);
-}
-
-/**
- *This slot function is called when ever auto start button clicked.
- */
-void CarMainWindow::on_autoStartButton_clicked()
-{
- result->show();
-}
-
-/**
- *This slot function is called when ever list view is update.
- *@param QString unit.
- */
-void CarMainWindow::updateUnitCompoBox(QString unit)
-{
- ui->unitComboBox->setCurrentIndex(ui->unitComboBox->findText(unit, Qt::MatchExactly));
-}
-
-/**
- *This function is used to init combobox.
- */
-void CarMainWindow::initUnitCompoBox()
-{
- units << "km/h" << "km" << "h" << "m" << "min" << "mil" << "in" << "ft" << "yrd";
- ui->unitComboBox->addItems(units);
-}
-
-/**
- *This function is used to init listview.
- */
-void CarMainWindow::initSpeedListView()
-{
- numbers << "0-100 km/h" << "0-1/4 mil" << "0-50 km" << "50-100 mil" << "0-100 m" << "0-50 ft" << "0-50 yrd" << "0-500 in";
- QAbstractItemModel *model = new StringListModel(numbers);
- ui->listView->setModel(model);
-}
+++ /dev/null
-#ifndef CARMAINWINDOW_H
-#define CARMAINWINDOW_H
-
-/**
- *This class
- *@author Toni Jussila
- *@version 0.0.1
- */
-
-#include <QMainWindow>
-#include "resultdialog.h"
-#include "measuredialog.h"
-#include <QModelIndex>
-
-namespace Ui {
- class CarMainWindow;
-}
-
-class CarMainWindow : public QMainWindow {
- Q_OBJECT
-public:
- CarMainWindow(QWidget *parent = 0);
- ~CarMainWindow();
-
-protected:
- void changeEvent(QEvent *e);
-
-private:
- Ui::CarMainWindow *ui;
- ResultDialog *result;
- void initUnitCompoBox();
- void initSpeedListView();
- MeasureDialog *measure;
-
-
-private:
- QStringList numbers;
- QStringList units;
-
-private slots:
- void on_autoStartButton_clicked();
- void on_listView_clicked(QModelIndex index);
- void updateUnitCompoBox(QString unit);
-};
-
-#endif // CARMAINWINDOW_H
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>CarMainWindow</class>
- <widget class="QMainWindow" name="CarMainWindow">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>800</width>
- <height>480</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>CarMainWindow</string>
- </property>
- <widget class="QWidget" name="centralWidget">
- <widget class="QTabWidget" name="tabWidget">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>0</y>
- <width>781</width>
- <height>365</height>
- </rect>
- </property>
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="StartTab">
- <attribute name="title">
- <string>Start</string>
- </attribute>
- <widget class="QWidget" name="layoutWidget">
- <property name="geometry">
- <rect>
- <x>590</x>
- <y>220</y>
- <width>171</width>
- <height>91</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QPushButton" name="autoStartButton">
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>16</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Auto start</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="manualStartButton">
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>16</pointsize>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Manual start</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QListView" name="listView">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>10</y>
- <width>261</width>
- <height>301</height>
- </rect>
- </property>
- </widget>
- <widget class="QWidget" name="">
- <property name="geometry">
- <rect>
- <x>270</x>
- <y>10</y>
- <width>311</width>
- <height>301</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLabel" name="startLabel">
- <property name="text">
- <string>Start:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="minLineEdit"/>
- </item>
- <item>
- <widget class="QLabel" name="stopLabel">
- <property name="text">
- <string>Stop:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="maxLineEdit"/>
- </item>
- <item>
- <widget class="QLabel" name="unitLabel">
- <property name="text">
- <string>Unit:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="unitComboBox"/>
- </item>
- </layout>
- </widget>
- </widget>
- <widget class="QWidget" name="settingsTab">
- <attribute name="title">
- <string>Settings</string>
- </attribute>
- </widget>
- </widget>
- <widget class="QWidget" name="">
- <property name="geometry">
- <rect>
- <x>10</x>
- <y>370</y>
- <width>781</width>
- <height>41</height>
- </rect>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QPushButton" name="view1Button">
- <property name="text">
- <string>View1</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="view2Button">
- <property name="text">
- <string>View2</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="view3Button">
- <property name="text">
- <string>View3</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="view4Button">
- <property name="text">
- <string>View4</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <widget class="QMenuBar" name="menuBar">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>800</width>
- <height>27</height>
- </rect>
- </property>
- </widget>
- <widget class="QToolBar" name="mainToolBar">
- <attribute name="toolBarArea">
- <enum>TopToolBarArea</enum>
- </attribute>
- <attribute name="toolBarBreak">
- <bool>false</bool>
- </attribute>
- </widget>
- <widget class="QStatusBar" name="statusBar"/>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-#include <QtGui/QApplication>
-#include <QStyleFactory>
-#include "carmainwindow.h"
-
-int main(int argc, char *argv[])
-{
- QApplication a(argc, argv);
- CarMainWindow w;
- w.show();
- return a.exec();
-}
+++ /dev/null
-#include "measuredialog.h"
-#include "ui_measuredialog.h"
-
-MeasureDialog::MeasureDialog(QWidget *parent) :
- QDialog(parent),
- ui(new Ui::MeasureDialog)
-{
- ui->setupUi(this);
-}
-
-MeasureDialog::~MeasureDialog()
-{
- delete ui;
-}
-
-void MeasureDialog::changeEvent(QEvent *e)
-{
- QDialog::changeEvent(e);
- switch (e->type()) {
- case QEvent::LanguageChange:
- ui->retranslateUi(this);
- break;
- default:
- break;
- }
-}
+++ /dev/null
-#ifndef MEASUREDIALOG_H
-#define MEASUREDIALOG_H
-
-#include <QDialog>
-
-namespace Ui {
- class MeasureDialog;
-}
-
-class MeasureDialog : public QDialog {
- Q_OBJECT
-public:
- MeasureDialog(QWidget *parent = 0);
- ~MeasureDialog();
-
-protected:
- void changeEvent(QEvent *e);
-
-private:
- Ui::MeasureDialog *ui;
-};
-
-#endif // MEASUREDIALOG_H
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>MeasureDialog</class>
- <widget class="QDialog" name="MeasureDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>800</width>
- <height>480</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Dialog</string>
- </property>
- <widget class="QLabel" name="label_7">
- <property name="geometry">
- <rect>
- <x>130</x>
- <y>40</y>
- <width>361</width>
- <height>51</height>
- </rect>
- </property>
- <property name="text">
- <string>Selected measurement: 0 - 100 km/h</string>
- </property>
- </widget>
- <widget class="QWidget" name="layoutWidget">
- <property name="geometry">
- <rect>
- <x>110</x>
- <y>120</y>
- <width>271</width>
- <height>151</height>
- </rect>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Time:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Speed:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Distance:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>14 s</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>86 km/h</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>120 m</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <widget class="QPushButton" name="pushButtonAbort">
- <property name="geometry">
- <rect>
- <x>200</x>
- <y>300</y>
- <width>93</width>
- <height>27</height>
- </rect>
- </property>
- <property name="text">
- <string>Abort</string>
- </property>
- </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-/****************************************************************************
-** Meta object code from reading C++ file 'carmainwindow.h'
-**
-** Created: Fri Feb 26 11:59:39 2010
-** by: The Qt Meta Object Compiler version 61 (Qt 4.5.3)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "carmainwindow.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'carmainwindow.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 61
-#error "This file was generated using the moc from 4.5.3. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_CarMainWindow[] = {
-
- // content:
- 2, // revision
- 0, // classname
- 0, 0, // classinfo
- 3, 12, // methods
- 0, 0, // properties
- 0, 0, // enums/sets
- 0, 0, // constructors
-
- // slots: signature, parameters, type, tag, flags
- 15, 14, 14, 14, 0x08,
- 50, 44, 14, 14, 0x08,
- 88, 83, 14, 14, 0x08,
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_CarMainWindow[] = {
- "CarMainWindow\0\0on_autoStartButton_clicked()\0"
- "index\0on_listView_clicked(QModelIndex)\0"
- "unit\0updateUnitCompoBox(QString)\0"
-};
-
-const QMetaObject CarMainWindow::staticMetaObject = {
- { &QMainWindow::staticMetaObject, qt_meta_stringdata_CarMainWindow,
- qt_meta_data_CarMainWindow, 0 }
-};
-
-const QMetaObject *CarMainWindow::metaObject() const
-{
- return &staticMetaObject;
-}
-
-void *CarMainWindow::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_CarMainWindow))
- return static_cast<void*>(const_cast< CarMainWindow*>(this));
- return QMainWindow::qt_metacast(_clname);
-}
-
-int CarMainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
- _id = QMainWindow::qt_metacall(_c, _id, _a);
- if (_id < 0)
- return _id;
- if (_c == QMetaObject::InvokeMetaMethod) {
- switch (_id) {
- case 0: on_autoStartButton_clicked(); break;
- case 1: on_listView_clicked((*reinterpret_cast< QModelIndex(*)>(_a[1]))); break;
- case 2: updateUnitCompoBox((*reinterpret_cast< QString(*)>(_a[1]))); break;
- default: ;
- }
- _id -= 3;
- }
- return _id;
-}
-QT_END_MOC_NAMESPACE
+++ /dev/null
-/****************************************************************************
-** Meta object code from reading C++ file 'measuredialog.h'
-**
-** Created: Fri Feb 26 11:59:43 2010
-** by: The Qt Meta Object Compiler version 61 (Qt 4.5.3)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "measuredialog.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'measuredialog.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 61
-#error "This file was generated using the moc from 4.5.3. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_MeasureDialog[] = {
-
- // content:
- 2, // revision
- 0, // classname
- 0, 0, // classinfo
- 0, 0, // methods
- 0, 0, // properties
- 0, 0, // enums/sets
- 0, 0, // constructors
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_MeasureDialog[] = {
- "MeasureDialog\0"
-};
-
-const QMetaObject MeasureDialog::staticMetaObject = {
- { &QDialog::staticMetaObject, qt_meta_stringdata_MeasureDialog,
- qt_meta_data_MeasureDialog, 0 }
-};
-
-const QMetaObject *MeasureDialog::metaObject() const
-{
- return &staticMetaObject;
-}
-
-void *MeasureDialog::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_MeasureDialog))
- return static_cast<void*>(const_cast< MeasureDialog*>(this));
- return QDialog::qt_metacast(_clname);
-}
-
-int MeasureDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
- _id = QDialog::qt_metacall(_c, _id, _a);
- if (_id < 0)
- return _id;
- return _id;
-}
-QT_END_MOC_NAMESPACE
+++ /dev/null
-/****************************************************************************
-** Meta object code from reading C++ file 'resultdialog.h'
-**
-** Created: Fri Feb 26 11:59:41 2010
-** by: The Qt Meta Object Compiler version 61 (Qt 4.5.3)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "resultdialog.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'resultdialog.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 61
-#error "This file was generated using the moc from 4.5.3. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_ResultDialog[] = {
-
- // content:
- 2, // revision
- 0, // classname
- 0, 0, // classinfo
- 0, 0, // methods
- 0, 0, // properties
- 0, 0, // enums/sets
- 0, 0, // constructors
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_ResultDialog[] = {
- "ResultDialog\0"
-};
-
-const QMetaObject ResultDialog::staticMetaObject = {
- { &QDialog::staticMetaObject, qt_meta_stringdata_ResultDialog,
- qt_meta_data_ResultDialog, 0 }
-};
-
-const QMetaObject *ResultDialog::metaObject() const
-{
- return &staticMetaObject;
-}
-
-void *ResultDialog::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_ResultDialog))
- return static_cast<void*>(const_cast< ResultDialog*>(this));
- return QDialog::qt_metacast(_clname);
-}
-
-int ResultDialog::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
- _id = QDialog::qt_metacall(_c, _id, _a);
- if (_id < 0)
- return _id;
- return _id;
-}
-QT_END_MOC_NAMESPACE
+++ /dev/null
-/****************************************************************************
-** Meta object code from reading C++ file 'stringlistmodel.h'
-**
-** Created: Fri Feb 26 11:59:42 2010
-** by: The Qt Meta Object Compiler version 61 (Qt 4.5.3)
-**
-** WARNING! All changes made in this file will be lost!
-*****************************************************************************/
-
-#include "stringlistmodel.h"
-#if !defined(Q_MOC_OUTPUT_REVISION)
-#error "The header file 'stringlistmodel.h' doesn't include <QObject>."
-#elif Q_MOC_OUTPUT_REVISION != 61
-#error "This file was generated using the moc from 4.5.3. It"
-#error "cannot be used with the include files from this version of Qt."
-#error "(The moc has changed too much.)"
-#endif
-
-QT_BEGIN_MOC_NAMESPACE
-static const uint qt_meta_data_StringListModel[] = {
-
- // content:
- 2, // revision
- 0, // classname
- 0, 0, // classinfo
- 0, 0, // methods
- 0, 0, // properties
- 0, 0, // enums/sets
- 0, 0, // constructors
-
- 0 // eod
-};
-
-static const char qt_meta_stringdata_StringListModel[] = {
- "StringListModel\0"
-};
-
-const QMetaObject StringListModel::staticMetaObject = {
- { &QAbstractListModel::staticMetaObject, qt_meta_stringdata_StringListModel,
- qt_meta_data_StringListModel, 0 }
-};
-
-const QMetaObject *StringListModel::metaObject() const
-{
- return &staticMetaObject;
-}
-
-void *StringListModel::qt_metacast(const char *_clname)
-{
- if (!_clname) return 0;
- if (!strcmp(_clname, qt_meta_stringdata_StringListModel))
- return static_cast<void*>(const_cast< StringListModel*>(this));
- return QAbstractListModel::qt_metacast(_clname);
-}
-
-int StringListModel::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
-{
- _id = QAbstractListModel::qt_metacall(_c, _id, _a);
- if (_id < 0)
- return _id;
- return _id;
-}
-QT_END_MOC_NAMESPACE
+++ /dev/null
-#include "resultdialog.h"
-#include "ui_resultdialog.h"
-#include <QPainter>
-
-const QPoint diagramStemStart(50, 350);
-const QPoint diagramStemEnd(50, 30);
-
-const QPoint diagramHorizontalStart(50, 350);
-const QPoint diagramHorizontalEnd(450, 350);
-
-const int diagramGap = 30;
-
-
-// Test arrays for changing speeds and times to the points in diagram
-static const int speedArray[10] = {12, 34, 56, 78, 90, 100, 104, 100, 90, 80};
-static const int timeArray[10] = {1, 2, 3, 4, 5, 6, 7, 8, 10, 12};
-
-
-
-// Test point array for the diagram.
-QPoint points[10];
-
-ResultDialog::ResultDialog(QWidget *parent) :
- QDialog(parent),
- ui(new Ui::ResultDialog)
-{
- ui->setupUi(this);
-
- QString time, timeInteger;
- timeInteger.setNum(timeArray[9]);
- time = "0 - 100 km/h: ";
- time.append(timeInteger);
- ui->labelResult->setText(time);
-
- timeInteger.setNum(timeArray[8]);
- time = "0 - 90 km/h: ";
- time.append(timeInteger);
- ui->labelResult_2->setText(time);
-
- timeInteger.setNum(timeArray[7]);
- time = "0 - 80 km/h: ";
- time.append(timeInteger);
- ui->labelResult_3->setText(time);
-
- timeInteger.setNum(timeArray[6]);
- time = "0 - 70 km/h: ";
- time.append(timeInteger);
- ui->labelResult_4->setText(time);
-
- timeInteger.setNum(timeArray[5]);
- time = "0 - 60 km/h: ";
- time.append(timeInteger);
- ui->labelResult_5->setText(time);
-
- timeInteger.setNum(timeArray[4]);
- time = "0 - 50 km/h: ";
- time.append(timeInteger);
- ui->labelResult_6->setText(time);
-
- timeInteger.setNum(timeArray[3]);
- time = "0 - 40 km/h: ";
- time.append(timeInteger);
- ui->labelResult_7->setText(time);
-
- for(int i = 0; i < 10; i++)
- {
- points[i] = changeMeasuresToDiagramPoint(speedArray[i], timeArray[i]);
- }
- // ui->labelXLine->setText(ui->labelXLine->text().append(": time/ s"));
- // ui->labelYLine->setText(ui->labelYLine->text().append(": speed/ km/h"));
-}
-
-ResultDialog::~ResultDialog()
-{
- delete ui;
-}
-
-void ResultDialog::changeEvent(QEvent *e)
-{
- QDialog::changeEvent(e);
- switch (e->type()) {
- case QEvent::LanguageChange:
- ui->retranslateUi(this);
- break;
- default:
- break;
- }
-}
-
-/**
- * Draws speed diagram to the UI
- *
- */
-void ResultDialog::paintEvent(QPaintEvent *)
-{
- QPainter painter(this);
-
- painter.setRenderHint(QPainter::Antialiasing, true);
- painter.setPen(QPen((Qt::white),2));
- painter.setBrush(QBrush((Qt::yellow), Qt::SolidPattern));
- painter.drawLine(diagramStemStart, diagramStemEnd);
- painter.drawLine(diagramHorizontalStart, diagramHorizontalEnd);
-
- int currentX = diagramStemStart.x();
- int currentY = diagramStemStart.y();
-
- // Draws diagram's X-axel
- for(int i = 0; i<13; i++)
- {
- currentX += diagramGap;
- painter.drawLine(currentX, currentY, currentX, currentY - 10);
- }
-
- currentX = diagramStemStart.x();
- currentY = diagramStemStart.y();
-
- // Draws diagram's Y-axel
- for(int i = 0; i<10; i++)
- {
- currentY -= diagramGap;
- painter.drawLine(currentX, currentY, currentX+10, currentY);
- }
-
- painter.drawPolyline(points, 10);
-
-}
-
-/**
- *Change the given speed and time to the point for the diagram.
- *@param aSpeed is speed which need to change, aTime is time in seconds which need to change.
- *@return point is calculated from aSpeed and aTime.
- **/
-QPoint ResultDialog::changeMeasuresToDiagramPoint(int aSpeed, int aTime)
-{
- QPoint point;
-
- int speedAsPixels;
- int timeAsPixels;
- speedAsPixels = 300*aSpeed/100;
- timeAsPixels = 300*aTime/10;
- point.setY(diagramStemStart.y()-speedAsPixels);
- point.setX(diagramStemStart.x()+timeAsPixels);
-
- return point;
-}
+++ /dev/null
-#ifndef RESULTDIALOG_H
-#define RESULTDIALOG_H
-
-#include <QDialog>
-
-namespace Ui {
- class ResultDialog;
-}
-
-class ResultDialog : public QDialog {
- Q_OBJECT
-public:
- ResultDialog(QWidget *parent = 0);
- ~ResultDialog();
-
-protected:
- void changeEvent(QEvent *e);
- void paintEvent(QPaintEvent *);
-
-private:
- QPoint changeMeasuresToDiagramPoint(int aSpeed, int aTime);
-
-private:
- Ui::ResultDialog *ui;
-};
-
-#endif // RESULTDIALOG_H
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>ResultDialog</class>
- <widget class="QDialog" name="ResultDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>800</width>
- <height>480</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Dialog</string>
- </property>
- <widget class="QLabel" name="labelResult_4">
- <property name="geometry">
- <rect>
- <x>520</x>
- <y>120</y>
- <width>191</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>0 - 50 km/h: 5,6 s</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelResult_7">
- <property name="geometry">
- <rect>
- <x>520</x>
- <y>240</y>
- <width>191</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>0 - 20 km/h: 1,1 s</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelResult">
- <property name="geometry">
- <rect>
- <x>520</x>
- <y>10</y>
- <width>191</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>0 - 100 km/h: 9,8 s</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelResult_6">
- <property name="geometry">
- <rect>
- <x>520</x>
- <y>200</y>
- <width>191</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>0 - 30 km/h: 3,2 s</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelResult_5">
- <property name="geometry">
- <rect>
- <x>520</x>
- <y>160</y>
- <width>191</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>0 - 40 km/h:4,5 s</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelResult_3">
- <property name="geometry">
- <rect>
- <x>520</x>
- <y>80</y>
- <width>191</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>0 - 60 km/h: 6,9 s</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelResult_2">
- <property name="geometry">
- <rect>
- <x>520</x>
- <y>40</y>
- <width>191</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>0 - 80 km/h: 8,6 s</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY2">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>280</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>20</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY6">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>160</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>60</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY1">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>310</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>10</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY10">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>40</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>100</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY3">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>250</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>30</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelYLine">
- <property name="geometry">
- <rect>
- <x>5</x>
- <y>10</y>
- <width>171</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY4">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>220</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>40</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY7">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>130</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>70</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY8">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>100</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>80</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY5">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>190</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>50</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelY9">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>70</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>90</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX1">
- <property name="geometry">
- <rect>
- <x>70</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>1</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX3">
- <property name="geometry">
- <rect>
- <x>130</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>3</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX5">
- <property name="geometry">
- <rect>
- <x>190</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>5</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX9">
- <property name="geometry">
- <rect>
- <x>310</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>9</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX7">
- <property name="geometry">
- <rect>
- <x>250</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>7</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX2">
- <property name="geometry">
- <rect>
- <x>100</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>2</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX6">
- <property name="geometry">
- <rect>
- <x>220</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>6</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX8">
- <property name="geometry">
- <rect>
- <x>280</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>8</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelXLine">
- <property name="geometry">
- <rect>
- <x>50</x>
- <y>360</y>
- <width>170</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX10">
- <property name="geometry">
- <rect>
- <x>340</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>10</string>
- </property>
- </widget>
- <widget class="QLabel" name="labelX4">
- <property name="geometry">
- <rect>
- <x>160</x>
- <y>350</y>
- <width>31</width>
- <height>17</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <family>Bitstream Charter</family>
- <pointsize>8</pointsize>
- </font>
- </property>
- <property name="text">
- <string>4</string>
- </property>
- </widget>
- </widget>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-#include "stringlistmodel.h"
-
-int StringListModel::rowCount(const QModelIndex &parent) const
-{
- return stringList.count();
-}
-
-QVariant StringListModel::data(const QModelIndex &index, int role) const
-{
- if (!index.isValid())
- return QVariant();
-
- if (index.row() < 0 || index.row() >= stringList.size())
- return QVariant();
-
- if (role == Qt::DisplayRole)
- return stringList.at(index.row());
- else
- return QVariant();
-}
-QVariant StringListModel::headerData(int section, Qt::Orientation orientation, int role) const
-{
- if (role != Qt::DisplayRole)
- return QVariant();
-
- if (orientation == Qt::Horizontal)
- return QString("Column %1").arg(section);
- else
- return QString("Row %1").arg(section);
-}
+++ /dev/null
-#ifndef STRINGLISTMODEL_H
-#define STRINGLISTMODEL_H
-#include <QAbstractListModel>
-#include <QObject>
-#include <QStringList>
-
-class StringListModel : public QAbstractListModel
-{
- Q_OBJECT
-public:
- StringListModel(const QStringList &strings, QObject *parent = 0):QAbstractListModel(parent), stringList(strings) {}
- int rowCount(const QModelIndex &parent = QModelIndex()) const;
- QVariant data(const QModelIndex &index, int role) const;
- QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
-
-private:
- QStringList stringList;
-};
-
-#endif // STRINGLISTMODEL_H
+++ /dev/null
-/********************************************************************************
-** Form generated from reading ui file 'carmainwindow.ui'
-**
-** Created: Fri Feb 26 11:59:25 2010
-** by: Qt User Interface Compiler version 4.5.3
-**
-** WARNING! All changes made in this file will be lost when recompiling ui file!
-********************************************************************************/
-
-#ifndef UI_CARMAINWINDOW_H
-#define UI_CARMAINWINDOW_H
-
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QComboBox>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-#include <QtGui/QLineEdit>
-#include <QtGui/QListView>
-#include <QtGui/QMainWindow>
-#include <QtGui/QMenuBar>
-#include <QtGui/QPushButton>
-#include <QtGui/QStatusBar>
-#include <QtGui/QTabWidget>
-#include <QtGui/QToolBar>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QWidget>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_CarMainWindow
-{
-public:
- QWidget *centralWidget;
- QTabWidget *tabWidget;
- QWidget *StartTab;
- QWidget *layoutWidget;
- QVBoxLayout *verticalLayout;
- QPushButton *autoStartButton;
- QPushButton *manualStartButton;
- QListView *listView;
- QWidget *widget;
- QVBoxLayout *verticalLayout_2;
- QLabel *startLabel;
- QLineEdit *minLineEdit;
- QLabel *stopLabel;
- QLineEdit *maxLineEdit;
- QLabel *unitLabel;
- QComboBox *unitComboBox;
- QWidget *settingsTab;
- QWidget *widget1;
- QHBoxLayout *horizontalLayout;
- QPushButton *view1Button;
- QPushButton *view2Button;
- QPushButton *view3Button;
- QPushButton *view4Button;
- QMenuBar *menuBar;
- QToolBar *mainToolBar;
- QStatusBar *statusBar;
-
- void setupUi(QMainWindow *CarMainWindow)
- {
- if (CarMainWindow->objectName().isEmpty())
- CarMainWindow->setObjectName(QString::fromUtf8("CarMainWindow"));
- CarMainWindow->resize(800, 480);
- centralWidget = new QWidget(CarMainWindow);
- centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
- tabWidget = new QTabWidget(centralWidget);
- tabWidget->setObjectName(QString::fromUtf8("tabWidget"));
- tabWidget->setGeometry(QRect(10, 0, 781, 365));
- 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(layoutWidget);
- autoStartButton->setObjectName(QString::fromUtf8("autoStartButton"));
- QFont font;
- font.setFamily(QString::fromUtf8("Bitstream Charter"));
- font.setPointSize(16);
- font.setBold(true);
- font.setWeight(75);
- autoStartButton->setFont(font);
-
- verticalLayout->addWidget(autoStartButton);
-
- manualStartButton = new QPushButton(layoutWidget);
- manualStartButton->setObjectName(QString::fromUtf8("manualStartButton"));
- manualStartButton->setFont(font);
-
- verticalLayout->addWidget(manualStartButton);
-
- listView = new QListView(StartTab);
- listView->setObjectName(QString::fromUtf8("listView"));
- listView->setGeometry(QRect(0, 10, 261, 301));
- widget = new QWidget(StartTab);
- widget->setObjectName(QString::fromUtf8("widget"));
- widget->setGeometry(QRect(270, 10, 311, 301));
- verticalLayout_2 = new QVBoxLayout(widget);
- verticalLayout_2->setSpacing(6);
- verticalLayout_2->setMargin(11);
- verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
- verticalLayout_2->setContentsMargins(0, 0, 0, 0);
- startLabel = new QLabel(widget);
- startLabel->setObjectName(QString::fromUtf8("startLabel"));
-
- verticalLayout_2->addWidget(startLabel);
-
- minLineEdit = new QLineEdit(widget);
- minLineEdit->setObjectName(QString::fromUtf8("minLineEdit"));
-
- verticalLayout_2->addWidget(minLineEdit);
-
- stopLabel = new QLabel(widget);
- stopLabel->setObjectName(QString::fromUtf8("stopLabel"));
-
- verticalLayout_2->addWidget(stopLabel);
-
- maxLineEdit = new QLineEdit(widget);
- maxLineEdit->setObjectName(QString::fromUtf8("maxLineEdit"));
-
- verticalLayout_2->addWidget(maxLineEdit);
-
- unitLabel = new QLabel(widget);
- unitLabel->setObjectName(QString::fromUtf8("unitLabel"));
-
- verticalLayout_2->addWidget(unitLabel);
-
- unitComboBox = new QComboBox(widget);
- unitComboBox->setObjectName(QString::fromUtf8("unitComboBox"));
-
- verticalLayout_2->addWidget(unitComboBox);
-
- tabWidget->addTab(StartTab, QString());
- settingsTab = new QWidget();
- settingsTab->setObjectName(QString::fromUtf8("settingsTab"));
- tabWidget->addTab(settingsTab, QString());
- widget1 = new QWidget(centralWidget);
- widget1->setObjectName(QString::fromUtf8("widget1"));
- widget1->setGeometry(QRect(10, 370, 781, 41));
- horizontalLayout = new QHBoxLayout(widget1);
- horizontalLayout->setSpacing(6);
- horizontalLayout->setMargin(11);
- horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
- horizontalLayout->setContentsMargins(0, 0, 0, 0);
- view1Button = new QPushButton(widget1);
- view1Button->setObjectName(QString::fromUtf8("view1Button"));
-
- horizontalLayout->addWidget(view1Button);
-
- view2Button = new QPushButton(widget1);
- view2Button->setObjectName(QString::fromUtf8("view2Button"));
-
- horizontalLayout->addWidget(view2Button);
-
- view3Button = new QPushButton(widget1);
- view3Button->setObjectName(QString::fromUtf8("view3Button"));
-
- horizontalLayout->addWidget(view3Button);
-
- view4Button = new QPushButton(widget1);
- view4Button->setObjectName(QString::fromUtf8("view4Button"));
-
- horizontalLayout->addWidget(view4Button);
-
- CarMainWindow->setCentralWidget(centralWidget);
- menuBar = new QMenuBar(CarMainWindow);
- menuBar->setObjectName(QString::fromUtf8("menuBar"));
- menuBar->setGeometry(QRect(0, 0, 800, 27));
- CarMainWindow->setMenuBar(menuBar);
- mainToolBar = new QToolBar(CarMainWindow);
- mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
- CarMainWindow->addToolBar(Qt::TopToolBarArea, mainToolBar);
- statusBar = new QStatusBar(CarMainWindow);
- statusBar->setObjectName(QString::fromUtf8("statusBar"));
- CarMainWindow->setStatusBar(statusBar);
-
- retranslateUi(CarMainWindow);
-
- tabWidget->setCurrentIndex(0);
-
-
- QMetaObject::connectSlotsByName(CarMainWindow);
- } // setupUi
-
- void retranslateUi(QMainWindow *CarMainWindow)
- {
- CarMainWindow->setWindowTitle(QApplication::translate("CarMainWindow", "CarMainWindow", 0, QApplication::UnicodeUTF8));
- autoStartButton->setText(QApplication::translate("CarMainWindow", "Auto start", 0, QApplication::UnicodeUTF8));
- manualStartButton->setText(QApplication::translate("CarMainWindow", "Manual start", 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));
- tabWidget->setTabText(tabWidget->indexOf(settingsTab), QApplication::translate("CarMainWindow", "Settings", 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));
- Q_UNUSED(CarMainWindow);
- } // retranslateUi
-
-};
-
-namespace Ui {
- class CarMainWindow: public Ui_CarMainWindow {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_CARMAINWINDOW_H
+++ /dev/null
-/********************************************************************************
-** Form generated from reading ui file 'measuredialog.ui'
-**
-** Created: Fri Feb 26 11:59:25 2010
-** by: Qt User Interface Compiler version 4.5.3
-**
-** WARNING! All changes made in this file will be lost when recompiling ui file!
-********************************************************************************/
-
-#ifndef UI_MEASUREDIALOG_H
-#define UI_MEASUREDIALOG_H
-
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QDialog>
-#include <QtGui/QHBoxLayout>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-#include <QtGui/QPushButton>
-#include <QtGui/QVBoxLayout>
-#include <QtGui/QWidget>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_MeasureDialog
-{
-public:
- QLabel *label_7;
- QWidget *layoutWidget;
- QHBoxLayout *horizontalLayout;
- QVBoxLayout *verticalLayout;
- QLabel *label;
- QLabel *label_2;
- QLabel *label_3;
- QVBoxLayout *verticalLayout_2;
- QLabel *label_6;
- QLabel *label_4;
- QLabel *label_5;
- QPushButton *pushButtonAbort;
-
- void setupUi(QDialog *MeasureDialog)
- {
- if (MeasureDialog->objectName().isEmpty())
- MeasureDialog->setObjectName(QString::fromUtf8("MeasureDialog"));
- MeasureDialog->resize(800, 480);
- label_7 = new QLabel(MeasureDialog);
- label_7->setObjectName(QString::fromUtf8("label_7"));
- label_7->setGeometry(QRect(130, 40, 361, 51));
- layoutWidget = new QWidget(MeasureDialog);
- layoutWidget->setObjectName(QString::fromUtf8("layoutWidget"));
- layoutWidget->setGeometry(QRect(110, 120, 271, 151));
- horizontalLayout = new QHBoxLayout(layoutWidget);
- horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
- horizontalLayout->setContentsMargins(0, 0, 0, 0);
- verticalLayout = new QVBoxLayout();
- verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
- label = new QLabel(layoutWidget);
- label->setObjectName(QString::fromUtf8("label"));
-
- verticalLayout->addWidget(label);
-
- label_2 = new QLabel(layoutWidget);
- label_2->setObjectName(QString::fromUtf8("label_2"));
-
- verticalLayout->addWidget(label_2);
-
- label_3 = new QLabel(layoutWidget);
- label_3->setObjectName(QString::fromUtf8("label_3"));
-
- verticalLayout->addWidget(label_3);
-
-
- horizontalLayout->addLayout(verticalLayout);
-
- verticalLayout_2 = new QVBoxLayout();
- verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2"));
- label_6 = new QLabel(layoutWidget);
- label_6->setObjectName(QString::fromUtf8("label_6"));
-
- verticalLayout_2->addWidget(label_6);
-
- label_4 = new QLabel(layoutWidget);
- label_4->setObjectName(QString::fromUtf8("label_4"));
-
- verticalLayout_2->addWidget(label_4);
-
- label_5 = new QLabel(layoutWidget);
- label_5->setObjectName(QString::fromUtf8("label_5"));
-
- verticalLayout_2->addWidget(label_5);
-
-
- horizontalLayout->addLayout(verticalLayout_2);
-
- pushButtonAbort = new QPushButton(MeasureDialog);
- pushButtonAbort->setObjectName(QString::fromUtf8("pushButtonAbort"));
- pushButtonAbort->setGeometry(QRect(200, 300, 93, 27));
-
- retranslateUi(MeasureDialog);
-
- QMetaObject::connectSlotsByName(MeasureDialog);
- } // setupUi
-
- void retranslateUi(QDialog *MeasureDialog)
- {
- MeasureDialog->setWindowTitle(QApplication::translate("MeasureDialog", "Dialog", 0, QApplication::UnicodeUTF8));
- label_7->setText(QApplication::translate("MeasureDialog", "Selected measurement: 0 - 100 km/h", 0, QApplication::UnicodeUTF8));
- label->setText(QApplication::translate("MeasureDialog", "Time:", 0, QApplication::UnicodeUTF8));
- label_2->setText(QApplication::translate("MeasureDialog", "Speed:", 0, QApplication::UnicodeUTF8));
- label_3->setText(QApplication::translate("MeasureDialog", "Distance:", 0, QApplication::UnicodeUTF8));
- label_6->setText(QApplication::translate("MeasureDialog", "14 s", 0, QApplication::UnicodeUTF8));
- label_4->setText(QApplication::translate("MeasureDialog", "86 km/h", 0, QApplication::UnicodeUTF8));
- label_5->setText(QApplication::translate("MeasureDialog", "120 m", 0, QApplication::UnicodeUTF8));
- pushButtonAbort->setText(QApplication::translate("MeasureDialog", "Abort", 0, QApplication::UnicodeUTF8));
- Q_UNUSED(MeasureDialog);
- } // retranslateUi
-
-};
-
-namespace Ui {
- class MeasureDialog: public Ui_MeasureDialog {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_MEASUREDIALOG_H
+++ /dev/null
-/********************************************************************************
-** Form generated from reading ui file 'resultdialog.ui'
-**
-** Created: Wed Feb 24 13:07:28 2010
-** by: Qt User Interface Compiler version 4.5.3
-**
-** WARNING! All changes made in this file will be lost when recompiling ui file!
-********************************************************************************/
-
-#ifndef UI_RESULTDIALOG_H
-#define UI_RESULTDIALOG_H
-
-#include <QtCore/QVariant>
-#include <QtGui/QAction>
-#include <QtGui/QApplication>
-#include <QtGui/QButtonGroup>
-#include <QtGui/QDialog>
-#include <QtGui/QHeaderView>
-#include <QtGui/QLabel>
-
-QT_BEGIN_NAMESPACE
-
-class Ui_ResultDialog
-{
-public:
- QLabel *labelResult_4;
- QLabel *labelResult_7;
- QLabel *labelResult;
- QLabel *labelResult_6;
- QLabel *labelResult_5;
- QLabel *labelResult_3;
- QLabel *labelResult_2;
- QLabel *labelY2;
- QLabel *labelY6;
- QLabel *labelY1;
- QLabel *labelY10;
- QLabel *labelY3;
- QLabel *labelYLine;
- QLabel *labelY4;
- QLabel *labelY7;
- QLabel *labelY8;
- QLabel *labelY5;
- QLabel *labelY9;
- QLabel *labelX1;
- QLabel *labelX3;
- QLabel *labelX5;
- QLabel *labelX9;
- QLabel *labelX7;
- QLabel *labelX2;
- QLabel *labelX6;
- QLabel *labelX8;
- QLabel *labelXLine;
- QLabel *labelX10;
- QLabel *labelX4;
-
- void setupUi(QDialog *ResultDialog)
- {
- if (ResultDialog->objectName().isEmpty())
- ResultDialog->setObjectName(QString::fromUtf8("ResultDialog"));
- ResultDialog->resize(800, 480);
- labelResult_4 = new QLabel(ResultDialog);
- labelResult_4->setObjectName(QString::fromUtf8("labelResult_4"));
- labelResult_4->setGeometry(QRect(520, 120, 191, 31));
- labelResult_7 = new QLabel(ResultDialog);
- labelResult_7->setObjectName(QString::fromUtf8("labelResult_7"));
- labelResult_7->setGeometry(QRect(520, 240, 191, 31));
- labelResult = new QLabel(ResultDialog);
- labelResult->setObjectName(QString::fromUtf8("labelResult"));
- labelResult->setGeometry(QRect(520, 10, 191, 31));
- labelResult_6 = new QLabel(ResultDialog);
- labelResult_6->setObjectName(QString::fromUtf8("labelResult_6"));
- labelResult_6->setGeometry(QRect(520, 200, 191, 31));
- labelResult_5 = new QLabel(ResultDialog);
- labelResult_5->setObjectName(QString::fromUtf8("labelResult_5"));
- labelResult_5->setGeometry(QRect(520, 160, 191, 31));
- labelResult_3 = new QLabel(ResultDialog);
- labelResult_3->setObjectName(QString::fromUtf8("labelResult_3"));
- labelResult_3->setGeometry(QRect(520, 80, 191, 31));
- labelResult_2 = new QLabel(ResultDialog);
- labelResult_2->setObjectName(QString::fromUtf8("labelResult_2"));
- labelResult_2->setGeometry(QRect(520, 40, 191, 31));
- labelY2 = new QLabel(ResultDialog);
- labelY2->setObjectName(QString::fromUtf8("labelY2"));
- labelY2->setGeometry(QRect(20, 280, 31, 17));
- QFont font;
- font.setFamily(QString::fromUtf8("Bitstream Charter"));
- font.setPointSize(8);
- labelY2->setFont(font);
- labelY6 = new QLabel(ResultDialog);
- labelY6->setObjectName(QString::fromUtf8("labelY6"));
- labelY6->setGeometry(QRect(20, 160, 31, 17));
- labelY6->setFont(font);
- labelY1 = new QLabel(ResultDialog);
- labelY1->setObjectName(QString::fromUtf8("labelY1"));
- labelY1->setGeometry(QRect(20, 310, 31, 17));
- labelY1->setFont(font);
- labelY10 = new QLabel(ResultDialog);
- labelY10->setObjectName(QString::fromUtf8("labelY10"));
- labelY10->setGeometry(QRect(20, 40, 31, 17));
- labelY10->setFont(font);
- labelY3 = new QLabel(ResultDialog);
- labelY3->setObjectName(QString::fromUtf8("labelY3"));
- labelY3->setGeometry(QRect(20, 250, 31, 17));
- labelY3->setFont(font);
- labelYLine = new QLabel(ResultDialog);
- labelYLine->setObjectName(QString::fromUtf8("labelYLine"));
- labelYLine->setGeometry(QRect(5, 10, 171, 17));
- labelYLine->setFont(font);
- labelY4 = new QLabel(ResultDialog);
- labelY4->setObjectName(QString::fromUtf8("labelY4"));
- labelY4->setGeometry(QRect(20, 220, 31, 17));
- labelY4->setFont(font);
- labelY7 = new QLabel(ResultDialog);
- labelY7->setObjectName(QString::fromUtf8("labelY7"));
- labelY7->setGeometry(QRect(20, 130, 31, 17));
- labelY7->setFont(font);
- labelY8 = new QLabel(ResultDialog);
- labelY8->setObjectName(QString::fromUtf8("labelY8"));
- labelY8->setGeometry(QRect(20, 100, 31, 17));
- labelY8->setFont(font);
- labelY5 = new QLabel(ResultDialog);
- labelY5->setObjectName(QString::fromUtf8("labelY5"));
- labelY5->setGeometry(QRect(20, 190, 31, 17));
- labelY5->setFont(font);
- labelY9 = new QLabel(ResultDialog);
- labelY9->setObjectName(QString::fromUtf8("labelY9"));
- labelY9->setGeometry(QRect(20, 70, 31, 17));
- labelY9->setFont(font);
- labelX1 = new QLabel(ResultDialog);
- labelX1->setObjectName(QString::fromUtf8("labelX1"));
- labelX1->setGeometry(QRect(70, 350, 31, 17));
- labelX1->setFont(font);
- labelX3 = new QLabel(ResultDialog);
- labelX3->setObjectName(QString::fromUtf8("labelX3"));
- labelX3->setGeometry(QRect(130, 350, 31, 17));
- labelX3->setFont(font);
- labelX5 = new QLabel(ResultDialog);
- labelX5->setObjectName(QString::fromUtf8("labelX5"));
- labelX5->setGeometry(QRect(190, 350, 31, 17));
- labelX5->setFont(font);
- labelX9 = new QLabel(ResultDialog);
- labelX9->setObjectName(QString::fromUtf8("labelX9"));
- labelX9->setGeometry(QRect(310, 350, 31, 17));
- labelX9->setFont(font);
- labelX7 = new QLabel(ResultDialog);
- labelX7->setObjectName(QString::fromUtf8("labelX7"));
- labelX7->setGeometry(QRect(250, 350, 31, 17));
- labelX7->setFont(font);
- labelX2 = new QLabel(ResultDialog);
- labelX2->setObjectName(QString::fromUtf8("labelX2"));
- labelX2->setGeometry(QRect(100, 350, 31, 17));
- labelX2->setFont(font);
- labelX6 = new QLabel(ResultDialog);
- labelX6->setObjectName(QString::fromUtf8("labelX6"));
- labelX6->setGeometry(QRect(220, 350, 31, 17));
- labelX6->setFont(font);
- labelX8 = new QLabel(ResultDialog);
- labelX8->setObjectName(QString::fromUtf8("labelX8"));
- labelX8->setGeometry(QRect(280, 350, 31, 17));
- labelX8->setFont(font);
- labelXLine = new QLabel(ResultDialog);
- labelXLine->setObjectName(QString::fromUtf8("labelXLine"));
- labelXLine->setGeometry(QRect(50, 360, 170, 17));
- labelXLine->setFont(font);
- labelX10 = new QLabel(ResultDialog);
- labelX10->setObjectName(QString::fromUtf8("labelX10"));
- labelX10->setGeometry(QRect(340, 350, 31, 17));
- labelX10->setFont(font);
- labelX4 = new QLabel(ResultDialog);
- labelX4->setObjectName(QString::fromUtf8("labelX4"));
- labelX4->setGeometry(QRect(160, 350, 31, 17));
- labelX4->setFont(font);
-
- retranslateUi(ResultDialog);
-
- QMetaObject::connectSlotsByName(ResultDialog);
- } // setupUi
-
- void retranslateUi(QDialog *ResultDialog)
- {
- ResultDialog->setWindowTitle(QApplication::translate("ResultDialog", "Dialog", 0, QApplication::UnicodeUTF8));
- labelResult_4->setText(QApplication::translate("ResultDialog", "0 - 50 km/h: 5,6 s", 0, QApplication::UnicodeUTF8));
- labelResult_7->setText(QApplication::translate("ResultDialog", "0 - 20 km/h: 1,1 s", 0, QApplication::UnicodeUTF8));
- labelResult->setText(QApplication::translate("ResultDialog", "0 - 100 km/h: 9,8 s", 0, QApplication::UnicodeUTF8));
- labelResult_6->setText(QApplication::translate("ResultDialog", "0 - 30 km/h: 3,2 s", 0, QApplication::UnicodeUTF8));
- labelResult_5->setText(QApplication::translate("ResultDialog", "0 - 40 km/h:4,5 s", 0, QApplication::UnicodeUTF8));
- labelResult_3->setText(QApplication::translate("ResultDialog", "0 - 60 km/h: 6,9 s", 0, QApplication::UnicodeUTF8));
- labelResult_2->setText(QApplication::translate("ResultDialog", "0 - 80 km/h: 8,6 s", 0, QApplication::UnicodeUTF8));
- labelY2->setText(QApplication::translate("ResultDialog", "20", 0, QApplication::UnicodeUTF8));
- labelY6->setText(QApplication::translate("ResultDialog", "60", 0, QApplication::UnicodeUTF8));
- labelY1->setText(QApplication::translate("ResultDialog", "10", 0, QApplication::UnicodeUTF8));
- labelY10->setText(QApplication::translate("ResultDialog", "100", 0, QApplication::UnicodeUTF8));
- labelY3->setText(QApplication::translate("ResultDialog", "30", 0, QApplication::UnicodeUTF8));
- labelYLine->setText(QApplication::translate("ResultDialog", "Y", 0, QApplication::UnicodeUTF8));
- labelY4->setText(QApplication::translate("ResultDialog", "40", 0, QApplication::UnicodeUTF8));
- labelY7->setText(QApplication::translate("ResultDialog", "70", 0, QApplication::UnicodeUTF8));
- labelY8->setText(QApplication::translate("ResultDialog", "80", 0, QApplication::UnicodeUTF8));
- labelY5->setText(QApplication::translate("ResultDialog", "50", 0, QApplication::UnicodeUTF8));
- labelY9->setText(QApplication::translate("ResultDialog", "90", 0, QApplication::UnicodeUTF8));
- labelX1->setText(QApplication::translate("ResultDialog", "1", 0, QApplication::UnicodeUTF8));
- labelX3->setText(QApplication::translate("ResultDialog", "3", 0, QApplication::UnicodeUTF8));
- labelX5->setText(QApplication::translate("ResultDialog", "5", 0, QApplication::UnicodeUTF8));
- labelX9->setText(QApplication::translate("ResultDialog", "9", 0, QApplication::UnicodeUTF8));
- labelX7->setText(QApplication::translate("ResultDialog", "7", 0, QApplication::UnicodeUTF8));
- labelX2->setText(QApplication::translate("ResultDialog", "2", 0, QApplication::UnicodeUTF8));
- labelX6->setText(QApplication::translate("ResultDialog", "6", 0, QApplication::UnicodeUTF8));
- labelX8->setText(QApplication::translate("ResultDialog", "8", 0, QApplication::UnicodeUTF8));
- 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));
- Q_UNUSED(ResultDialog);
- } // retranslateUi
-
-};
-
-namespace Ui {
- class ResultDialog: public Ui_ResultDialog {};
-} // namespace Ui
-
-QT_END_NAMESPACE
-
-#endif // UI_RESULTDIALOG_H