Merge branch 'feature/distance'
authorJanne Änäkkälä <janne_anakkala@hotmail.com>
Tue, 27 Apr 2010 10:37:58 +0000 (13:37 +0300)
committerJanne Änäkkälä <janne_anakkala@hotmail.com>
Tue, 27 Apr 2010 10:37:58 +0000 (13:37 +0300)
Client/mainwindow.cpp
Client/mainwindow.h
Client/mainwindow.ui
Client/speedfreak.pro

index b2342f6..741b179 100644 (file)
@@ -46,8 +46,8 @@ MainWindow::MainWindow(QWidget *parent) :
     this->setUsernameToMainPanel();
 
     //Button settings
-    ui->pushButtonAccelerate->setAutoFillBackground(true);
-    ui->pushButtonAccelerate->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
+    //ui->pushButtonAccelerate->setAutoFillBackground(true);
+    //ui->pushButtonAccelerate->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     ui->pushButtonRoute->setAutoFillBackground(true);
     ui->pushButtonRoute->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     ui->pushButtonResults->setAutoFillBackground(true);
@@ -58,7 +58,7 @@ MainWindow::MainWindow(QWidget *parent) :
     ui->pushButtonWWW->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
     ui->pushButtonCredits->setAutoFillBackground(true);
     ui->pushButtonCredits->setStyleSheet("background-color: rgb(0, 0, 0); color: rgb(255, 255, 255)");
-    /*
+
     QIcon* icon = new QIcon();
     icon->addFile(QString(":/new/prefix1/Graphics/Speedometer.png"), QSize(125,125), QIcon::Normal, QIcon::Off);
     icon->addFile(QString(":/new/prefix1/Graphics/Speedometer2.png"), QSize(125,125), QIcon::Normal, QIcon::On);
@@ -71,7 +71,7 @@ MainWindow::MainWindow(QWidget *parent) :
     connect(customButtonAccelerate, SIGNAL(OpenDialog()), this, SLOT(OpenAccStartDialog()));
 
     customButtonAccelerate->show();
-    */
+
 }
 
 MainWindow::~MainWindow()
@@ -98,10 +98,10 @@ MainWindow::~MainWindow()
 
     if(helpDialog)
         delete helpDialog;
-/*
+
     if(customButtonAccelerate)
         delete customButtonAccelerate;
-*/
+
 }
 
 void MainWindow::changeEvent(QEvent *e)
@@ -158,19 +158,6 @@ void MainWindow::on_pushButtonSettings_clicked()
 }
 
 /**
-  * This slot function opens the acceleration dialog
-  */
-void MainWindow::on_pushButtonAccelerate_clicked()
-{
-    if(!accstart)
-        accstart = new accelerationstart(this);
-
-    connect(accstart, SIGNAL(sendresult(QString, double)), this, SLOT(clientSendResult(QString, double)));
-    connect(accstart, SIGNAL(rejected()), this, SLOT(killDialog()));
-    accstart->show();
-}
-
-/**
   * This slot function opens the top results dialog
   */
 void MainWindow::on_pushButtonResults_clicked()
@@ -349,6 +336,7 @@ void MainWindow::OpenAccStartDialog()
 {
     if(!accstart)
         accstart = new accelerationstart(this);
+
     connect(accstart, SIGNAL(sendresult(QString, double)), this, SLOT(clientSendResult(QString, double)));
     connect(accstart, SIGNAL(rejected()), this, SLOT(killDialog()));
     accstart->show();
index 3c1ae06..9fe56f7 100644 (file)
@@ -60,7 +60,6 @@ private:
 
 private slots:
     void on_pushButtonResults_clicked();
-    void on_pushButtonAccelerate_clicked();
     void on_pushButtonSettings_clicked();
     void on_pushButtonRoute_clicked();
     void on_pushButtonCredits_clicked();
index 0bec122..0580f42 100644 (file)
    <string>SpeedFreak</string>
   </property>
   <widget class="QWidget" name="centralWidget">
-   <widget class="QPushButton" name="pushButtonAccelerate">
-    <property name="geometry">
-     <rect>
-      <x>50</x>
-      <y>150</y>
-      <width>130</width>
-      <height>130</height>
-     </rect>
-    </property>
-    <property name="text">
-     <string/>
-    </property>
-    <property name="icon">
-     <iconset resource="graphics.qrc">
-      <normaloff>:/new/prefix1/Graphics/Speedometer.png</normaloff>
-      <normalon>:/new/prefix1/Graphics/Speedometer2.png</normalon>
-      <disabledon>:/new/prefix1/Graphics/Speedometer2.png</disabledon>
-      <activeon>:/new/prefix1/Graphics/Speedometer2.png</activeon>
-      <selectedon>:/new/prefix1/Graphics/Speedometer2.png</selectedon>:/new/prefix1/Graphics/Speedometer.png</iconset>
-    </property>
-    <property name="iconSize">
-     <size>
-      <width>125</width>
-      <height>125</height>
-     </size>
-    </property>
-   </widget>
    <widget class="QPushButton" name="pushButtonRoute">
     <property name="geometry">
      <rect>
index dd99248..74cc7e2 100644 (file)
@@ -37,7 +37,8 @@ SOURCES += main.cpp \
     helpresultsdialog.cpp \
     helpaccelerationdialog.cpp \
     helproutingdialog.cpp \
-    helpsettingsdialog.cpp
+    helpsettingsdialog.cpp \
+    custombutton.cpp
 HEADERS += mainwindow.h \
     creditsdialog.h \
     routedialog.h \
@@ -65,7 +66,8 @@ HEADERS += mainwindow.h \
     helpresultsdialog.h \
     helpaccelerationdialog.h \
     helproutingdialog.h \
-    helpsettingsdialog.h
+    helpsettingsdialog.h \
+    custombutton.h
 FORMS += mainwindow.ui \
     creditsdialog.ui \
     routedialog.ui \
@@ -88,7 +90,7 @@ contains(QT_CONFIG, hildon):CONFIG += hildon
 CONFIG += link_pkgconfig
 
 # Enable this to disable debugging
-#DEFINES += QT_NO_DEBUG_OUTPUT
+# DEFINES += QT_NO_DEBUG_OUTPUT
 target.path += /usr/lib
 devincludes.files = $$HEADERS
 devincludes.path += /usr/include/$$TEMPLATE$$TARGET