{
stopMeasureSpeed = 0;
if( index == 1 ) {
- stopMeasureSpeed = 10;
- measureCategory = "acceleration-0-10";
+ stopMeasureSpeed = 20;
+ measureCategory = "acceleration-0-20";
}
else if( index == 2 ) {
stopMeasureSpeed = 40;
}
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());
}
}
}
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());
}
}
}
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());
}
}
}
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");
}
}
}
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();
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();
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());
}
}
void clientSendRoute();
void clientRegUserToServer();
void clientUserLogin();
- void clientSendResult(double result);
+ void clientSendResult();
void setCategoryCompoBox();
void showTop10();
+
};
#endif // MAINWINDOW_H
*/
void ResultDialog::on_pushButtonSend_clicked()
{
- emit sendresult(timeArray[this->getTargetChoice()]);
+ emit sendresult();
+ //emit sendresult(timeArray[this->getTargetChoice()]);
+}
+
+double ResultDialog::getResult()
+{
+ return timeArray[this->getTargetChoice()];
}
/**
#define RESULTDIALOG_H
#include <QDialog>
-//#include "measures.h"
+
namespace Ui {
class ResultDialog;
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);