connect(httpClient->myXmlreader, SIGNAL(receivedTop10List()), this, SLOT(showTop10()));
welcomeDialog = new WelcomeDialog;
- //welcomeDialog->show();
+ welcomeDialog->show();
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);
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)
}
/**
- * 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()
}
}
/**
- * This slot function called when ever dialog finished.
+ * This slot function called when ever dialog rejected.
*/
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();
+}