X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=Client%2Fmainwindow.cpp;h=0b78399137b923beab3a93355d28d1ec0fcaba28;hb=20d58825bd115adb8e56401a1055ff6d2a3c7850;hp=8dbfc7900ae6ac13bbb79b934adec3d07ba9c16f;hpb=fabb862ed27bd473f0bf9f0217dd30da80ad217c;p=speedfreak diff --git a/Client/mainwindow.cpp b/Client/mainwindow.cpp index 8dbfc79..0b78399 100644 --- a/Client/mainwindow.cpp +++ b/Client/mainwindow.cpp @@ -43,7 +43,6 @@ MainWindow::MainWindow(QWidget *parent) : connect(httpClient->myXmlreader, SIGNAL(receivedTop10List()), this, SLOT(showTop10())); resultDialog = new ResultDialog; - connect(resultDialog, SIGNAL(sendresult()), this, SLOT(clientSendResult())); accstart = NULL; @@ -128,6 +127,7 @@ void MainWindow::on_pushButtonAccelerate_clicked() { if(!accstart) accstart = new accelerationstart(this); + connect(accstart, SIGNAL(sendresult(QString, double)), this, SLOT(clientSendResult(QString, double))); accstart->show(); } @@ -211,11 +211,18 @@ void MainWindow::clientSendRoute() /** * This function send acceleration data to server */ -void MainWindow::clientSendResult() +void MainWindow::clientSendResult(QString category, double result) { - qDebug() << "_clientSendResult"; + /*QMessageBox msgBox; + msgBox.setWindowTitle("client send result!"); + msgBox.setText("client send result!"); + msgBox.setDefaultButton(QMessageBox::Ok); + msgBox.exec();*/ + + qDebug() << "__clientSendResult"; if(accstart) { qDebug() << "_clientSendResult, calling server"; - httpClient->sendResultXml(accstart->getMeasureCategory(), resultDialog->getResult()); + httpClient->sendResultXml(category, result); + //httpClient->sendResultXml(accstart->getMeasureCategory(), resultDialog->getResult()); } }