From c4ac9c28e1053608f9f6881301286fba1b1c039f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Sun, 17 Nov 2013 15:30:23 +0100 Subject: [PATCH] - Use QLocale to print current values. - Use QLocale to print integration results on GraphView. - Hide mouse cursor in GraphView. - Align "Anyanka" text in About window properly. - Bump version to 0.1d. --- globalinfo.cpp | 2 +- gui/aboutanyanka.ui | 7 +++++-- gui/graphview.cpp | 1 + gui/signalview.cpp | 5 +++-- signalcontroller.cpp | 6 ++++-- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/globalinfo.cpp b/globalinfo.cpp index ff95cca..e2fcc8e 100644 --- a/globalinfo.cpp +++ b/globalinfo.cpp @@ -24,4 +24,4 @@ const int GlobalInfo::APP_VERSION_MAJ(0); const int GlobalInfo::APP_VERSION_MIN(1); -const QString GlobalInfo::APP_VERSION_REV("c"); +const QString GlobalInfo::APP_VERSION_REV("d"); diff --git a/gui/aboutanyanka.ui b/gui/aboutanyanka.ui index 4f92871..19fae9a 100644 --- a/gui/aboutanyanka.ui +++ b/gui/aboutanyanka.ui @@ -16,9 +16,9 @@ - 115 + 8 13 - 121 + 345 41 @@ -32,6 +32,9 @@ Anyanka + + Qt::AlignCenter + diff --git a/gui/graphview.cpp b/gui/graphview.cpp index e0a4380..d6da6d0 100644 --- a/gui/graphview.cpp +++ b/gui/graphview.cpp @@ -26,6 +26,7 @@ GraphView::GraphView(QWidget *parent) : QLabel(parent) { setMouseTracking(true); + setCursor(Qt::BlankCursor); } void GraphView::leaveEvent(QEvent *) diff --git a/gui/signalview.cpp b/gui/signalview.cpp index b8fb01a..9f1f447 100644 --- a/gui/signalview.cpp +++ b/gui/signalview.cpp @@ -352,8 +352,9 @@ void SignalView::resizeEvent(QResizeEvent* ev) void SignalView::onUpdateCurrentValues(double x, double y) { - ui->qle_xValue->setText(QString::number(x)); - ui->qle_yValue->setText(QString::number(y)); + QLocale l = QLocale::system(); + ui->qle_xValue->setText(l.toString(x)); + ui->qle_yValue->setText(l.toString(y)); } void SignalView::onRemoveCurrentValues() diff --git a/signalcontroller.cpp b/signalcontroller.cpp index 65cfc96..ee722cc 100644 --- a/signalcontroller.cpp +++ b/signalcontroller.cpp @@ -102,6 +102,7 @@ void SignalController::drawIntegratedPeak(const std::shared_ptr int fromX, toX; double fromY, toY; bool valley; + QLocale l; if (peak->toIdx() < m_fromIdx || peak->fromIdx() > m_toIdx) /* Peak is not in view X-wise, skip it */ return; @@ -131,8 +132,9 @@ void SignalController::drawIntegratedPeak(const std::shared_ptr qDebug() << "Slope P" << peak->baselineSlope() << "Slope M" << (toY-fromY)/(toX-fromX); qDebug("---");*/ - const QString peakTime = QString::number(peak->peakTime(), 'f', 4); - const QString peakArea = QString("A: ") + QString::number(peak->auc(), 'f', 4); + l = QLocale::system(); + const QString peakTime = l.toString(peak->peakTime(), 'f', 4); + const QString peakArea = QString("A: ") + l.toString(peak->auc(), 'f', 4); if (peak->type() == IntegratedPeak::Type::PEAK) valley = false; else -- 2.43.5