Formatted package
This commit is contained in:
Dhanya Thattil
2022-08-05 15:39:34 +02:00
committed by GitHub
parent 7173785b29
commit 6bf9dbf6d3
89 changed files with 1366 additions and 1210 deletions

View File

@ -8,8 +8,8 @@
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_marker.h>
#include <qwt_scale_div.h>
#include <qwt_plot_shapeitem.h>
#include <qwt_scale_div.h>
class QPen;
class QwtSymbol;
@ -140,7 +140,7 @@ class SlsQt1DPlot : public QwtPlot {
void SetLogX(bool yes = 1);
void SetLogY(bool yes = 1);
void EnableRoiBox(std::array<int, 4> roi);
void EnableRoiBox(std::array<int, 4> roi);
void DisableRoiBox();
private:
@ -176,5 +176,3 @@ class SlsQt1DPlot : public QwtPlot {
} // namespace sls
#endif

View File

@ -5,8 +5,8 @@
#include "SlsQt2DZoomer.h"
#include <qlist.h>
#include <qwt_plot.h>
#include <qwt_plot_spectrogram.h>
#include <qwt_plot_shapeitem.h>
#include <qwt_plot_spectrogram.h>
class QwtPlotPanner;
class QwtScaleWidget;
@ -70,7 +70,7 @@ class SlsQt2DPlot : public QwtPlot {
void SetLogz(bool enable, bool isMin, bool isMax, double min, double max);
void SetZRange(bool isMin, bool isMax, double min, double max);
void LogZ(bool on = 1);
void EnableRoiBox(std::array<int, 4> roi);
void EnableRoiBox(std::array<int, 4> roi);
void DisableRoiBox();
public slots:

View File

@ -444,17 +444,16 @@ void SlsQt1DPlot::SetLog(int axisId, bool yes) {
Update();
}
void SlsQt1DPlot::EnableRoiBox(std::array<int, 4> roi) {
if (roiBox == nullptr) {
roiBox = new QwtPlotShapeItem();
roiBox->attach(this);
roiBox->setPen(QColor(Qt::yellow), 2.0, Qt::SolidLine);
}
}
// TopLeft - BottomRight (max points are +1 on graph)
QRect myRect(QPoint(roi[0], roi[2]), QPoint(roi[1] - 1, roi[3] - 1));
roiBox->setRect( QRectF(myRect) );
roiBox->setRect(QRectF(myRect));
replot();
}
@ -465,7 +464,6 @@ void SlsQt1DPlot::DisableRoiBox() {
}
}
void SlsQt1DPlot::UnZoom() {
setAxisScale(QwtPlot::xBottom, zoomer->x(), zoomer->x() + zoomer->w());
setAxisScale(QwtPlot::yLeft, zoomer->y(), zoomer->y() + zoomer->h());

View File

@ -301,7 +301,7 @@ void SlsQt2DPlot::EnableRoiBox(std::array<int, 4> roi) {
// TopLeft - BottomRight (max points are +1 on graph)
QRect myRect(QPoint(roi[0], roi[2]), QPoint(roi[1] - 1, roi[3] - 1));
roiBox->setRect( QRectF(myRect) );
roiBox->setRect(QRectF(myRect));
roiBox->attach(this);
replot();