removed redundant includes etc.

This commit is contained in:
Erik Frojdh
2020-03-10 11:12:00 +01:00
parent ae3189d836
commit ee799b540a
33 changed files with 33 additions and 189 deletions

View File

@ -1,24 +1,8 @@
/**
* @author Ian Johnson
* @version 1.0
* Modifications:
* 19.06.2012: {Some functions have been added by Dhanya to enable zooming in
* and out without using mouse control: DisableZoom, SetXMinMax,SetYMinMax,
* GetXMinimum,GetXMaximum,GetYMinimum,GetYMaximum}
* */
#ifndef SLSQT1DPLOT_H
#define SLSQT1DPLOT_H
typedef double double32_t;
typedef float float32_t;
typedef int int32_t;
#include "ansi.h"
#include "SlsQt1DZoomer.h"
#include <iostream>
#include <qwt_plot.h>
#include <qwt_plot_curve.h>
#include <qwt_plot_marker.h>

View File

@ -1,9 +1,4 @@
/**
* @author Ian Johnson
* @version 1.0
*/
#ifndef SLSQT1DZOOMER_H
#define SLSQT1DZOOMER_H

View File

@ -1,15 +1,7 @@
/**
* @author Ian Johnson
* @version 1.0
*/
#ifndef SLSQT2DHIST_H
#define SLSQT2DHIST_H
#if QT_VERSION >= 0x040000
#include <qprintdialog.h>
#endif
#include <qwt_color_map.h>
#include <qwt_plot_spectrogram.h>
#include <qwt_scale_draw.h>

View File

@ -1,12 +1,10 @@
#pragma once
#include "SlsQt2DHist.h"
#include "SlsQt2DZoomer.h"
#include <qlist.h>
#include <qwt_plot.h>
#include <qwt_plot_spectrogram.h>
#include "SlsQt2DHist.h"
#include "SlsQt2DZoomer.h"
class QwtPlotPanner;
class QwtScaleWidget;
class QwtLinearColorMap;

View File

@ -1,22 +1,9 @@
/**
* @author Ian Johnson
* @version 1.0
* Dhanya-05.12.2012- included an additional header
*/
#ifndef SLSQT2DZOOMER_H
#define SLSQT2DZOOMER_H
/**included by Dhanya on 05.12.2012 to avoid compile time errors with the latest
* gcc*/
#include <cstdio>
/**end of Change by Dhanya*/
#include "SlsQt2DHist.h"
#include <qwt_plot_panner.h>
#include <qwt_plot_zoomer.h>
#include "SlsQt2DHist.h"
#include <cstdio>
class SlsQt2DZoomer : public QwtPlotZoomer {
private:

View File

@ -1,12 +1,7 @@
/**
* @author Ian Johnson
* @version 1.0
*/
/* TODO! short description */
#include "SlsQt1DPlot.h"
#include "qwt_symbol.h"
#include <iostream>
#include <qwt_symbol.h>
#include <qwt_legend.h>
#include <qwt_math.h>
#include <qwt_painter.h>
@ -16,6 +11,7 @@
#include <qwt_scale_engine.h>
#include <qwt_scale_widget.h>
#include <stdlib.h>
#include <iostream>
#define QwtLog10ScaleEngine QwtLogScaleEngine // hmm
@ -500,14 +496,9 @@ void SlsQt1DPlot::SetupZoom() {
// Ctrl+RighButton: zoom out to full size
zoomer = new SlsQt1DZoomer(canvas());
#if QT_VERSION < 0x040000
zoomer->setMousePattern(QwtEventPattern::MouseSelect2, Qt::RightButton,
Qt::ControlButton);
#else
zoomer->setMousePattern(QwtEventPattern::MouseSelect2, Qt::RightButton,
Qt::ControlModifier);
#endif
zoomer->setMousePattern(QwtEventPattern::MouseSelect3, Qt::RightButton);
panner = new QwtPlotPanner((QwtPlotCanvas *)canvas());

View File

@ -1,16 +1,9 @@
/**
* @author Ian Johnson
* @version 1.0
*/
#include <iostream>
/* TODO! short description */
#include "SlsQt1DZoomer.h"
#include "SlsQt1DPlot.h"
#include <qwt_plot.h>
#include <qwt_scale_div.h>
#include "SlsQt1DPlot.h"
#include "SlsQt1DZoomer.h"
#include <iostream>
void SlsQt1DZoomer::ResetZoomBase() {
SetZoomBase(x0, y0, x1 - x0,

View File

@ -1,9 +1,4 @@
/**
* @author Ian Johnson
* @version 1.0
*/
/* TODO! short description */
#include "SlsQt2DHist.h"
#include "ansi.h"
#include <cmath>

View File

@ -1,15 +1,9 @@
#include "SlsQt2DPlot.h"
#include "ansi.h"
#include <cmath>
#include <iostream>
#include <qlist.h>
#include <qprinter.h>
#include <qtoolbutton.h>
#if QT_VERSION >= 0x040000
#include <qprintdialog.h>
#endif
#include <qwt_color_map.h>
#include <qwt_plot_layout.h>
#include <qwt_plot_panner.h>
@ -19,7 +13,8 @@
#include <qwt_scale_engine.h>
#include <qwt_scale_widget.h>
#define QwtLog10ScaleEngine QwtLogScaleEngine // hmm remove?
#include <cmath>
#include <iostream>
SlsQt2DPlot::SlsQt2DPlot(QWidget *parent) : QwtPlot(parent) {
isLog = 0;
@ -137,16 +132,9 @@ void SlsQt2DPlot::SetupZoom() {
zoomer = new SlsQt2DZoomer(canvas());
zoomer->SetHist(hist);
#if QT_VERSION < 0x040000
zoomer->setMousePattern(QwtEventPattern::MouseSelect2, Qt::RightButton,
Qt::ControlButton);
#else
zoomer->setMousePattern(QwtEventPattern::MouseSelect2, Qt::RightButton,
Qt::ControlModifier);
#endif
zoomer->setMousePattern(QwtEventPattern::MouseSelect3, Qt::RightButton);
panner = new QwtPlotPanner(canvas());
panner->setAxisEnabled(QwtPlot::yRight, false);
panner->setMouseButton(Qt::MidButton);
@ -163,13 +151,6 @@ void SlsQt2DPlot::SetupZoom() {
zoomer->setTrackerPen(c);
}
/*void SlsQt2DPlot::CompletelyUnZoom(){
setAxisScale(QwtPlot::xBottom,hist->GetXMin(),hist->GetXMin()+(hist->GetXMax()-hist->GetXMin()));
setAxisScale(QwtPlot::yLeft,hist->GetYMin(),hist->GetYMin()+(hist->GetYMax()-hist->GetYMin()));
zoomer->setZoomBase();
//replot();
}*/
void SlsQt2DPlot::UnZoom(bool replot) {
zoomer->setZoomBase(QRectF(hist->GetXMin(), hist->GetYMin(),
@ -199,13 +180,8 @@ void SlsQt2DPlot::DisableZoom(bool disable) {
if (zoomer) {
zoomer->setMousePattern(QwtEventPattern::MouseSelect1,
Qt::NoButton);
#if QT_VERSION < 0x040000
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::NoButton, Qt::ControlButton);
#else
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::NoButton, Qt::ControlModifier);
#endif
zoomer->setMousePattern(QwtEventPattern::MouseSelect3,
Qt::NoButton);
}
@ -215,13 +191,8 @@ void SlsQt2DPlot::DisableZoom(bool disable) {
if (zoomer) {
zoomer->setMousePattern(QwtEventPattern::MouseSelect1,
Qt::LeftButton);
#if QT_VERSION < 0x040000
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlButton);
#else
zoomer->setMousePattern(QwtEventPattern::MouseSelect2,
Qt::RightButton, Qt::ControlModifier);
#endif
zoomer->setMousePattern(QwtEventPattern::MouseSelect3,
Qt::RightButton);
}
@ -325,7 +296,7 @@ void SlsQt2DPlot::LogZ(bool on) {
if (on) {
isLog = 1;
d_spectrogram->setColorMap(myColourMap(isLog));
setAxisScaleEngine(QwtPlot::yRight, new QwtLog10ScaleEngine);
setAxisScaleEngine(QwtPlot::yRight, new QwtLogScaleEngine);
d_spectrogram->setContourLevels(contourLevelsLog);
} else {
isLog = 0;