mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
removed redundant includes etc.
This commit is contained in:
parent
ae3189d836
commit
ee799b540a
@ -1,17 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_cloneplot.h"
|
||||
#include <QMainWindow>
|
||||
#include <QString>
|
||||
|
||||
class SlsQtH1D;
|
||||
class SlsQt1DPlot;
|
||||
class SlsQt2DPlot;
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QString>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
class qCloneWidget : public QMainWindow, private Ui::ClonePlotObject {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -1,10 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_dac.h"
|
||||
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class qDacWidget : public QWidget, private Ui::WidgetDacObject {
|
||||
|
@ -8,8 +8,9 @@
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
using std::chrono::duration;
|
||||
using std::chrono::duration_cast;
|
||||
using std::chrono::hours;
|
||||
|
@ -1,8 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_detectormain.h"
|
||||
|
||||
#include "qDefs.h"
|
||||
#include "Detector.h"
|
||||
#include <QTabWidget>
|
||||
|
||||
class qDrawPlot;
|
||||
class qTabMeasurement;
|
||||
class qTabDataOutput;
|
||||
@ -12,11 +13,6 @@ class qTabSettings;
|
||||
class qTabDebugging;
|
||||
class qTabDeveloper;
|
||||
class qTabMessages;
|
||||
|
||||
#include "Detector.h"
|
||||
|
||||
#include <QTabWidget>
|
||||
|
||||
class QScrollArea;
|
||||
class QResizeEvent;
|
||||
|
||||
|
@ -1,20 +1,16 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_plot.h"
|
||||
|
||||
#include "qDefs.h"
|
||||
#include "Detector.h"
|
||||
#include <mutex>
|
||||
|
||||
class SlsQt1DPlot;
|
||||
class SlsQtH1D;
|
||||
class SlsQt2DPlot;
|
||||
class qCloneWidget;
|
||||
|
||||
class detectorData;
|
||||
#include "Detector.h"
|
||||
|
||||
class QResizeEvent;
|
||||
|
||||
#include <mutex>
|
||||
|
||||
class qDrawPlot : public QWidget, private Ui::PlotObject {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_tab_advanced.h"
|
||||
#include "Detector.h"
|
||||
|
||||
class qDrawPlot;
|
||||
|
||||
#include "Detector.h"
|
||||
|
||||
class qTabAdvanced : public QWidget, private Ui::TabAdvancedObject {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_tab_dataoutput.h"
|
||||
|
||||
#include "Detector.h"
|
||||
|
||||
class qTabDataOutput : public QWidget, private Ui::TabDataOutputObject {
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_tab_debugging.h"
|
||||
|
||||
#include "Detector.h"
|
||||
|
||||
class QTreeWidget;
|
||||
|
@ -1,14 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_tab_developer.h"
|
||||
class qDacWidget;
|
||||
|
||||
#include "Detector.h"
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class qDacWidget;
|
||||
|
||||
class qTabDeveloper : public QWidget, private Ui::TabDeveloperObject {
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -1,11 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_tab_measurement.h"
|
||||
|
||||
class qDrawPlot;
|
||||
|
||||
#include "Detector.h"
|
||||
|
||||
class qDrawPlot;
|
||||
class QStandardItemModel;
|
||||
|
||||
class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
|
||||
|
@ -1,5 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_tab_messages.h"
|
||||
|
||||
class QProcess;
|
||||
|
@ -1,11 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_tab_plot.h"
|
||||
|
||||
class qDrawPlot;
|
||||
|
||||
#include "Detector.h"
|
||||
|
||||
class qDrawPlot;
|
||||
class QButtonGroup;
|
||||
|
||||
class qTabPlot : public QWidget, private Ui::TabPlotObject {
|
||||
|
@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "ui_form_tab_settings.h"
|
||||
|
||||
#include "Detector.h"
|
||||
|
||||
class qTabSettings : public QWidget, private Ui::TabSettingsObject {
|
||||
|
@ -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>
|
||||
|
@ -1,9 +1,4 @@
|
||||
|
||||
/**
|
||||
* @author Ian Johnson
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
#ifndef SLSQT1DZOOMER_H
|
||||
#define SLSQT1DZOOMER_H
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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:
|
||||
|
@ -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());
|
||||
|
@ -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,
|
||||
|
@ -1,9 +1,4 @@
|
||||
|
||||
/**
|
||||
* @author Ian Johnson
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
/* TODO! short description */
|
||||
#include "SlsQt2DHist.h"
|
||||
#include "ansi.h"
|
||||
#include <cmath>
|
||||
|
@ -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;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "qDacWidget.h"
|
||||
#include "qDefs.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
qDacWidget::qDacWidget(QWidget *parent, sls::Detector *detector, bool d,
|
||||
std::string n, slsDetectorDefs::dacIndex i)
|
||||
|
@ -19,9 +19,8 @@
|
||||
#include <QScrollArea>
|
||||
#include <QSizePolicy>
|
||||
|
||||
#include <getopt.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <getopt.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "qDrawPlot.h"
|
||||
|
||||
#include "SlsQt1DPlot.h"
|
||||
#include "SlsQt2DPlot.h"
|
||||
#include "detectorData.h"
|
||||
|
@ -3,8 +3,6 @@
|
||||
#include "qDefs.h"
|
||||
#include "qDrawPlot.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
qTabAdvanced::qTabAdvanced(QWidget *parent, sls::Detector *detector,
|
||||
qDrawPlot *p)
|
||||
: QWidget(parent), det(detector), plot(p) {
|
||||
|
@ -5,8 +5,6 @@
|
||||
#include <QFileDialog>
|
||||
#include <QStandardItemModel>
|
||||
#include <QString>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
qTabDataOutput::qTabDataOutput(QWidget *parent, sls::Detector *detector)
|
||||
|
@ -1,14 +1,10 @@
|
||||
#include "qTabDebugging.h"
|
||||
#include "qDefs.h"
|
||||
|
||||
#include "ToString.h"
|
||||
|
||||
#include <QDesktopWidget>
|
||||
#include <QGridLayout>
|
||||
#include <QTreeWidget>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
qTabDebugging::qTabDebugging(QWidget *parent, sls::Detector *detector)
|
||||
: QWidget(parent), det(detector), treeDet(nullptr),
|
||||
lblDetectorHostname(nullptr), lblDetectorFirmware(nullptr),
|
||||
|
@ -2,8 +2,6 @@
|
||||
#include "qDacWidget.h"
|
||||
#include "qDefs.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
qTabDeveloper::qTabDeveloper(QWidget *parent, sls::Detector *detector)
|
||||
: QWidget(parent), det(detector) {
|
||||
setupUi(this);
|
||||
|
@ -1,15 +1,10 @@
|
||||
#include "qTabMeasurement.h"
|
||||
#include "qDefs.h"
|
||||
#include "qDrawPlot.h"
|
||||
|
||||
#include "string_utils.h"
|
||||
|
||||
#include <QStandardItemModel>
|
||||
#include <QTimer>
|
||||
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
|
||||
qTabMeasurement::qTabMeasurement(QWidget *parent, sls::Detector *detector,
|
||||
qDrawPlot *p)
|
||||
: QWidget(parent), det(detector), plot(p), progressTimer(nullptr) {
|
||||
|
@ -7,8 +7,6 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QProcess>
|
||||
#include <QTextStream>
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
qTabMessages::qTabMessages(QWidget *parent) : QWidget(parent) {
|
||||
|
@ -1,15 +1,11 @@
|
||||
#include "qTabPlot.h"
|
||||
#include "qDefs.h"
|
||||
#include "qDrawPlot.h"
|
||||
|
||||
#include <QAbstractButton>
|
||||
#include <QButtonGroup>
|
||||
#include <QStackedLayout>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <string>
|
||||
|
||||
QString qTabPlot::defaultPlotTitle("");
|
||||
QString qTabPlot::defaultHistXAxisTitle("Channel Number");
|
||||
|
@ -1,13 +1,8 @@
|
||||
#include "qTabSettings.h"
|
||||
#include "qDefs.h"
|
||||
|
||||
#include "ToString.h"
|
||||
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include <cmath>
|
||||
#include <iostream>
|
||||
|
||||
qTabSettings::qTabSettings(QWidget *parent, sls::Detector *detector)
|
||||
: QWidget(parent), det(detector) {
|
||||
setupUi(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user