From: Jukka Kurttila Date: Thu, 27 May 2010 08:38:02 +0000 (+0300) Subject: Result dialog files restored to version before email send changes. X-Git-Url: http://git.maemo.org/git/?p=speedfreak;a=commitdiff_plain;h=c242a09217383da0664e3270c2f1c181cc263645 Result dialog files restored to version before email send changes. --- diff --git a/Client/resultdialog.cpp b/Client/resultdialog.cpp index 1f75c6e..a5f5d32 100644 --- a/Client/resultdialog.cpp +++ b/Client/resultdialog.cpp @@ -14,8 +14,6 @@ #include #include #include -#include -#include const int DIAGRAM_WIDTH = 400; const int DIAGRAM_HEIGHT = 300; @@ -116,15 +114,7 @@ void ResultDialog::changeEvent(QEvent *e) void ResultDialog::paintEvent(QPaintEvent *) { setHeaders(); - //Create Pixmap, where image will be draw - QPixmap image(ui->scrollArea->width(), ui->scrollArea->height()/*DIAGRAM_WIDTH+100, DIAGRAM_HEIGHT+70*/); - - //Create painter and give paramemeter where image will be draw - QPainter painter(&image); - painter.setPen(Qt::white); - painter.setBrush(Qt::white); - painter.drawRect(QRect(0, 0, ui->scrollArea->width(), ui->scrollArea->height()/*DIAGRAM_WIDTH+100, DIAGRAM_HEIGHT+70*/)); - + QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(QPen((Qt::gray),2)); @@ -136,7 +126,7 @@ void ResultDialog::paintEvent(QPaintEvent *) fontForResult.setPixelSize(50); painter.setFont(fontForResult); - painter.drawText(diagramStemStart.x() + 30, diagramStemStart.y() - 150, resultString); + painter.drawText(diagramStemStart.x() + 50, diagramStemStart.y() - 150, resultString); painter.setFont(font); painter.setPen(QPen((Qt::darkCyan),2)); @@ -208,18 +198,6 @@ void ResultDialog::paintEvent(QPaintEvent *) { painter.drawPolyline(points, pointsToShow); } - //Save image in file acceleration.png - image.save("acceleration.png", 0, -1); - - //Create label - QLabel *imageLabel = new QLabel(this); - - //Set image pixmap to label - imageLabel->setPixmap(image); - - //Set image label to scrollArea - ui->scrollArea->setWidget(imageLabel); - } /** @@ -820,12 +798,4 @@ void ResultDialog::killHelpDialog() helpAccelerationDialog = NULL; } } -/** - * This slot function opens E-mail application with attachment file - * (acceleration.png). Image of resultdialog - */ -void ResultDialog::on_pushButtonEMail_clicked() -{ - QDesktopServices::openUrl(QUrl("mailto:name@domain.com?Subject=Acceleration Result&Body=Hi, Here are my acceleration result!&Attachment=acceleration.png")); -} diff --git a/Client/resultdialog.h b/Client/resultdialog.h index 21b9ff9..752b790 100644 --- a/Client/resultdialog.h +++ b/Client/resultdialog.h @@ -57,7 +57,6 @@ private: QString resultString; private slots: - void on_pushButtonEMail_clicked(); void on_pushButtonInfo_clicked(); void on_pushButtonNew_clicked(); void on_pushButtonSend_clicked(); diff --git a/Client/resultdialog.ui b/Client/resultdialog.ui index 4431c71..974628a 100644 --- a/Client/resultdialog.ui +++ b/Client/resultdialog.ui @@ -70,7 +70,7 @@ 510 280 - 81 + 131 71 @@ -165,9 +165,9 @@ - 710 + 660 280 - 81 + 131 71 @@ -201,7 +201,7 @@ - + :/new/prefix1/Graphics/info.png:/new/prefix1/Graphics/info.png @@ -211,49 +211,9 @@ - - - - 0 - 0 - 501 - 381 - - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOff - - - true - - - - - 0 - 0 - 499 - 379 - - - - - - - - 610 - 280 - 81 - 71 - - - - Send E-mail - - - + + +