Merge branch 'test/route'
authorToni Jussila <toni.jussila@fudeco.com>
Mon, 26 Apr 2010 07:34:20 +0000 (10:34 +0300)
committerToni Jussila <toni.jussila@fudeco.com>
Mon, 26 Apr 2010 07:34:20 +0000 (10:34 +0300)
1  2 
Client/mainwindow.cpp

diff --combined Client/mainwindow.cpp
@@@ -58,20 -58,6 +58,20 @@@ 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);
 +
 +    customButtonAccelerate = new CustomButton(this,icon);
 +    delete icon;
 +
 +    int buttons_x = 50,buttons_y = 165;
 +    customButtonAccelerate->setGeometry(buttons_x,buttons_y,130,130);
 +    connect(customButtonAccelerate, SIGNAL(OpenDialog()), this, SLOT(OpenAccStartDialog()));
 +
 +    customButtonAccelerate->show();
 +    */
  }
  
  MainWindow::~MainWindow()
  
      if(helpDialog)
          delete helpDialog;
 +/*
 +    if(customButtonAccelerate)
 +        delete customButtonAccelerate;
 +*/
  }
  
  void MainWindow::changeEvent(QEvent *e)
@@@ -132,7 -114,6 +132,7 @@@ void MainWindow::on_pushButtonCredits_c
      if(!helpDialog)
          helpDialog = new HelpDialog;
  
 +    connect(helpDialog, SIGNAL(rejected()), this, SLOT(killDialog()));
      helpDialog->show();
  }
  
@@@ -328,7 -309,9 +328,9 @@@ void MainWindow::killDialog(
          helpDialog = NULL;
      }
  }
+ /**
+   *
+   */
  void MainWindow::setUsernameToMainPanel()
  {
      if (loginSaved())
          this->setWindowTitle("SpeedFreak - Not logged");
      }
  }
 +/**
 +  * This slot function opens acceleration start dialog.
 +  */
 +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();
 +}