# HG changeset patch # User Hasan Yavuz ÖZDERYA # Date 2016-03-27 16:56:31 # Node ID ba9c69189b81c7504f277ecefddb3ae9eadd2508 # Parent f52bce8f216c34c201eff48197a8d982a1109af5 # Parent 52af566267d1cf022c470688d84b204ec9bcdfc1 Merge with default diff --git a/src/dataformatpanel.cpp b/src/dataformatpanel.cpp --- a/src/dataformatpanel.cpp +++ b/src/dataformatpanel.cpp @@ -183,7 +183,7 @@ void DataFormatPanel::enableDemo(bool en void DataFormatPanel::spsTimerTimeout() { unsigned currentSps = _samplesPerSecond; - _samplesPerSecond = sampleCount/SPS_UPDATE_TIMEOUT; + _samplesPerSecond = (sampleCount/_numOfChannels)/SPS_UPDATE_TIMEOUT; if (currentSps != _samplesPerSecond) { emit samplesPerSecondChanged(_samplesPerSecond); diff --git a/src/defines.h b/src/defines.h new file mode 100644 --- /dev/null +++ b/src/defines.h @@ -0,0 +1,20 @@ +/* + Copyright © 2016 Hasan Yavuz Özderya + + This file is part of serialplot. + + serialplot is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + serialplot is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with serialplot. If not, see . +*/ + +const char* BUG_REPORT_URL = "https://bitbucket.org/hyOzd/serialplot/issues/new"; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -35,6 +36,7 @@ #include "framebufferseries.h" #include "utils.h" +#include "defines.h" #include "version.h" #if defined(Q_OS_WIN) && defined(QT_STATIC) @@ -95,6 +97,9 @@ MainWindow::MainWindow(QWidget *parent) QObject::connect(ui->actionHelpAbout, &QAction::triggered, &aboutDialog, &QWidget::show); + QObject::connect(ui->actionReportBug, &QAction::triggered, + [](){QDesktopServices::openUrl(QUrl(BUG_REPORT_URL));}); + QObject::connect(ui->actionExportCsv, &QAction::triggered, this, &MainWindow::onExportCsv); @@ -205,7 +210,7 @@ MainWindow::MainWindow(QWidget *parent) // Init sps (sample per second) counter spsLabel.setText("0sps"); - spsLabel.setToolTip("samples per second (total of all channels)"); + spsLabel.setToolTip("samples per second (per channel)"); ui->statusBar->addPermanentWidget(&spsLabel); QObject::connect(&dataFormatPanel, &DataFormatPanel::samplesPerSecondChanged, diff --git a/src/mainwindow.ui b/src/mainwindow.ui --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -250,6 +250,7 @@ Help + @@ -340,6 +341,14 @@ Ctrl+Q + + + Report a Bug + + + Report a Bug on SerialPlot Website + + diff --git a/src/plot.cpp b/src/plot.cpp --- a/src/plot.cpp +++ b/src/plot.cpp @@ -154,6 +154,7 @@ void Plot::darkBackground(bool enabled) zoomer.setRubberBandPen(QPen(Qt::white)); zoomer.setTrackerPen(QPen(Qt::white)); sZoomer.setPickerPen(QPen(Qt::white)); + legend.setTextPen(QPen(Qt::white)); } else { @@ -163,6 +164,7 @@ void Plot::darkBackground(bool enabled) zoomer.setRubberBandPen(QPen(Qt::black)); zoomer.setTrackerPen(QPen(Qt::black)); sZoomer.setPickerPen(QPen(Qt::black)); + legend.setTextPen(QPen(Qt::black)); } replot(); }