From: Tiina Kivilinna-Korhola Date: Wed, 31 Mar 2010 11:55:42 +0000 (+0300) Subject: Some changes. X-Git-Tag: v0.2-RC1~5^2 X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=commitdiff_plain;h=4dad132ee89fdd68067a3cab27ecc095f0f863dc Some changes. --- diff --git a/Client/accelerationstart.cpp b/Client/accelerationstart.cpp index 9315f6b..0a67211 100644 --- a/Client/accelerationstart.cpp +++ b/Client/accelerationstart.cpp @@ -74,8 +74,8 @@ void accelerationstart::on_categorComboBox_currentIndexChanged( int index ) { stopMeasureSpeed = 0; if( index == 1 ) { - stopMeasureSpeed = 10; - measureCategory = "acceleration-0-10"; + stopMeasureSpeed = 20; + measureCategory = "acceleration-0-20"; } else if( index == 2 ) { stopMeasureSpeed = 40; diff --git a/Client/httpclient.cpp b/Client/httpclient.cpp index 69f932e..2d1cb54 100644 --- a/Client/httpclient.cpp +++ b/Client/httpclient.cpp @@ -212,7 +212,7 @@ void HttpClient::ackOfResult() } else { qDebug() << "errorcode:" << errorcode << reply->errorString(); - //QMessageBox::about(myMainw->resultDialog, "Server reply to result sending", "Result received " + reply->readAll()); + QMessageBox::about(myMainw->resultDialog, "Server reply to result sending", "Result received " + reply->readAll()); } } @@ -235,7 +235,7 @@ void HttpClient::ackOfRoute() } else { qDebug() << "errorcode:" << errorcode << reply->errorString(); - //QMessageBox::about(myMainw, "Server reply to route sending", "Route received " + reply->readAll()); + QMessageBox::about(myMainw, "Server reply to route sending", "Route received " + reply->readAll()); } } @@ -259,7 +259,7 @@ void HttpClient::ackOfRegistration() } else { qDebug() << "errorcode=0" << errorcode << reply->errorString(); - //QMessageBox::about(myMainw->settingsDialog, "Server reply to registration", "User registration " + reply->readAll()); + QMessageBox::about(myMainw->settingsDialog, "Server reply to registration", "User registration " + reply->readAll()); } } @@ -284,7 +284,7 @@ void HttpClient::ackOfCategories() } else { qDebug() << "errorcode:" << errorcode << reply->errorString(); - //QMessageBox::about(myMainw->topResultDialog, "Server reply to requesting categories ", "OK"); + QMessageBox::about(myMainw->topResultDialog, "Server reply to requesting categories ", "OK"); } } @@ -308,7 +308,7 @@ void HttpClient::ackOfLogin() } else { qDebug() << "errorcode:" << errorcode << reply->errorString(); - //QMessageBox::about(myMainw->settingsDialog, "Server reply to login", "User login " + reply->readAll()); + QMessageBox::about(myMainw->settingsDialog, "Server reply to login", "User login " + reply->readAll()); } myMainw->settingsDialog->close(); diff --git a/Client/mainwindow.cpp b/Client/mainwindow.cpp index bb1e671..d495074 100644 --- a/Client/mainwindow.cpp +++ b/Client/mainwindow.cpp @@ -42,7 +42,7 @@ MainWindow::MainWindow(QWidget *parent) : connect(httpClient->myXmlreader, SIGNAL(receivedCategoryList()), this, SLOT(setCategoryCompoBox())); connect(httpClient->myXmlreader, SIGNAL(receivedTop10List()), this, SLOT(showTop10())); resultDialog = new ResultDialog; - connect(resultDialog, SIGNAL(sendResult(double)), this, SLOT(clientSendResult(double))); + connect(resultDialog, SIGNAL(sendresult()), this, SLOT(clientSendResult())); welcomeDialog = new WelcomeDialog; welcomeDialog->show(); @@ -200,9 +200,11 @@ void MainWindow::clientSendRoute() httpClient->sendRouteXml(); } -void MainWindow::clientSendResult(double result) +void MainWindow::clientSendResult() { + qDebug() << "_clientSendResult"; if(accstart) { - httpClient->sendResultXml(accstart->getMeasureCategory(), result); + qDebug() << "_clientSendResult, calling server"; + httpClient->sendResultXml(accstart->getMeasureCategory(), resultDialog->getResult()); } } diff --git a/Client/mainwindow.h b/Client/mainwindow.h index 58975a4..23a6c17 100644 --- a/Client/mainwindow.h +++ b/Client/mainwindow.h @@ -65,9 +65,10 @@ private slots: void clientSendRoute(); void clientRegUserToServer(); void clientUserLogin(); - void clientSendResult(double result); + void clientSendResult(); void setCategoryCompoBox(); void showTop10(); + }; #endif // MAINWINDOW_H diff --git a/Client/resultdialog.cpp b/Client/resultdialog.cpp index f505348..a01a168 100644 --- a/Client/resultdialog.cpp +++ b/Client/resultdialog.cpp @@ -318,7 +318,13 @@ void ResultDialog::on_pushButtonNew_clicked() */ void ResultDialog::on_pushButtonSend_clicked() { - emit sendresult(timeArray[this->getTargetChoice()]); + emit sendresult(); + //emit sendresult(timeArray[this->getTargetChoice()]); +} + +double ResultDialog::getResult() +{ + return timeArray[this->getTargetChoice()]; } /** diff --git a/Client/resultdialog.h b/Client/resultdialog.h index e8828c7..9126822 100644 --- a/Client/resultdialog.h +++ b/Client/resultdialog.h @@ -10,7 +10,7 @@ #define RESULTDIALOG_H #include -//#include "measures.h" + namespace Ui { class ResultDialog; @@ -25,9 +25,10 @@ public: void setEnd(int pValue); void setValue(int pSpeed, double pTime); void setLabelInfoToUser(QString infoText); + double getResult(); signals: - void sendresult(double); + void sendresult(); protected: void changeEvent(QEvent *e);